-
Notifications
You must be signed in to change notification settings - Fork 1
/
trace_behavior_trace_behavior_type.go
83 lines (65 loc) · 2.69 KB
/
trace_behavior_trace_behavior_type.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
// Code generated by go-swagger; DO NOT EDIT.
package models
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command
import (
"context"
"encoding/json"
"github.com/go-openapi/errors"
"github.com/go-openapi/strfmt"
"github.com/go-openapi/validate"
)
// TraceBehaviorTraceBehaviorType - TYPE_KEEP_ALL: Keep all traces.
// - TYPE_DROP_ALL: Drop all traces.
// - TYPE_BASELINE: Keep traces based on a default sample rate and additional sample rates for fast, slow, and error traces.
//
// swagger:model TraceBehaviorTraceBehaviorType
type TraceBehaviorTraceBehaviorType string
func NewTraceBehaviorTraceBehaviorType(value TraceBehaviorTraceBehaviorType) *TraceBehaviorTraceBehaviorType {
return &value
}
// Pointer returns a pointer to a freshly-allocated TraceBehaviorTraceBehaviorType.
func (m TraceBehaviorTraceBehaviorType) Pointer() *TraceBehaviorTraceBehaviorType {
return &m
}
const (
// TraceBehaviorTraceBehaviorTypeTYPEKEEPALL captures enum value "TYPE_KEEP_ALL"
TraceBehaviorTraceBehaviorTypeTYPEKEEPALL TraceBehaviorTraceBehaviorType = "TYPE_KEEP_ALL"
// TraceBehaviorTraceBehaviorTypeTYPEDROPALL captures enum value "TYPE_DROP_ALL"
TraceBehaviorTraceBehaviorTypeTYPEDROPALL TraceBehaviorTraceBehaviorType = "TYPE_DROP_ALL"
// TraceBehaviorTraceBehaviorTypeTYPEBASELINE captures enum value "TYPE_BASELINE"
TraceBehaviorTraceBehaviorTypeTYPEBASELINE TraceBehaviorTraceBehaviorType = "TYPE_BASELINE"
)
// for schema
var traceBehaviorTraceBehaviorTypeEnum []interface{}
func init() {
var res []TraceBehaviorTraceBehaviorType
if err := json.Unmarshal([]byte(`["TYPE_KEEP_ALL","TYPE_DROP_ALL","TYPE_BASELINE"]`), &res); err != nil {
panic(err)
}
for _, v := range res {
traceBehaviorTraceBehaviorTypeEnum = append(traceBehaviorTraceBehaviorTypeEnum, v)
}
}
func (m TraceBehaviorTraceBehaviorType) validateTraceBehaviorTraceBehaviorTypeEnum(path, location string, value TraceBehaviorTraceBehaviorType) error {
if err := validate.EnumCase(path, location, value, traceBehaviorTraceBehaviorTypeEnum, true); err != nil {
return err
}
return nil
}
// Validate validates this trace behavior trace behavior type
func (m TraceBehaviorTraceBehaviorType) Validate(formats strfmt.Registry) error {
var res []error
// value enum
if err := m.validateTraceBehaviorTraceBehaviorTypeEnum("", "body", m); err != nil {
return err
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
// ContextValidate validates this trace behavior trace behavior type based on context it is used
func (m TraceBehaviorTraceBehaviorType) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
return nil
}