Passed
Push — master ( b0a384...ad04e3 )
by eval
01:25
created

pinpointemail.Tag.ToEmailTag   A

Complexity

Conditions 3

Size

Total Lines 10
Code Lines 7

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 3
eloc 7
nop 0
dl 0
loc 10
rs 10
c 0
b 0
f 0
1
package pinpointemail
2
3
import (
4
	SDK "github.com/aws/aws-sdk-go-v2/service/pinpointemail"
5
6
	"github.com/evalphobia/aws-sdk-go-v2-wrapper/private/pointers"
7
)
8
9
type Tag struct {
0 ignored issues
show
introduced by
exported type Tag should have comment or be unexported
Loading history...
10
	Key   string
11
	Value string
12
}
13
14
func (r Tag) ToSDK() SDK.Tag {
0 ignored issues
show
introduced by
exported method Tag.ToSDK should have comment or be unexported
Loading history...
15
	o := SDK.Tag{}
16
17
	if r.Key != "" {
18
		o.Key = pointers.String(r.Key)
19
	}
20
	if r.Value != "" {
21
		o.Value = pointers.String(r.Value)
22
	}
23
	return o
24
}
25
26
func (r Tag) ToEmailTag() SDK.MessageTag {
0 ignored issues
show
introduced by
exported method Tag.ToEmailTag should have comment or be unexported
Loading history...
27
	o := SDK.MessageTag{}
28
29
	if r.Key != "" {
30
		o.Name = pointers.String(r.Key)
31
	}
32
	if r.Value != "" {
33
		o.Value = pointers.String(r.Value)
34
	}
35
	return o
36
}
37