-
Notifications
You must be signed in to change notification settings - Fork 1
/
plan_assignment_custom.pb.object_ext.go
98 lines (79 loc) · 2.81 KB
/
plan_assignment_custom.pb.object_ext.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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
// Code generated by protoc-gen-goten-object
// File: edgelq/limits/proto/v1alpha2/plan_assignment_custom.proto
// DO NOT EDIT!!!
package plan_assignment_client
import (
"fmt"
"sort"
"google.golang.org/protobuf/proto"
"google.golang.org/protobuf/types/known/fieldmaskpb"
gotenobject "github.com/cloudwan/goten-sdk/runtime/object"
)
// proto imports
import (
plan_assignment "github.com/cloudwan/edgelq-sdk/limits/resources/v1alpha2/plan_assignment"
)
// ensure the imports are used
var (
_ = new(fmt.Stringer)
_ = new(sort.Interface)
_ = new(proto.Message)
_ = fieldmaskpb.FieldMask{}
_ = new(gotenobject.FieldPath)
)
// make sure we're using proto imports
var (
_ = &plan_assignment.PlanAssignment{}
)
func (o *MigratePlanAssignmentRequest) GotenObjectExt() {}
func (o *MigratePlanAssignmentRequest) MakeFullFieldMask() *MigratePlanAssignmentRequest_FieldMask {
return FullMigratePlanAssignmentRequest_FieldMask()
}
func (o *MigratePlanAssignmentRequest) MakeRawFullFieldMask() gotenobject.FieldMask {
return FullMigratePlanAssignmentRequest_FieldMask()
}
func (o *MigratePlanAssignmentRequest) MakeDiffFieldMask(other *MigratePlanAssignmentRequest) *MigratePlanAssignmentRequest_FieldMask {
if o == nil && other == nil {
return &MigratePlanAssignmentRequest_FieldMask{}
}
if o == nil || other == nil {
return FullMigratePlanAssignmentRequest_FieldMask()
}
res := &MigratePlanAssignmentRequest_FieldMask{}
{
subMask := o.GetPlanAssignment().MakeDiffFieldMask(other.GetPlanAssignment())
if subMask.IsFull() {
res.Paths = append(res.Paths, &MigratePlanAssignmentRequest_FieldTerminalPath{selector: MigratePlanAssignmentRequest_FieldPathSelectorPlanAssignment})
} else {
for _, subpath := range subMask.Paths {
res.Paths = append(res.Paths, &MigratePlanAssignmentRequest_FieldSubPath{selector: MigratePlanAssignmentRequest_FieldPathSelectorPlanAssignment, subPath: subpath})
}
}
}
return res
}
func (o *MigratePlanAssignmentRequest) MakeRawDiffFieldMask(other gotenobject.GotenObjectExt) gotenobject.FieldMask {
return o.MakeDiffFieldMask(other.(*MigratePlanAssignmentRequest))
}
func (o *MigratePlanAssignmentRequest) Clone() *MigratePlanAssignmentRequest {
if o == nil {
return nil
}
result := &MigratePlanAssignmentRequest{}
result.PlanAssignment = o.PlanAssignment.Clone()
return result
}
func (o *MigratePlanAssignmentRequest) CloneRaw() gotenobject.GotenObjectExt {
return o.Clone()
}
func (o *MigratePlanAssignmentRequest) Merge(source *MigratePlanAssignmentRequest) {
if source.GetPlanAssignment() != nil {
if o.PlanAssignment == nil {
o.PlanAssignment = new(plan_assignment.PlanAssignment)
}
o.PlanAssignment.Merge(source.GetPlanAssignment())
}
}
func (o *MigratePlanAssignmentRequest) MergeRaw(source gotenobject.GotenObjectExt) {
o.Merge(source.(*MigratePlanAssignmentRequest))
}