/
type-aggr-snaplock-attributes.go
58 lines (48 loc) · 1.71 KB
/
type-aggr-snaplock-attributes.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
package azgo
import (
"encoding/xml"
"reflect"
log "github.com/sirupsen/logrus"
)
// AggrSnaplockAttributesType is a structure to represent a aggr-snaplock-attributes ZAPI object
type AggrSnaplockAttributesType struct {
XMLName xml.Name `xml:"aggr-snaplock-attributes"`
IsSnaplockPtr *bool `xml:"is-snaplock"`
SnaplockTypePtr *string `xml:"snaplock-type"`
}
// NewAggrSnaplockAttributesType is a factory method for creating new instances of AggrSnaplockAttributesType objects
func NewAggrSnaplockAttributesType() *AggrSnaplockAttributesType {
return &AggrSnaplockAttributesType{}
}
// ToXML converts this object into an xml string representation
func (o *AggrSnaplockAttributesType) ToXML() (string, error) {
output, err := xml.MarshalIndent(o, " ", " ")
if err != nil {
log.Errorf("error: %v", err)
}
return string(output), err
}
// String returns a string representation of this object's fields and implements the Stringer interface
func (o AggrSnaplockAttributesType) String() string {
return ToString(reflect.ValueOf(o))
}
// IsSnaplock is a 'getter' method
func (o *AggrSnaplockAttributesType) IsSnaplock() bool {
r := *o.IsSnaplockPtr
return r
}
// SetIsSnaplock is a fluent style 'setter' method that can be chained
func (o *AggrSnaplockAttributesType) SetIsSnaplock(newValue bool) *AggrSnaplockAttributesType {
o.IsSnaplockPtr = &newValue
return o
}
// SnaplockType is a 'getter' method
func (o *AggrSnaplockAttributesType) SnaplockType() string {
r := *o.SnaplockTypePtr
return r
}
// SetSnaplockType is a fluent style 'setter' method that can be chained
func (o *AggrSnaplockAttributesType) SetSnaplockType(newValue string) *AggrSnaplockAttributesType {
o.SnaplockTypePtr = &newValue
return o
}