generated from dogmatiq/template-go
-
Notifications
You must be signed in to change notification settings - Fork 0
/
uuid_primo.pb.go
62 lines (53 loc) 路 1.62 KB
/
uuid_primo.pb.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
// Code generated by protoc-gen-go-primo. DO NOT EDIT.
// versions:
// protoc-gen-go-primo v
// protoc v5.26.0
// source: github.com/dogmatiq/enginekit/protobuf/uuidpb/uuid.proto
package uuidpb
type UUIDBuilder struct {
prototype UUID
}
// NewUUIDBuilder returns a builder that constructs [UUID] messages.
func NewUUIDBuilder() *UUIDBuilder {
return &UUIDBuilder{}
}
// From configures the builder to use x as the prototype for new messages,
// then returns b.
//
// It performs a shallow copy of x, such that any changes made via the builder
// do not modify x. It does not make a copy of the field values themselves.
func (b *UUIDBuilder) From(x *UUID) *UUIDBuilder {
b.prototype.Upper = x.Upper
b.prototype.Lower = x.Lower
return b
}
// Build returns a new [UUID] containing the values configured via the builder.
//
// Each call returns a new message, such that future changes to the builder do
// not modify previously constructed messages.
func (b *UUIDBuilder) Build() *UUID {
return &UUID{
Upper: b.prototype.Upper,
Lower: b.prototype.Lower,
}
}
// WithUpper configures the builder to set the Upper field to v,
// then returns b.
func (b *UUIDBuilder) WithUpper(v uint64) *UUIDBuilder {
b.prototype.Upper = v
return b
}
// WithLower configures the builder to set the Lower field to v,
// then returns b.
func (b *UUIDBuilder) WithLower(v uint64) *UUIDBuilder {
b.prototype.Lower = v
return b
}
// SetUpper sets the x.Upper field to v, then returns x.
func (x *UUID) SetUpper(v uint64) {
x.Upper = v
}
// SetLower sets the x.Lower field to v, then returns x.
func (x *UUID) SetLower(v uint64) {
x.Lower = v
}