diff --git a/pb/c1/action/v1/action.pb.go b/pb/c1/action/v1/action.pb.go new file mode 100644 index 00000000..915ef894 --- /dev/null +++ b/pb/c1/action/v1/action.pb.go @@ -0,0 +1,231 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.4 +// protoc (unknown) +// source: c1/action/v1/action.proto + +package v1 + +import ( + v1 "github.com/conductorone/baton-sdk/pb/c1/config/v1" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" + unsafe "unsafe" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type BatonAction struct { + state protoimpl.MessageState `protogen:"open.v1"` + Id string `protobuf:"bytes,4,opt,name=id,proto3" json:"id,omitempty"` + Schema *BatonActionSchema `protobuf:"bytes,5,opt,name=schema,proto3" json:"schema,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *BatonAction) Reset() { + *x = BatonAction{} + mi := &file_c1_action_v1_action_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *BatonAction) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BatonAction) ProtoMessage() {} + +func (x *BatonAction) ProtoReflect() protoreflect.Message { + mi := &file_c1_action_v1_action_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use BatonAction.ProtoReflect.Descriptor instead. +func (*BatonAction) Descriptor() ([]byte, []int) { + return file_c1_action_v1_action_proto_rawDescGZIP(), []int{0} +} + +func (x *BatonAction) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *BatonAction) GetSchema() *BatonActionSchema { + if x != nil { + return x.Schema + } + return nil +} + +type BatonActionSchema struct { + state protoimpl.MessageState `protogen:"open.v1"` + FunctionName string `protobuf:"bytes,1,opt,name=function_name,json=functionName,proto3" json:"function_name,omitempty"` + Arguments []*v1.Field `protobuf:"bytes,2,rep,name=arguments,proto3" json:"arguments,omitempty"` + Constraints []*v1.Constraint `protobuf:"bytes,3,rep,name=constraints,proto3" json:"constraints,omitempty"` + ReturnTypes []*v1.Field `protobuf:"bytes,4,rep,name=return_types,json=returnTypes,proto3" json:"return_types,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *BatonActionSchema) Reset() { + *x = BatonActionSchema{} + mi := &file_c1_action_v1_action_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *BatonActionSchema) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BatonActionSchema) ProtoMessage() {} + +func (x *BatonActionSchema) ProtoReflect() protoreflect.Message { + mi := &file_c1_action_v1_action_proto_msgTypes[1] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use BatonActionSchema.ProtoReflect.Descriptor instead. +func (*BatonActionSchema) Descriptor() ([]byte, []int) { + return file_c1_action_v1_action_proto_rawDescGZIP(), []int{1} +} + +func (x *BatonActionSchema) GetFunctionName() string { + if x != nil { + return x.FunctionName + } + return "" +} + +func (x *BatonActionSchema) GetArguments() []*v1.Field { + if x != nil { + return x.Arguments + } + return nil +} + +func (x *BatonActionSchema) GetConstraints() []*v1.Constraint { + if x != nil { + return x.Constraints + } + return nil +} + +func (x *BatonActionSchema) GetReturnTypes() []*v1.Field { + if x != nil { + return x.ReturnTypes + } + return nil +} + +var File_c1_action_v1_action_proto protoreflect.FileDescriptor + +var file_c1_action_v1_action_proto_rawDesc = string([]byte{ + 0x0a, 0x19, 0x63, 0x31, 0x2f, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x2f, 0x61, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0c, 0x63, 0x31, 0x2e, + 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x1a, 0x19, 0x63, 0x31, 0x2f, 0x63, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x56, 0x0a, 0x0b, 0x42, 0x61, 0x74, 0x6f, 0x6e, 0x41, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x02, 0x69, 0x64, 0x12, 0x37, 0x0a, 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x18, 0x05, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x63, 0x31, 0x2e, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, + 0x76, 0x31, 0x2e, 0x42, 0x61, 0x74, 0x6f, 0x6e, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x63, + 0x68, 0x65, 0x6d, 0x61, 0x52, 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x22, 0xdf, 0x01, 0x0a, + 0x11, 0x42, 0x61, 0x74, 0x6f, 0x6e, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x63, 0x68, 0x65, + 0x6d, 0x61, 0x12, 0x23, 0x0a, 0x0d, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, + 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x66, 0x75, 0x6e, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x31, 0x0a, 0x09, 0x61, 0x72, 0x67, 0x75, 0x6d, + 0x65, 0x6e, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x63, 0x31, 0x2e, + 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x52, + 0x09, 0x61, 0x72, 0x67, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x3a, 0x0a, 0x0b, 0x63, 0x6f, + 0x6e, 0x73, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x74, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x18, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x43, + 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x74, 0x52, 0x0b, 0x63, 0x6f, 0x6e, 0x73, 0x74, + 0x72, 0x61, 0x69, 0x6e, 0x74, 0x73, 0x12, 0x36, 0x0a, 0x0c, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, + 0x5f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x63, + 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x69, 0x65, 0x6c, + 0x64, 0x52, 0x0b, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x73, 0x42, 0x33, + 0x5a, 0x31, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x6e, + 0x64, 0x75, 0x63, 0x74, 0x6f, 0x72, 0x6f, 0x6e, 0x65, 0x2f, 0x62, 0x61, 0x74, 0x6f, 0x6e, 0x2d, + 0x73, 0x64, 0x6b, 0x2f, 0x70, 0x62, 0x2f, 0x63, 0x31, 0x2f, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +}) + +var ( + file_c1_action_v1_action_proto_rawDescOnce sync.Once + file_c1_action_v1_action_proto_rawDescData []byte +) + +func file_c1_action_v1_action_proto_rawDescGZIP() []byte { + file_c1_action_v1_action_proto_rawDescOnce.Do(func() { + file_c1_action_v1_action_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_c1_action_v1_action_proto_rawDesc), len(file_c1_action_v1_action_proto_rawDesc))) + }) + return file_c1_action_v1_action_proto_rawDescData +} + +var file_c1_action_v1_action_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_c1_action_v1_action_proto_goTypes = []any{ + (*BatonAction)(nil), // 0: c1.action.v1.BatonAction + (*BatonActionSchema)(nil), // 1: c1.action.v1.BatonActionSchema + (*v1.Field)(nil), // 2: c1.config.v1.Field + (*v1.Constraint)(nil), // 3: c1.config.v1.Constraint +} +var file_c1_action_v1_action_proto_depIdxs = []int32{ + 1, // 0: c1.action.v1.BatonAction.schema:type_name -> c1.action.v1.BatonActionSchema + 2, // 1: c1.action.v1.BatonActionSchema.arguments:type_name -> c1.config.v1.Field + 3, // 2: c1.action.v1.BatonActionSchema.constraints:type_name -> c1.config.v1.Constraint + 2, // 3: c1.action.v1.BatonActionSchema.return_types:type_name -> c1.config.v1.Field + 4, // [4:4] is the sub-list for method output_type + 4, // [4:4] is the sub-list for method input_type + 4, // [4:4] is the sub-list for extension type_name + 4, // [4:4] is the sub-list for extension extendee + 0, // [0:4] is the sub-list for field type_name +} + +func init() { file_c1_action_v1_action_proto_init() } +func file_c1_action_v1_action_proto_init() { + if File_c1_action_v1_action_proto != nil { + return + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_c1_action_v1_action_proto_rawDesc), len(file_c1_action_v1_action_proto_rawDesc)), + NumEnums: 0, + NumMessages: 2, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_c1_action_v1_action_proto_goTypes, + DependencyIndexes: file_c1_action_v1_action_proto_depIdxs, + MessageInfos: file_c1_action_v1_action_proto_msgTypes, + }.Build() + File_c1_action_v1_action_proto = out.File + file_c1_action_v1_action_proto_goTypes = nil + file_c1_action_v1_action_proto_depIdxs = nil +} diff --git a/pb/c1/action/v1/action.pb.validate.go b/pb/c1/action/v1/action.pb.validate.go new file mode 100644 index 00000000..27bf2c0e --- /dev/null +++ b/pb/c1/action/v1/action.pb.validate.go @@ -0,0 +1,372 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: c1/action/v1/action.proto + +package v1 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on BatonAction with the rules defined in +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. +func (m *BatonAction) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on BatonAction with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in BatonActionMultiError, or +// nil if none found. +func (m *BatonAction) ValidateAll() error { + return m.validate(true) +} + +func (m *BatonAction) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for Id + + if all { + switch v := interface{}(m.GetSchema()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, BatonActionValidationError{ + field: "Schema", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, BatonActionValidationError{ + field: "Schema", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetSchema()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return BatonActionValidationError{ + field: "Schema", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if len(errors) > 0 { + return BatonActionMultiError(errors) + } + + return nil +} + +// BatonActionMultiError is an error wrapping multiple validation errors +// returned by BatonAction.ValidateAll() if the designated constraints aren't met. +type BatonActionMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m BatonActionMultiError) Error() string { + msgs := make([]string, 0, len(m)) + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m BatonActionMultiError) AllErrors() []error { return m } + +// BatonActionValidationError is the validation error returned by +// BatonAction.Validate if the designated constraints aren't met. +type BatonActionValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e BatonActionValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e BatonActionValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e BatonActionValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e BatonActionValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e BatonActionValidationError) ErrorName() string { return "BatonActionValidationError" } + +// Error satisfies the builtin error interface +func (e BatonActionValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sBatonAction.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = BatonActionValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = BatonActionValidationError{} + +// Validate checks the field values on BatonActionSchema with the rules defined +// in the proto definition for this message. If any rules are violated, the +// first error encountered is returned, or nil if there are no violations. +func (m *BatonActionSchema) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on BatonActionSchema with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// BatonActionSchemaMultiError, or nil if none found. +func (m *BatonActionSchema) ValidateAll() error { + return m.validate(true) +} + +func (m *BatonActionSchema) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for FunctionName + + for idx, item := range m.GetArguments() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, BatonActionSchemaValidationError{ + field: fmt.Sprintf("Arguments[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, BatonActionSchemaValidationError{ + field: fmt.Sprintf("Arguments[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return BatonActionSchemaValidationError{ + field: fmt.Sprintf("Arguments[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + for idx, item := range m.GetConstraints() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, BatonActionSchemaValidationError{ + field: fmt.Sprintf("Constraints[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, BatonActionSchemaValidationError{ + field: fmt.Sprintf("Constraints[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return BatonActionSchemaValidationError{ + field: fmt.Sprintf("Constraints[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + for idx, item := range m.GetReturnTypes() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, BatonActionSchemaValidationError{ + field: fmt.Sprintf("ReturnTypes[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, BatonActionSchemaValidationError{ + field: fmt.Sprintf("ReturnTypes[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return BatonActionSchemaValidationError{ + field: fmt.Sprintf("ReturnTypes[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + if len(errors) > 0 { + return BatonActionSchemaMultiError(errors) + } + + return nil +} + +// BatonActionSchemaMultiError is an error wrapping multiple validation errors +// returned by BatonActionSchema.ValidateAll() if the designated constraints +// aren't met. +type BatonActionSchemaMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m BatonActionSchemaMultiError) Error() string { + msgs := make([]string, 0, len(m)) + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m BatonActionSchemaMultiError) AllErrors() []error { return m } + +// BatonActionSchemaValidationError is the validation error returned by +// BatonActionSchema.Validate if the designated constraints aren't met. +type BatonActionSchemaValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e BatonActionSchemaValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e BatonActionSchemaValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e BatonActionSchemaValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e BatonActionSchemaValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e BatonActionSchemaValidationError) ErrorName() string { + return "BatonActionSchemaValidationError" +} + +// Error satisfies the builtin error interface +func (e BatonActionSchemaValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sBatonActionSchema.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = BatonActionSchemaValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = BatonActionSchemaValidationError{} diff --git a/pb/c1/connector/v2/action.pb.go b/pb/c1/connector/v2/action.pb.go new file mode 100644 index 00000000..92547d66 --- /dev/null +++ b/pb/c1/connector/v2/action.pb.go @@ -0,0 +1,804 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.4 +// protoc (unknown) +// source: c1/connector/v2/action.proto + +package v2 + +import ( + v1 "github.com/conductorone/baton-sdk/pb/c1/config/v1" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + anypb "google.golang.org/protobuf/types/known/anypb" + structpb "google.golang.org/protobuf/types/known/structpb" + reflect "reflect" + sync "sync" + unsafe "unsafe" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type BatonActionStatus int32 + +const ( + BatonActionStatus_BATON_ACTION_STATUS_UNSPECIFIED BatonActionStatus = 0 + BatonActionStatus_BATON_ACTION_STATUS_UNKNOWN BatonActionStatus = 1 + BatonActionStatus_BATON_ACTION_STATUS_PENDING BatonActionStatus = 2 + BatonActionStatus_BATON_ACTION_STATUS_RUNNING BatonActionStatus = 3 + BatonActionStatus_BATON_ACTION_STATUS_COMPLETE BatonActionStatus = 4 + BatonActionStatus_BATON_ACTION_STATUS_FAILED BatonActionStatus = 5 +) + +// Enum value maps for BatonActionStatus. +var ( + BatonActionStatus_name = map[int32]string{ + 0: "BATON_ACTION_STATUS_UNSPECIFIED", + 1: "BATON_ACTION_STATUS_UNKNOWN", + 2: "BATON_ACTION_STATUS_PENDING", + 3: "BATON_ACTION_STATUS_RUNNING", + 4: "BATON_ACTION_STATUS_COMPLETE", + 5: "BATON_ACTION_STATUS_FAILED", + } + BatonActionStatus_value = map[string]int32{ + "BATON_ACTION_STATUS_UNSPECIFIED": 0, + "BATON_ACTION_STATUS_UNKNOWN": 1, + "BATON_ACTION_STATUS_PENDING": 2, + "BATON_ACTION_STATUS_RUNNING": 3, + "BATON_ACTION_STATUS_COMPLETE": 4, + "BATON_ACTION_STATUS_FAILED": 5, + } +) + +func (x BatonActionStatus) Enum() *BatonActionStatus { + p := new(BatonActionStatus) + *p = x + return p +} + +func (x BatonActionStatus) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (BatonActionStatus) Descriptor() protoreflect.EnumDescriptor { + return file_c1_connector_v2_action_proto_enumTypes[0].Descriptor() +} + +func (BatonActionStatus) Type() protoreflect.EnumType { + return &file_c1_connector_v2_action_proto_enumTypes[0] +} + +func (x BatonActionStatus) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use BatonActionStatus.Descriptor instead. +func (BatonActionStatus) EnumDescriptor() ([]byte, []int) { + return file_c1_connector_v2_action_proto_rawDescGZIP(), []int{0} +} + +type BatonActionSchema struct { + state protoimpl.MessageState `protogen:"open.v1"` + FunctionName string `protobuf:"bytes,1,opt,name=function_name,json=functionName,proto3" json:"function_name,omitempty"` + Arguments []*v1.Field `protobuf:"bytes,2,rep,name=arguments,proto3" json:"arguments,omitempty"` + Constraints []*v1.Constraint `protobuf:"bytes,3,rep,name=constraints,proto3" json:"constraints,omitempty"` + ReturnTypes []*v1.Field `protobuf:"bytes,4,rep,name=return_types,json=returnTypes,proto3" json:"return_types,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *BatonActionSchema) Reset() { + *x = BatonActionSchema{} + mi := &file_c1_connector_v2_action_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *BatonActionSchema) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BatonActionSchema) ProtoMessage() {} + +func (x *BatonActionSchema) ProtoReflect() protoreflect.Message { + mi := &file_c1_connector_v2_action_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use BatonActionSchema.ProtoReflect.Descriptor instead. +func (*BatonActionSchema) Descriptor() ([]byte, []int) { + return file_c1_connector_v2_action_proto_rawDescGZIP(), []int{0} +} + +func (x *BatonActionSchema) GetFunctionName() string { + if x != nil { + return x.FunctionName + } + return "" +} + +func (x *BatonActionSchema) GetArguments() []*v1.Field { + if x != nil { + return x.Arguments + } + return nil +} + +func (x *BatonActionSchema) GetConstraints() []*v1.Constraint { + if x != nil { + return x.Constraints + } + return nil +} + +func (x *BatonActionSchema) GetReturnTypes() []*v1.Field { + if x != nil { + return x.ReturnTypes + } + return nil +} + +type ActionServiceInvokeRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Args *structpb.Struct `protobuf:"bytes,2,opt,name=args,proto3" json:"args,omitempty"` + Annotations []*anypb.Any `protobuf:"bytes,3,rep,name=annotations,proto3" json:"annotations,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ActionServiceInvokeRequest) Reset() { + *x = ActionServiceInvokeRequest{} + mi := &file_c1_connector_v2_action_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ActionServiceInvokeRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ActionServiceInvokeRequest) ProtoMessage() {} + +func (x *ActionServiceInvokeRequest) ProtoReflect() protoreflect.Message { + mi := &file_c1_connector_v2_action_proto_msgTypes[1] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ActionServiceInvokeRequest.ProtoReflect.Descriptor instead. +func (*ActionServiceInvokeRequest) Descriptor() ([]byte, []int) { + return file_c1_connector_v2_action_proto_rawDescGZIP(), []int{1} +} + +func (x *ActionServiceInvokeRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *ActionServiceInvokeRequest) GetArgs() *structpb.Struct { + if x != nil { + return x.Args + } + return nil +} + +func (x *ActionServiceInvokeRequest) GetAnnotations() []*anypb.Any { + if x != nil { + return x.Annotations + } + return nil +} + +type ActionServiceInvokeResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Status BatonActionStatus `protobuf:"varint,2,opt,name=status,proto3,enum=c1.connector.v2.BatonActionStatus" json:"status,omitempty"` + Annotations []*anypb.Any `protobuf:"bytes,3,rep,name=annotations,proto3" json:"annotations,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ActionServiceInvokeResponse) Reset() { + *x = ActionServiceInvokeResponse{} + mi := &file_c1_connector_v2_action_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ActionServiceInvokeResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ActionServiceInvokeResponse) ProtoMessage() {} + +func (x *ActionServiceInvokeResponse) ProtoReflect() protoreflect.Message { + mi := &file_c1_connector_v2_action_proto_msgTypes[2] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ActionServiceInvokeResponse.ProtoReflect.Descriptor instead. +func (*ActionServiceInvokeResponse) Descriptor() ([]byte, []int) { + return file_c1_connector_v2_action_proto_rawDescGZIP(), []int{2} +} + +func (x *ActionServiceInvokeResponse) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *ActionServiceInvokeResponse) GetStatus() BatonActionStatus { + if x != nil { + return x.Status + } + return BatonActionStatus_BATON_ACTION_STATUS_UNSPECIFIED +} + +func (x *ActionServiceInvokeResponse) GetAnnotations() []*anypb.Any { + if x != nil { + return x.Annotations + } + return nil +} + +type ActionServiceStatusRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"` + Annotations []*anypb.Any `protobuf:"bytes,3,rep,name=annotations,proto3" json:"annotations,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ActionServiceStatusRequest) Reset() { + *x = ActionServiceStatusRequest{} + mi := &file_c1_connector_v2_action_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ActionServiceStatusRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ActionServiceStatusRequest) ProtoMessage() {} + +func (x *ActionServiceStatusRequest) ProtoReflect() protoreflect.Message { + mi := &file_c1_connector_v2_action_proto_msgTypes[3] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ActionServiceStatusRequest.ProtoReflect.Descriptor instead. +func (*ActionServiceStatusRequest) Descriptor() ([]byte, []int) { + return file_c1_connector_v2_action_proto_rawDescGZIP(), []int{3} +} + +func (x *ActionServiceStatusRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *ActionServiceStatusRequest) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *ActionServiceStatusRequest) GetAnnotations() []*anypb.Any { + if x != nil { + return x.Annotations + } + return nil +} + +type ActionServiceStatusResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"` + Annotations []*anypb.Any `protobuf:"bytes,3,rep,name=annotations,proto3" json:"annotations,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ActionServiceStatusResponse) Reset() { + *x = ActionServiceStatusResponse{} + mi := &file_c1_connector_v2_action_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ActionServiceStatusResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ActionServiceStatusResponse) ProtoMessage() {} + +func (x *ActionServiceStatusResponse) ProtoReflect() protoreflect.Message { + mi := &file_c1_connector_v2_action_proto_msgTypes[4] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ActionServiceStatusResponse.ProtoReflect.Descriptor instead. +func (*ActionServiceStatusResponse) Descriptor() ([]byte, []int) { + return file_c1_connector_v2_action_proto_rawDescGZIP(), []int{4} +} + +func (x *ActionServiceStatusResponse) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *ActionServiceStatusResponse) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *ActionServiceStatusResponse) GetAnnotations() []*anypb.Any { + if x != nil { + return x.Annotations + } + return nil +} + +type ActionServiceGetSchemaRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Annotations []*anypb.Any `protobuf:"bytes,2,rep,name=annotations,proto3" json:"annotations,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ActionServiceGetSchemaRequest) Reset() { + *x = ActionServiceGetSchemaRequest{} + mi := &file_c1_connector_v2_action_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ActionServiceGetSchemaRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ActionServiceGetSchemaRequest) ProtoMessage() {} + +func (x *ActionServiceGetSchemaRequest) ProtoReflect() protoreflect.Message { + mi := &file_c1_connector_v2_action_proto_msgTypes[5] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ActionServiceGetSchemaRequest.ProtoReflect.Descriptor instead. +func (*ActionServiceGetSchemaRequest) Descriptor() ([]byte, []int) { + return file_c1_connector_v2_action_proto_rawDescGZIP(), []int{5} +} + +func (x *ActionServiceGetSchemaRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *ActionServiceGetSchemaRequest) GetAnnotations() []*anypb.Any { + if x != nil { + return x.Annotations + } + return nil +} + +type ActionServiceGetSchemaResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Arguments []*v1.Field `protobuf:"bytes,1,rep,name=arguments,proto3" json:"arguments,omitempty"` + ReturnTypes []*v1.Field `protobuf:"bytes,2,rep,name=return_types,json=returnTypes,proto3" json:"return_types,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ActionServiceGetSchemaResponse) Reset() { + *x = ActionServiceGetSchemaResponse{} + mi := &file_c1_connector_v2_action_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ActionServiceGetSchemaResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ActionServiceGetSchemaResponse) ProtoMessage() {} + +func (x *ActionServiceGetSchemaResponse) ProtoReflect() protoreflect.Message { + mi := &file_c1_connector_v2_action_proto_msgTypes[6] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ActionServiceGetSchemaResponse.ProtoReflect.Descriptor instead. +func (*ActionServiceGetSchemaResponse) Descriptor() ([]byte, []int) { + return file_c1_connector_v2_action_proto_rawDescGZIP(), []int{6} +} + +func (x *ActionServiceGetSchemaResponse) GetArguments() []*v1.Field { + if x != nil { + return x.Arguments + } + return nil +} + +func (x *ActionServiceGetSchemaResponse) GetReturnTypes() []*v1.Field { + if x != nil { + return x.ReturnTypes + } + return nil +} + +type ActionServiceListSchemasRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Annotations []*anypb.Any `protobuf:"bytes,1,rep,name=annotations,proto3" json:"annotations,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ActionServiceListSchemasRequest) Reset() { + *x = ActionServiceListSchemasRequest{} + mi := &file_c1_connector_v2_action_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ActionServiceListSchemasRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ActionServiceListSchemasRequest) ProtoMessage() {} + +func (x *ActionServiceListSchemasRequest) ProtoReflect() protoreflect.Message { + mi := &file_c1_connector_v2_action_proto_msgTypes[7] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ActionServiceListSchemasRequest.ProtoReflect.Descriptor instead. +func (*ActionServiceListSchemasRequest) Descriptor() ([]byte, []int) { + return file_c1_connector_v2_action_proto_rawDescGZIP(), []int{7} +} + +func (x *ActionServiceListSchemasRequest) GetAnnotations() []*anypb.Any { + if x != nil { + return x.Annotations + } + return nil +} + +type ActionServiceListSchemasResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Schemas []*BatonActionSchema `protobuf:"bytes,1,rep,name=schemas,proto3" json:"schemas,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ActionServiceListSchemasResponse) Reset() { + *x = ActionServiceListSchemasResponse{} + mi := &file_c1_connector_v2_action_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ActionServiceListSchemasResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ActionServiceListSchemasResponse) ProtoMessage() {} + +func (x *ActionServiceListSchemasResponse) ProtoReflect() protoreflect.Message { + mi := &file_c1_connector_v2_action_proto_msgTypes[8] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ActionServiceListSchemasResponse.ProtoReflect.Descriptor instead. +func (*ActionServiceListSchemasResponse) Descriptor() ([]byte, []int) { + return file_c1_connector_v2_action_proto_rawDescGZIP(), []int{8} +} + +func (x *ActionServiceListSchemasResponse) GetSchemas() []*BatonActionSchema { + if x != nil { + return x.Schemas + } + return nil +} + +var File_c1_connector_v2_action_proto protoreflect.FileDescriptor + +var file_c1_connector_v2_action_proto_rawDesc = string([]byte{ + 0x0a, 0x1c, 0x63, 0x31, 0x2f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2f, 0x76, + 0x32, 0x2f, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0f, + 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x1a, + 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2f, 0x61, 0x6e, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x73, 0x74, 0x72, 0x75, + 0x63, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x63, 0x31, 0x2f, 0x63, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x22, 0xdf, 0x01, 0x0a, 0x11, 0x42, 0x61, 0x74, 0x6f, 0x6e, 0x41, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x23, 0x0a, 0x0d, 0x66, 0x75, 0x6e, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0c, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x31, + 0x0a, 0x09, 0x61, 0x72, 0x67, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x13, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x76, 0x31, + 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x52, 0x09, 0x61, 0x72, 0x67, 0x75, 0x6d, 0x65, 0x6e, 0x74, + 0x73, 0x12, 0x3a, 0x0a, 0x0b, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x74, 0x73, + 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x74, + 0x52, 0x0b, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x74, 0x73, 0x12, 0x36, 0x0a, + 0x0c, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x18, 0x04, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, + 0x76, 0x31, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x52, 0x0b, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, + 0x54, 0x79, 0x70, 0x65, 0x73, 0x22, 0x95, 0x01, 0x0a, 0x1a, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x49, 0x6e, 0x76, 0x6f, 0x6b, 0x65, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x2b, 0x0a, 0x04, 0x61, 0x72, 0x67, 0x73, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x52, + 0x04, 0x61, 0x72, 0x67, 0x73, 0x12, 0x36, 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, + 0x52, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0xa1, 0x01, + 0x0a, 0x1b, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x49, + 0x6e, 0x76, 0x6f, 0x6b, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x0e, 0x0a, + 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x3a, 0x0a, + 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x22, 0x2e, + 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, + 0x42, 0x61, 0x74, 0x6f, 0x6e, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x36, 0x0a, 0x0b, 0x61, 0x6e, 0x6e, + 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x22, 0x78, 0x0a, 0x1a, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, + 0x61, 0x6d, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x02, 0x69, 0x64, 0x12, 0x36, 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x0b, + 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x79, 0x0a, 0x1b, 0x41, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x0e, + 0x0a, 0x02, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x36, + 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x03, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x6b, 0x0a, 0x1d, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x47, 0x65, 0x74, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x36, 0x0a, 0x0b, 0x61, + 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x22, 0x8b, 0x01, 0x0a, 0x1e, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x47, 0x65, 0x74, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x31, 0x0a, 0x09, 0x61, 0x72, 0x67, 0x75, 0x6d, 0x65, + 0x6e, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x63, 0x31, 0x2e, 0x63, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x52, 0x09, + 0x61, 0x72, 0x67, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x36, 0x0a, 0x0c, 0x72, 0x65, 0x74, + 0x75, 0x72, 0x6e, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x13, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x46, + 0x69, 0x65, 0x6c, 0x64, 0x52, 0x0b, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x54, 0x79, 0x70, 0x65, + 0x73, 0x22, 0x59, 0x0a, 0x1f, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x73, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x36, 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, + 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x60, 0x0a, 0x20, + 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4c, 0x69, 0x73, + 0x74, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x3c, 0x0a, 0x07, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x22, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, + 0x2e, 0x76, 0x32, 0x2e, 0x42, 0x61, 0x74, 0x6f, 0x6e, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x53, + 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x07, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x73, 0x2a, 0xdd, + 0x01, 0x0a, 0x11, 0x42, 0x61, 0x74, 0x6f, 0x6e, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, + 0x61, 0x74, 0x75, 0x73, 0x12, 0x23, 0x0a, 0x1f, 0x42, 0x41, 0x54, 0x4f, 0x4e, 0x5f, 0x41, 0x43, + 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x55, 0x4e, 0x53, 0x50, + 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x1f, 0x0a, 0x1b, 0x42, 0x41, 0x54, + 0x4f, 0x4e, 0x5f, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, + 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x01, 0x12, 0x1f, 0x0a, 0x1b, 0x42, 0x41, + 0x54, 0x4f, 0x4e, 0x5f, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, + 0x53, 0x5f, 0x50, 0x45, 0x4e, 0x44, 0x49, 0x4e, 0x47, 0x10, 0x02, 0x12, 0x1f, 0x0a, 0x1b, 0x42, + 0x41, 0x54, 0x4f, 0x4e, 0x5f, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x54, 0x41, 0x54, + 0x55, 0x53, 0x5f, 0x52, 0x55, 0x4e, 0x4e, 0x49, 0x4e, 0x47, 0x10, 0x03, 0x12, 0x20, 0x0a, 0x1c, + 0x42, 0x41, 0x54, 0x4f, 0x4e, 0x5f, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x54, 0x41, + 0x54, 0x55, 0x53, 0x5f, 0x43, 0x4f, 0x4d, 0x50, 0x4c, 0x45, 0x54, 0x45, 0x10, 0x04, 0x12, 0x1e, + 0x0a, 0x1a, 0x42, 0x41, 0x54, 0x4f, 0x4e, 0x5f, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x53, + 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x46, 0x41, 0x49, 0x4c, 0x45, 0x44, 0x10, 0x05, 0x32, 0xbb, + 0x03, 0x0a, 0x0d, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x12, 0x63, 0x0a, 0x06, 0x49, 0x6e, 0x76, 0x6f, 0x6b, 0x65, 0x12, 0x2b, 0x2e, 0x63, 0x31, 0x2e, + 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x41, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x49, 0x6e, 0x76, 0x6f, 0x6b, 0x65, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2c, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, + 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x49, 0x6e, 0x76, 0x6f, 0x6b, 0x65, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x63, 0x0a, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, + 0x2b, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, + 0x32, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x53, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2c, 0x2e, 0x63, + 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x41, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x6c, 0x0a, 0x09, 0x47, 0x65, + 0x74, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x2e, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, + 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x47, 0x65, 0x74, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2f, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, + 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x47, 0x65, 0x74, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x72, 0x0a, 0x0b, 0x4c, 0x69, 0x73, 0x74, + 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x73, 0x12, 0x30, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, + 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x63, 0x68, 0x65, 0x6d, + 0x61, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x31, 0x2e, 0x63, 0x31, 0x2e, 0x63, + 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x41, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x63, 0x68, + 0x65, 0x6d, 0x61, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x36, 0x5a, 0x34, + 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x6e, 0x64, 0x75, + 0x63, 0x74, 0x6f, 0x72, 0x6f, 0x6e, 0x65, 0x2f, 0x62, 0x61, 0x74, 0x6f, 0x6e, 0x2d, 0x73, 0x64, + 0x6b, 0x2f, 0x70, 0x62, 0x2f, 0x63, 0x31, 0x2f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, + 0x72, 0x2f, 0x76, 0x32, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +}) + +var ( + file_c1_connector_v2_action_proto_rawDescOnce sync.Once + file_c1_connector_v2_action_proto_rawDescData []byte +) + +func file_c1_connector_v2_action_proto_rawDescGZIP() []byte { + file_c1_connector_v2_action_proto_rawDescOnce.Do(func() { + file_c1_connector_v2_action_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_c1_connector_v2_action_proto_rawDesc), len(file_c1_connector_v2_action_proto_rawDesc))) + }) + return file_c1_connector_v2_action_proto_rawDescData +} + +var file_c1_connector_v2_action_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_c1_connector_v2_action_proto_msgTypes = make([]protoimpl.MessageInfo, 9) +var file_c1_connector_v2_action_proto_goTypes = []any{ + (BatonActionStatus)(0), // 0: c1.connector.v2.BatonActionStatus + (*BatonActionSchema)(nil), // 1: c1.connector.v2.BatonActionSchema + (*ActionServiceInvokeRequest)(nil), // 2: c1.connector.v2.ActionServiceInvokeRequest + (*ActionServiceInvokeResponse)(nil), // 3: c1.connector.v2.ActionServiceInvokeResponse + (*ActionServiceStatusRequest)(nil), // 4: c1.connector.v2.ActionServiceStatusRequest + (*ActionServiceStatusResponse)(nil), // 5: c1.connector.v2.ActionServiceStatusResponse + (*ActionServiceGetSchemaRequest)(nil), // 6: c1.connector.v2.ActionServiceGetSchemaRequest + (*ActionServiceGetSchemaResponse)(nil), // 7: c1.connector.v2.ActionServiceGetSchemaResponse + (*ActionServiceListSchemasRequest)(nil), // 8: c1.connector.v2.ActionServiceListSchemasRequest + (*ActionServiceListSchemasResponse)(nil), // 9: c1.connector.v2.ActionServiceListSchemasResponse + (*v1.Field)(nil), // 10: c1.config.v1.Field + (*v1.Constraint)(nil), // 11: c1.config.v1.Constraint + (*structpb.Struct)(nil), // 12: google.protobuf.Struct + (*anypb.Any)(nil), // 13: google.protobuf.Any +} +var file_c1_connector_v2_action_proto_depIdxs = []int32{ + 10, // 0: c1.connector.v2.BatonActionSchema.arguments:type_name -> c1.config.v1.Field + 11, // 1: c1.connector.v2.BatonActionSchema.constraints:type_name -> c1.config.v1.Constraint + 10, // 2: c1.connector.v2.BatonActionSchema.return_types:type_name -> c1.config.v1.Field + 12, // 3: c1.connector.v2.ActionServiceInvokeRequest.args:type_name -> google.protobuf.Struct + 13, // 4: c1.connector.v2.ActionServiceInvokeRequest.annotations:type_name -> google.protobuf.Any + 0, // 5: c1.connector.v2.ActionServiceInvokeResponse.status:type_name -> c1.connector.v2.BatonActionStatus + 13, // 6: c1.connector.v2.ActionServiceInvokeResponse.annotations:type_name -> google.protobuf.Any + 13, // 7: c1.connector.v2.ActionServiceStatusRequest.annotations:type_name -> google.protobuf.Any + 13, // 8: c1.connector.v2.ActionServiceStatusResponse.annotations:type_name -> google.protobuf.Any + 13, // 9: c1.connector.v2.ActionServiceGetSchemaRequest.annotations:type_name -> google.protobuf.Any + 10, // 10: c1.connector.v2.ActionServiceGetSchemaResponse.arguments:type_name -> c1.config.v1.Field + 10, // 11: c1.connector.v2.ActionServiceGetSchemaResponse.return_types:type_name -> c1.config.v1.Field + 13, // 12: c1.connector.v2.ActionServiceListSchemasRequest.annotations:type_name -> google.protobuf.Any + 1, // 13: c1.connector.v2.ActionServiceListSchemasResponse.schemas:type_name -> c1.connector.v2.BatonActionSchema + 2, // 14: c1.connector.v2.ActionService.Invoke:input_type -> c1.connector.v2.ActionServiceInvokeRequest + 4, // 15: c1.connector.v2.ActionService.Status:input_type -> c1.connector.v2.ActionServiceStatusRequest + 6, // 16: c1.connector.v2.ActionService.GetSchema:input_type -> c1.connector.v2.ActionServiceGetSchemaRequest + 8, // 17: c1.connector.v2.ActionService.ListSchemas:input_type -> c1.connector.v2.ActionServiceListSchemasRequest + 3, // 18: c1.connector.v2.ActionService.Invoke:output_type -> c1.connector.v2.ActionServiceInvokeResponse + 5, // 19: c1.connector.v2.ActionService.Status:output_type -> c1.connector.v2.ActionServiceStatusResponse + 7, // 20: c1.connector.v2.ActionService.GetSchema:output_type -> c1.connector.v2.ActionServiceGetSchemaResponse + 9, // 21: c1.connector.v2.ActionService.ListSchemas:output_type -> c1.connector.v2.ActionServiceListSchemasResponse + 18, // [18:22] is the sub-list for method output_type + 14, // [14:18] is the sub-list for method input_type + 14, // [14:14] is the sub-list for extension type_name + 14, // [14:14] is the sub-list for extension extendee + 0, // [0:14] is the sub-list for field type_name +} + +func init() { file_c1_connector_v2_action_proto_init() } +func file_c1_connector_v2_action_proto_init() { + if File_c1_connector_v2_action_proto != nil { + return + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_c1_connector_v2_action_proto_rawDesc), len(file_c1_connector_v2_action_proto_rawDesc)), + NumEnums: 1, + NumMessages: 9, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_c1_connector_v2_action_proto_goTypes, + DependencyIndexes: file_c1_connector_v2_action_proto_depIdxs, + EnumInfos: file_c1_connector_v2_action_proto_enumTypes, + MessageInfos: file_c1_connector_v2_action_proto_msgTypes, + }.Build() + File_c1_connector_v2_action_proto = out.File + file_c1_connector_v2_action_proto_goTypes = nil + file_c1_connector_v2_action_proto_depIdxs = nil +} diff --git a/pb/c1/connector/v2/action.pb.validate.go b/pb/c1/connector/v2/action.pb.validate.go new file mode 100644 index 00000000..182a7927 --- /dev/null +++ b/pb/c1/connector/v2/action.pb.validate.go @@ -0,0 +1,1417 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: c1/connector/v2/action.proto + +package v2 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on BatonActionSchema with the rules defined +// in the proto definition for this message. If any rules are violated, the +// first error encountered is returned, or nil if there are no violations. +func (m *BatonActionSchema) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on BatonActionSchema with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// BatonActionSchemaMultiError, or nil if none found. +func (m *BatonActionSchema) ValidateAll() error { + return m.validate(true) +} + +func (m *BatonActionSchema) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for FunctionName + + for idx, item := range m.GetArguments() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, BatonActionSchemaValidationError{ + field: fmt.Sprintf("Arguments[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, BatonActionSchemaValidationError{ + field: fmt.Sprintf("Arguments[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return BatonActionSchemaValidationError{ + field: fmt.Sprintf("Arguments[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + for idx, item := range m.GetConstraints() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, BatonActionSchemaValidationError{ + field: fmt.Sprintf("Constraints[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, BatonActionSchemaValidationError{ + field: fmt.Sprintf("Constraints[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return BatonActionSchemaValidationError{ + field: fmt.Sprintf("Constraints[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + for idx, item := range m.GetReturnTypes() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, BatonActionSchemaValidationError{ + field: fmt.Sprintf("ReturnTypes[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, BatonActionSchemaValidationError{ + field: fmt.Sprintf("ReturnTypes[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return BatonActionSchemaValidationError{ + field: fmt.Sprintf("ReturnTypes[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + if len(errors) > 0 { + return BatonActionSchemaMultiError(errors) + } + + return nil +} + +// BatonActionSchemaMultiError is an error wrapping multiple validation errors +// returned by BatonActionSchema.ValidateAll() if the designated constraints +// aren't met. +type BatonActionSchemaMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m BatonActionSchemaMultiError) Error() string { + msgs := make([]string, 0, len(m)) + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m BatonActionSchemaMultiError) AllErrors() []error { return m } + +// BatonActionSchemaValidationError is the validation error returned by +// BatonActionSchema.Validate if the designated constraints aren't met. +type BatonActionSchemaValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e BatonActionSchemaValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e BatonActionSchemaValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e BatonActionSchemaValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e BatonActionSchemaValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e BatonActionSchemaValidationError) ErrorName() string { + return "BatonActionSchemaValidationError" +} + +// Error satisfies the builtin error interface +func (e BatonActionSchemaValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sBatonActionSchema.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = BatonActionSchemaValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = BatonActionSchemaValidationError{} + +// Validate checks the field values on ActionServiceInvokeRequest with the +// rules defined in the proto definition for this message. If any rules are +// violated, the first error encountered is returned, or nil if there are no violations. +func (m *ActionServiceInvokeRequest) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ActionServiceInvokeRequest with the +// rules defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// ActionServiceInvokeRequestMultiError, or nil if none found. +func (m *ActionServiceInvokeRequest) ValidateAll() error { + return m.validate(true) +} + +func (m *ActionServiceInvokeRequest) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for Name + + if all { + switch v := interface{}(m.GetArgs()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ActionServiceInvokeRequestValidationError{ + field: "Args", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ActionServiceInvokeRequestValidationError{ + field: "Args", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetArgs()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ActionServiceInvokeRequestValidationError{ + field: "Args", + reason: "embedded message failed validation", + cause: err, + } + } + } + + for idx, item := range m.GetAnnotations() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ActionServiceInvokeRequestValidationError{ + field: fmt.Sprintf("Annotations[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ActionServiceInvokeRequestValidationError{ + field: fmt.Sprintf("Annotations[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ActionServiceInvokeRequestValidationError{ + field: fmt.Sprintf("Annotations[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + if len(errors) > 0 { + return ActionServiceInvokeRequestMultiError(errors) + } + + return nil +} + +// ActionServiceInvokeRequestMultiError is an error wrapping multiple +// validation errors returned by ActionServiceInvokeRequest.ValidateAll() if +// the designated constraints aren't met. +type ActionServiceInvokeRequestMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ActionServiceInvokeRequestMultiError) Error() string { + msgs := make([]string, 0, len(m)) + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ActionServiceInvokeRequestMultiError) AllErrors() []error { return m } + +// ActionServiceInvokeRequestValidationError is the validation error returned +// by ActionServiceInvokeRequest.Validate if the designated constraints aren't met. +type ActionServiceInvokeRequestValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e ActionServiceInvokeRequestValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e ActionServiceInvokeRequestValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e ActionServiceInvokeRequestValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e ActionServiceInvokeRequestValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e ActionServiceInvokeRequestValidationError) ErrorName() string { + return "ActionServiceInvokeRequestValidationError" +} + +// Error satisfies the builtin error interface +func (e ActionServiceInvokeRequestValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sActionServiceInvokeRequest.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = ActionServiceInvokeRequestValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = ActionServiceInvokeRequestValidationError{} + +// Validate checks the field values on ActionServiceInvokeResponse with the +// rules defined in the proto definition for this message. If any rules are +// violated, the first error encountered is returned, or nil if there are no violations. +func (m *ActionServiceInvokeResponse) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ActionServiceInvokeResponse with the +// rules defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// ActionServiceInvokeResponseMultiError, or nil if none found. +func (m *ActionServiceInvokeResponse) ValidateAll() error { + return m.validate(true) +} + +func (m *ActionServiceInvokeResponse) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for Id + + // no validation rules for Status + + for idx, item := range m.GetAnnotations() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ActionServiceInvokeResponseValidationError{ + field: fmt.Sprintf("Annotations[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ActionServiceInvokeResponseValidationError{ + field: fmt.Sprintf("Annotations[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ActionServiceInvokeResponseValidationError{ + field: fmt.Sprintf("Annotations[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + if len(errors) > 0 { + return ActionServiceInvokeResponseMultiError(errors) + } + + return nil +} + +// ActionServiceInvokeResponseMultiError is an error wrapping multiple +// validation errors returned by ActionServiceInvokeResponse.ValidateAll() if +// the designated constraints aren't met. +type ActionServiceInvokeResponseMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ActionServiceInvokeResponseMultiError) Error() string { + msgs := make([]string, 0, len(m)) + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ActionServiceInvokeResponseMultiError) AllErrors() []error { return m } + +// ActionServiceInvokeResponseValidationError is the validation error returned +// by ActionServiceInvokeResponse.Validate if the designated constraints +// aren't met. +type ActionServiceInvokeResponseValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e ActionServiceInvokeResponseValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e ActionServiceInvokeResponseValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e ActionServiceInvokeResponseValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e ActionServiceInvokeResponseValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e ActionServiceInvokeResponseValidationError) ErrorName() string { + return "ActionServiceInvokeResponseValidationError" +} + +// Error satisfies the builtin error interface +func (e ActionServiceInvokeResponseValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sActionServiceInvokeResponse.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = ActionServiceInvokeResponseValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = ActionServiceInvokeResponseValidationError{} + +// Validate checks the field values on ActionServiceStatusRequest with the +// rules defined in the proto definition for this message. If any rules are +// violated, the first error encountered is returned, or nil if there are no violations. +func (m *ActionServiceStatusRequest) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ActionServiceStatusRequest with the +// rules defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// ActionServiceStatusRequestMultiError, or nil if none found. +func (m *ActionServiceStatusRequest) ValidateAll() error { + return m.validate(true) +} + +func (m *ActionServiceStatusRequest) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for Name + + // no validation rules for Id + + for idx, item := range m.GetAnnotations() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ActionServiceStatusRequestValidationError{ + field: fmt.Sprintf("Annotations[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ActionServiceStatusRequestValidationError{ + field: fmt.Sprintf("Annotations[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ActionServiceStatusRequestValidationError{ + field: fmt.Sprintf("Annotations[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + if len(errors) > 0 { + return ActionServiceStatusRequestMultiError(errors) + } + + return nil +} + +// ActionServiceStatusRequestMultiError is an error wrapping multiple +// validation errors returned by ActionServiceStatusRequest.ValidateAll() if +// the designated constraints aren't met. +type ActionServiceStatusRequestMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ActionServiceStatusRequestMultiError) Error() string { + msgs := make([]string, 0, len(m)) + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ActionServiceStatusRequestMultiError) AllErrors() []error { return m } + +// ActionServiceStatusRequestValidationError is the validation error returned +// by ActionServiceStatusRequest.Validate if the designated constraints aren't met. +type ActionServiceStatusRequestValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e ActionServiceStatusRequestValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e ActionServiceStatusRequestValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e ActionServiceStatusRequestValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e ActionServiceStatusRequestValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e ActionServiceStatusRequestValidationError) ErrorName() string { + return "ActionServiceStatusRequestValidationError" +} + +// Error satisfies the builtin error interface +func (e ActionServiceStatusRequestValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sActionServiceStatusRequest.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = ActionServiceStatusRequestValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = ActionServiceStatusRequestValidationError{} + +// Validate checks the field values on ActionServiceStatusResponse with the +// rules defined in the proto definition for this message. If any rules are +// violated, the first error encountered is returned, or nil if there are no violations. +func (m *ActionServiceStatusResponse) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ActionServiceStatusResponse with the +// rules defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// ActionServiceStatusResponseMultiError, or nil if none found. +func (m *ActionServiceStatusResponse) ValidateAll() error { + return m.validate(true) +} + +func (m *ActionServiceStatusResponse) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for Name + + // no validation rules for Id + + for idx, item := range m.GetAnnotations() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ActionServiceStatusResponseValidationError{ + field: fmt.Sprintf("Annotations[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ActionServiceStatusResponseValidationError{ + field: fmt.Sprintf("Annotations[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ActionServiceStatusResponseValidationError{ + field: fmt.Sprintf("Annotations[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + if len(errors) > 0 { + return ActionServiceStatusResponseMultiError(errors) + } + + return nil +} + +// ActionServiceStatusResponseMultiError is an error wrapping multiple +// validation errors returned by ActionServiceStatusResponse.ValidateAll() if +// the designated constraints aren't met. +type ActionServiceStatusResponseMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ActionServiceStatusResponseMultiError) Error() string { + msgs := make([]string, 0, len(m)) + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ActionServiceStatusResponseMultiError) AllErrors() []error { return m } + +// ActionServiceStatusResponseValidationError is the validation error returned +// by ActionServiceStatusResponse.Validate if the designated constraints +// aren't met. +type ActionServiceStatusResponseValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e ActionServiceStatusResponseValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e ActionServiceStatusResponseValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e ActionServiceStatusResponseValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e ActionServiceStatusResponseValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e ActionServiceStatusResponseValidationError) ErrorName() string { + return "ActionServiceStatusResponseValidationError" +} + +// Error satisfies the builtin error interface +func (e ActionServiceStatusResponseValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sActionServiceStatusResponse.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = ActionServiceStatusResponseValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = ActionServiceStatusResponseValidationError{} + +// Validate checks the field values on ActionServiceGetSchemaRequest with the +// rules defined in the proto definition for this message. If any rules are +// violated, the first error encountered is returned, or nil if there are no violations. +func (m *ActionServiceGetSchemaRequest) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ActionServiceGetSchemaRequest with +// the rules defined in the proto definition for this message. If any rules +// are violated, the result is a list of violation errors wrapped in +// ActionServiceGetSchemaRequestMultiError, or nil if none found. +func (m *ActionServiceGetSchemaRequest) ValidateAll() error { + return m.validate(true) +} + +func (m *ActionServiceGetSchemaRequest) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for Name + + for idx, item := range m.GetAnnotations() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ActionServiceGetSchemaRequestValidationError{ + field: fmt.Sprintf("Annotations[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ActionServiceGetSchemaRequestValidationError{ + field: fmt.Sprintf("Annotations[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ActionServiceGetSchemaRequestValidationError{ + field: fmt.Sprintf("Annotations[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + if len(errors) > 0 { + return ActionServiceGetSchemaRequestMultiError(errors) + } + + return nil +} + +// ActionServiceGetSchemaRequestMultiError is an error wrapping multiple +// validation errors returned by ActionServiceGetSchemaRequest.ValidateAll() +// if the designated constraints aren't met. +type ActionServiceGetSchemaRequestMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ActionServiceGetSchemaRequestMultiError) Error() string { + msgs := make([]string, 0, len(m)) + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ActionServiceGetSchemaRequestMultiError) AllErrors() []error { return m } + +// ActionServiceGetSchemaRequestValidationError is the validation error +// returned by ActionServiceGetSchemaRequest.Validate if the designated +// constraints aren't met. +type ActionServiceGetSchemaRequestValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e ActionServiceGetSchemaRequestValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e ActionServiceGetSchemaRequestValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e ActionServiceGetSchemaRequestValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e ActionServiceGetSchemaRequestValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e ActionServiceGetSchemaRequestValidationError) ErrorName() string { + return "ActionServiceGetSchemaRequestValidationError" +} + +// Error satisfies the builtin error interface +func (e ActionServiceGetSchemaRequestValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sActionServiceGetSchemaRequest.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = ActionServiceGetSchemaRequestValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = ActionServiceGetSchemaRequestValidationError{} + +// Validate checks the field values on ActionServiceGetSchemaResponse with the +// rules defined in the proto definition for this message. If any rules are +// violated, the first error encountered is returned, or nil if there are no violations. +func (m *ActionServiceGetSchemaResponse) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ActionServiceGetSchemaResponse with +// the rules defined in the proto definition for this message. If any rules +// are violated, the result is a list of violation errors wrapped in +// ActionServiceGetSchemaResponseMultiError, or nil if none found. +func (m *ActionServiceGetSchemaResponse) ValidateAll() error { + return m.validate(true) +} + +func (m *ActionServiceGetSchemaResponse) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + for idx, item := range m.GetArguments() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ActionServiceGetSchemaResponseValidationError{ + field: fmt.Sprintf("Arguments[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ActionServiceGetSchemaResponseValidationError{ + field: fmt.Sprintf("Arguments[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ActionServiceGetSchemaResponseValidationError{ + field: fmt.Sprintf("Arguments[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + for idx, item := range m.GetReturnTypes() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ActionServiceGetSchemaResponseValidationError{ + field: fmt.Sprintf("ReturnTypes[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ActionServiceGetSchemaResponseValidationError{ + field: fmt.Sprintf("ReturnTypes[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ActionServiceGetSchemaResponseValidationError{ + field: fmt.Sprintf("ReturnTypes[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + if len(errors) > 0 { + return ActionServiceGetSchemaResponseMultiError(errors) + } + + return nil +} + +// ActionServiceGetSchemaResponseMultiError is an error wrapping multiple +// validation errors returned by ActionServiceGetSchemaResponse.ValidateAll() +// if the designated constraints aren't met. +type ActionServiceGetSchemaResponseMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ActionServiceGetSchemaResponseMultiError) Error() string { + msgs := make([]string, 0, len(m)) + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ActionServiceGetSchemaResponseMultiError) AllErrors() []error { return m } + +// ActionServiceGetSchemaResponseValidationError is the validation error +// returned by ActionServiceGetSchemaResponse.Validate if the designated +// constraints aren't met. +type ActionServiceGetSchemaResponseValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e ActionServiceGetSchemaResponseValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e ActionServiceGetSchemaResponseValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e ActionServiceGetSchemaResponseValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e ActionServiceGetSchemaResponseValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e ActionServiceGetSchemaResponseValidationError) ErrorName() string { + return "ActionServiceGetSchemaResponseValidationError" +} + +// Error satisfies the builtin error interface +func (e ActionServiceGetSchemaResponseValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sActionServiceGetSchemaResponse.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = ActionServiceGetSchemaResponseValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = ActionServiceGetSchemaResponseValidationError{} + +// Validate checks the field values on ActionServiceListSchemasRequest with the +// rules defined in the proto definition for this message. If any rules are +// violated, the first error encountered is returned, or nil if there are no violations. +func (m *ActionServiceListSchemasRequest) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ActionServiceListSchemasRequest with +// the rules defined in the proto definition for this message. If any rules +// are violated, the result is a list of violation errors wrapped in +// ActionServiceListSchemasRequestMultiError, or nil if none found. +func (m *ActionServiceListSchemasRequest) ValidateAll() error { + return m.validate(true) +} + +func (m *ActionServiceListSchemasRequest) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + for idx, item := range m.GetAnnotations() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ActionServiceListSchemasRequestValidationError{ + field: fmt.Sprintf("Annotations[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ActionServiceListSchemasRequestValidationError{ + field: fmt.Sprintf("Annotations[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ActionServiceListSchemasRequestValidationError{ + field: fmt.Sprintf("Annotations[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + if len(errors) > 0 { + return ActionServiceListSchemasRequestMultiError(errors) + } + + return nil +} + +// ActionServiceListSchemasRequestMultiError is an error wrapping multiple +// validation errors returned by ActionServiceListSchemasRequest.ValidateAll() +// if the designated constraints aren't met. +type ActionServiceListSchemasRequestMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ActionServiceListSchemasRequestMultiError) Error() string { + msgs := make([]string, 0, len(m)) + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ActionServiceListSchemasRequestMultiError) AllErrors() []error { return m } + +// ActionServiceListSchemasRequestValidationError is the validation error +// returned by ActionServiceListSchemasRequest.Validate if the designated +// constraints aren't met. +type ActionServiceListSchemasRequestValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e ActionServiceListSchemasRequestValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e ActionServiceListSchemasRequestValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e ActionServiceListSchemasRequestValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e ActionServiceListSchemasRequestValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e ActionServiceListSchemasRequestValidationError) ErrorName() string { + return "ActionServiceListSchemasRequestValidationError" +} + +// Error satisfies the builtin error interface +func (e ActionServiceListSchemasRequestValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sActionServiceListSchemasRequest.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = ActionServiceListSchemasRequestValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = ActionServiceListSchemasRequestValidationError{} + +// Validate checks the field values on ActionServiceListSchemasResponse with +// the rules defined in the proto definition for this message. If any rules +// are violated, the first error encountered is returned, or nil if there are +// no violations. +func (m *ActionServiceListSchemasResponse) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ActionServiceListSchemasResponse with +// the rules defined in the proto definition for this message. If any rules +// are violated, the result is a list of violation errors wrapped in +// ActionServiceListSchemasResponseMultiError, or nil if none found. +func (m *ActionServiceListSchemasResponse) ValidateAll() error { + return m.validate(true) +} + +func (m *ActionServiceListSchemasResponse) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + for idx, item := range m.GetSchemas() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ActionServiceListSchemasResponseValidationError{ + field: fmt.Sprintf("Schemas[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ActionServiceListSchemasResponseValidationError{ + field: fmt.Sprintf("Schemas[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ActionServiceListSchemasResponseValidationError{ + field: fmt.Sprintf("Schemas[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + if len(errors) > 0 { + return ActionServiceListSchemasResponseMultiError(errors) + } + + return nil +} + +// ActionServiceListSchemasResponseMultiError is an error wrapping multiple +// validation errors returned by +// ActionServiceListSchemasResponse.ValidateAll() if the designated +// constraints aren't met. +type ActionServiceListSchemasResponseMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ActionServiceListSchemasResponseMultiError) Error() string { + msgs := make([]string, 0, len(m)) + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ActionServiceListSchemasResponseMultiError) AllErrors() []error { return m } + +// ActionServiceListSchemasResponseValidationError is the validation error +// returned by ActionServiceListSchemasResponse.Validate if the designated +// constraints aren't met. +type ActionServiceListSchemasResponseValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e ActionServiceListSchemasResponseValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e ActionServiceListSchemasResponseValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e ActionServiceListSchemasResponseValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e ActionServiceListSchemasResponseValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e ActionServiceListSchemasResponseValidationError) ErrorName() string { + return "ActionServiceListSchemasResponseValidationError" +} + +// Error satisfies the builtin error interface +func (e ActionServiceListSchemasResponseValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sActionServiceListSchemasResponse.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = ActionServiceListSchemasResponseValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = ActionServiceListSchemasResponseValidationError{} diff --git a/pb/c1/connector/v2/action.proto b/pb/c1/connector/v2/action.proto new file mode 100644 index 00000000..e69de29b diff --git a/pb/c1/connector/v2/action_grpc.pb.go b/pb/c1/connector/v2/action_grpc.pb.go new file mode 100644 index 00000000..d08b3b8e --- /dev/null +++ b/pb/c1/connector/v2/action_grpc.pb.go @@ -0,0 +1,233 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.5.1 +// - protoc (unknown) +// source: c1/connector/v2/action.proto + +package v2 + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.64.0 or later. +const _ = grpc.SupportPackageIsVersion9 + +const ( + ActionService_Invoke_FullMethodName = "/c1.connector.v2.ActionService/Invoke" + ActionService_Status_FullMethodName = "/c1.connector.v2.ActionService/Status" + ActionService_GetSchema_FullMethodName = "/c1.connector.v2.ActionService/GetSchema" + ActionService_ListSchemas_FullMethodName = "/c1.connector.v2.ActionService/ListSchemas" +) + +// ActionServiceClient is the client API for ActionService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type ActionServiceClient interface { + Invoke(ctx context.Context, in *ActionServiceInvokeRequest, opts ...grpc.CallOption) (*ActionServiceInvokeResponse, error) + Status(ctx context.Context, in *ActionServiceStatusRequest, opts ...grpc.CallOption) (*ActionServiceStatusResponse, error) + GetSchema(ctx context.Context, in *ActionServiceGetSchemaRequest, opts ...grpc.CallOption) (*ActionServiceGetSchemaResponse, error) + ListSchemas(ctx context.Context, in *ActionServiceListSchemasRequest, opts ...grpc.CallOption) (*ActionServiceListSchemasResponse, error) +} + +type actionServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewActionServiceClient(cc grpc.ClientConnInterface) ActionServiceClient { + return &actionServiceClient{cc} +} + +func (c *actionServiceClient) Invoke(ctx context.Context, in *ActionServiceInvokeRequest, opts ...grpc.CallOption) (*ActionServiceInvokeResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(ActionServiceInvokeResponse) + err := c.cc.Invoke(ctx, ActionService_Invoke_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *actionServiceClient) Status(ctx context.Context, in *ActionServiceStatusRequest, opts ...grpc.CallOption) (*ActionServiceStatusResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(ActionServiceStatusResponse) + err := c.cc.Invoke(ctx, ActionService_Status_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *actionServiceClient) GetSchema(ctx context.Context, in *ActionServiceGetSchemaRequest, opts ...grpc.CallOption) (*ActionServiceGetSchemaResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(ActionServiceGetSchemaResponse) + err := c.cc.Invoke(ctx, ActionService_GetSchema_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *actionServiceClient) ListSchemas(ctx context.Context, in *ActionServiceListSchemasRequest, opts ...grpc.CallOption) (*ActionServiceListSchemasResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(ActionServiceListSchemasResponse) + err := c.cc.Invoke(ctx, ActionService_ListSchemas_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +// ActionServiceServer is the server API for ActionService service. +// All implementations should embed UnimplementedActionServiceServer +// for forward compatibility. +type ActionServiceServer interface { + Invoke(context.Context, *ActionServiceInvokeRequest) (*ActionServiceInvokeResponse, error) + Status(context.Context, *ActionServiceStatusRequest) (*ActionServiceStatusResponse, error) + GetSchema(context.Context, *ActionServiceGetSchemaRequest) (*ActionServiceGetSchemaResponse, error) + ListSchemas(context.Context, *ActionServiceListSchemasRequest) (*ActionServiceListSchemasResponse, error) +} + +// UnimplementedActionServiceServer should be embedded to have +// forward compatible implementations. +// +// NOTE: this should be embedded by value instead of pointer to avoid a nil +// pointer dereference when methods are called. +type UnimplementedActionServiceServer struct{} + +func (UnimplementedActionServiceServer) Invoke(context.Context, *ActionServiceInvokeRequest) (*ActionServiceInvokeResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Invoke not implemented") +} +func (UnimplementedActionServiceServer) Status(context.Context, *ActionServiceStatusRequest) (*ActionServiceStatusResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Status not implemented") +} +func (UnimplementedActionServiceServer) GetSchema(context.Context, *ActionServiceGetSchemaRequest) (*ActionServiceGetSchemaResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetSchema not implemented") +} +func (UnimplementedActionServiceServer) ListSchemas(context.Context, *ActionServiceListSchemasRequest) (*ActionServiceListSchemasResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListSchemas not implemented") +} +func (UnimplementedActionServiceServer) testEmbeddedByValue() {} + +// UnsafeActionServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to ActionServiceServer will +// result in compilation errors. +type UnsafeActionServiceServer interface { + mustEmbedUnimplementedActionServiceServer() +} + +func RegisterActionServiceServer(s grpc.ServiceRegistrar, srv ActionServiceServer) { + // If the following call pancis, it indicates UnimplementedActionServiceServer was + // embedded by pointer and is nil. This will cause panics if an + // unimplemented method is ever invoked, so we test this at initialization + // time to prevent it from happening at runtime later due to I/O. + if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { + t.testEmbeddedByValue() + } + s.RegisterService(&ActionService_ServiceDesc, srv) +} + +func _ActionService_Invoke_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ActionServiceInvokeRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ActionServiceServer).Invoke(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: ActionService_Invoke_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ActionServiceServer).Invoke(ctx, req.(*ActionServiceInvokeRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ActionService_Status_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ActionServiceStatusRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ActionServiceServer).Status(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: ActionService_Status_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ActionServiceServer).Status(ctx, req.(*ActionServiceStatusRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ActionService_GetSchema_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ActionServiceGetSchemaRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ActionServiceServer).GetSchema(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: ActionService_GetSchema_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ActionServiceServer).GetSchema(ctx, req.(*ActionServiceGetSchemaRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ActionService_ListSchemas_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ActionServiceListSchemasRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ActionServiceServer).ListSchemas(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: ActionService_ListSchemas_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ActionServiceServer).ListSchemas(ctx, req.(*ActionServiceListSchemasRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// ActionService_ServiceDesc is the grpc.ServiceDesc for ActionService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var ActionService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "c1.connector.v2.ActionService", + HandlerType: (*ActionServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "Invoke", + Handler: _ActionService_Invoke_Handler, + }, + { + MethodName: "Status", + Handler: _ActionService_Status_Handler, + }, + { + MethodName: "GetSchema", + Handler: _ActionService_GetSchema_Handler, + }, + { + MethodName: "ListSchemas", + Handler: _ActionService_ListSchemas_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "c1/connector/v2/action.proto", +} diff --git a/proto/c1/connector/v2/action.proto b/proto/c1/connector/v2/action.proto new file mode 100644 index 00000000..a22fcfa4 --- /dev/null +++ b/proto/c1/connector/v2/action.proto @@ -0,0 +1,77 @@ +syntax = "proto3"; + +package c1.connector.v2; + +import "google/protobuf/any.proto"; +import "google/protobuf/struct.proto"; +import "c1/config/v1/config.proto"; + +option go_package = "github.com/conductorone/baton-sdk/pb/c1/connector/v2"; + + +service ActionService { + rpc Invoke(ActionServiceInvokeRequest) returns (ActionServiceInvokeResponse); + rpc Status(ActionServiceStatusRequest) returns (ActionServiceStatusResponse); + rpc GetSchema(ActionServiceGetSchemaRequest) returns (ActionServiceGetSchemaResponse); + rpc ListSchemas(ActionServiceListSchemasRequest) returns (ActionServiceListSchemasResponse); +} + +enum BatonActionStatus { + BATON_ACTION_STATUS_UNSPECIFIED = 0; + BATON_ACTION_STATUS_UNKNOWN = 1; + BATON_ACTION_STATUS_PENDING = 2; + BATON_ACTION_STATUS_RUNNING = 3; + BATON_ACTION_STATUS_COMPLETE = 4; + BATON_ACTION_STATUS_FAILED = 5; +} + +message BatonActionSchema { + string function_name = 1; + repeated c1.config.v1.Field arguments = 2; + repeated c1.config.v1.Constraint constraints = 3; + + repeated c1.config.v1.Field return_types = 4; +} + +message ActionServiceInvokeRequest { + string name = 1; + google.protobuf.Struct args = 2; + repeated google.protobuf.Any annotations = 3; +} + +message ActionServiceInvokeResponse { + string id = 1; + BatonActionStatus status = 2; + repeated google.protobuf.Any annotations = 3; +} + + +message ActionServiceStatusRequest { + string name = 1; + string id = 2; + repeated google.protobuf.Any annotations = 3; +} + +message ActionServiceStatusResponse { + string name = 1; + string id = 2; + repeated google.protobuf.Any annotations = 3; +} + +message ActionServiceGetSchemaRequest { + string name = 1; + repeated google.protobuf.Any annotations = 2; +} + +message ActionServiceGetSchemaResponse { + repeated c1.config.v1.Field arguments = 1; + repeated c1.config.v1.Field return_types = 2; +} + +message ActionServiceListSchemasRequest { + repeated google.protobuf.Any annotations = 1; +} + +message ActionServiceListSchemasResponse { + repeated BatonActionSchema schemas = 1; +}