/
type-volume-snaplock-attributes.go
45 lines (37 loc) · 1.4 KB
/
type-volume-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
package azgo
import (
"encoding/xml"
"reflect"
log "github.com/sirupsen/logrus"
)
// VolumeSnaplockAttributesType is a structure to represent a volume-snaplock-attributes ZAPI object
type VolumeSnaplockAttributesType struct {
XMLName xml.Name `xml:"volume-snaplock-attributes"`
SnaplockTypePtr *SnaplocktypeType `xml:"snaplock-type"`
}
// NewVolumeSnaplockAttributesType is a factory method for creating new instances of VolumeSnaplockAttributesType objects
func NewVolumeSnaplockAttributesType() *VolumeSnaplockAttributesType {
return &VolumeSnaplockAttributesType{}
}
// ToXML converts this object into an xml string representation
func (o *VolumeSnaplockAttributesType) 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 VolumeSnaplockAttributesType) String() string {
return ToString(reflect.ValueOf(o))
}
// SnaplockType is a 'getter' method
func (o *VolumeSnaplockAttributesType) SnaplockType() SnaplocktypeType {
r := *o.SnaplockTypePtr
return r
}
// SetSnaplockType is a fluent style 'setter' method that can be chained
func (o *VolumeSnaplockAttributesType) SetSnaplockType(newValue SnaplocktypeType) *VolumeSnaplockAttributesType {
o.SnaplockTypePtr = &newValue
return o
}