Files
tasks/chasm/lib/callback/gen/callbackpb/v1/message.go-helpers.pb.go
Sean KaneandGitHub 8e8589034d chasm(callbacks): create placeholders for chasm callbacks archetype (#8473)
## What changed?
Create the chasm placeholder structs for `Callback` port from HSM ->
CHASM

## Why?
Port HSM -> CHASM

## How did you test it?
- [ ] built
- [ ] run locally and tested manually
- [ ] covered by existing tests
- [ ] added new unit test(s)
- [ ] added new functional test(s)
- [X] No testing needed

## Potential risks
None, this code is not used yet
2025-10-15 18:05:17 +00:00

105 lines
2.6 KiB
Go

// Code generated by protoc-gen-go-helpers. DO NOT EDIT.
package callbackspb
import (
"fmt"
"google.golang.org/protobuf/proto"
)
// Marshal an object of type CallbackState to the protobuf v3 wire format
func (val *CallbackState) Marshal() ([]byte, error) {
return proto.Marshal(val)
}
// Unmarshal an object of type CallbackState from the protobuf v3 wire format
func (val *CallbackState) Unmarshal(buf []byte) error {
return proto.Unmarshal(buf, val)
}
// Size returns the size of the object, in bytes, once serialized
func (val *CallbackState) Size() int {
return proto.Size(val)
}
// Equal returns whether two CallbackState values are equivalent by recursively
// comparing the message's fields.
// For more information see the documentation for
// https://pkg.go.dev/google.golang.org/protobuf/proto#Equal
func (this *CallbackState) Equal(that interface{}) bool {
if that == nil {
return this == nil
}
var that1 *CallbackState
switch t := that.(type) {
case *CallbackState:
that1 = t
case CallbackState:
that1 = &t
default:
return false
}
return proto.Equal(this, that1)
}
// Marshal an object of type Callback to the protobuf v3 wire format
func (val *Callback) Marshal() ([]byte, error) {
return proto.Marshal(val)
}
// Unmarshal an object of type Callback from the protobuf v3 wire format
func (val *Callback) Unmarshal(buf []byte) error {
return proto.Unmarshal(buf, val)
}
// Size returns the size of the object, in bytes, once serialized
func (val *Callback) Size() int {
return proto.Size(val)
}
// Equal returns whether two Callback values are equivalent by recursively
// comparing the message's fields.
// For more information see the documentation for
// https://pkg.go.dev/google.golang.org/protobuf/proto#Equal
func (this *Callback) Equal(that interface{}) bool {
if that == nil {
return this == nil
}
var that1 *Callback
switch t := that.(type) {
case *Callback:
that1 = t
case Callback:
that1 = &t
default:
return false
}
return proto.Equal(this, that1)
}
var (
CallbackStatus_shorthandValue = map[string]int32{
"Unspecified": 0,
"Standby": 1,
"Scheduled": 2,
"BackingOff": 3,
"Failed": 4,
"Succeeded": 5,
}
)
// CallbackStatusFromString parses a CallbackStatus value from either the protojson
// canonical SCREAMING_CASE enum or the traditional temporal PascalCase enum to CallbackStatus
func CallbackStatusFromString(s string) (CallbackStatus, error) {
if v, ok := CallbackStatus_value[s]; ok {
return CallbackStatus(v), nil
} else if v, ok := CallbackStatus_shorthandValue[s]; ok {
return CallbackStatus(v), nil
}
return CallbackStatus(0), fmt.Errorf("%s is not a valid CallbackStatus", s)
}