Files
temporal/api/common/v1/api_category.go-helpers.pb.go
Yu Xia 7eae6ac604 Introduce api category into history APIs (#9435)
## What changed?
Introduce api category into history APIs


## Why?
There are some APIs we want to exclude from health check. Using API
category is a more protective way to manage this group.

## 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)
2026-03-11 14:31:19 -07:00

66 lines
1.7 KiB
Go

// Code generated by protoc-gen-go-helpers. DO NOT EDIT.
package commonspb
import (
"fmt"
"google.golang.org/protobuf/proto"
)
// Marshal an object of type ApiCategoryOptions to the protobuf v3 wire format
func (val *ApiCategoryOptions) Marshal() ([]byte, error) {
return proto.Marshal(val)
}
// Unmarshal an object of type ApiCategoryOptions from the protobuf v3 wire format
func (val *ApiCategoryOptions) Unmarshal(buf []byte) error {
return proto.Unmarshal(buf, val)
}
// Size returns the size of the object, in bytes, once serialized
func (val *ApiCategoryOptions) Size() int {
return proto.Size(val)
}
// Equal returns whether two ApiCategoryOptions 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 *ApiCategoryOptions) Equal(that interface{}) bool {
if that == nil {
return this == nil
}
var that1 *ApiCategoryOptions
switch t := that.(type) {
case *ApiCategoryOptions:
that1 = t
case ApiCategoryOptions:
that1 = &t
default:
return false
}
return proto.Equal(this, that1)
}
var (
ApiCategory_shorthandValue = map[string]int32{
"Unspecified": 0,
"Standard": 1,
"LongPoll": 2,
"System": 3,
}
)
// ApiCategoryFromString parses a ApiCategory value from either the protojson
// canonical SCREAMING_CASE enum or the traditional temporal PascalCase enum to ApiCategory
func ApiCategoryFromString(s string) (ApiCategory, error) {
if v, ok := ApiCategory_value[s]; ok {
return ApiCategory(v), nil
} else if v, ok := ApiCategory_shorthandValue[s]; ok {
return ApiCategory(v), nil
}
return ApiCategory(0), fmt.Errorf("%s is not a valid ApiCategory", s)
}