-
Notifications
You must be signed in to change notification settings - Fork 38
/
Copy pathapp_log_collection_request.go
196 lines (194 loc) · 7.29 KB
/
app_log_collection_request.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
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
package models
import (
i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time"
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization"
)
// AppLogCollectionRequest entity for AppLogCollectionRequest contains all logs values.
type AppLogCollectionRequest struct {
Entity
}
// NewAppLogCollectionRequest instantiates a new AppLogCollectionRequest and sets the default values.
func NewAppLogCollectionRequest()(*AppLogCollectionRequest) {
m := &AppLogCollectionRequest{
Entity: *NewEntity(),
}
return m
}
// CreateAppLogCollectionRequestFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value
// returns a Parsable when successful
func CreateAppLogCollectionRequestFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) {
return NewAppLogCollectionRequest(), nil
}
// GetCompletedDateTime gets the completedDateTime property value. Time at which the upload log request reached a completed state if not completed yet NULL will be returned.
// returns a *Time when successful
func (m *AppLogCollectionRequest) GetCompletedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) {
val, err := m.GetBackingStore().Get("completedDateTime")
if err != nil {
panic(err)
}
if val != nil {
return val.(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)
}
return nil
}
// GetCustomLogFolders gets the customLogFolders property value. List of log folders.
// returns a []string when successful
func (m *AppLogCollectionRequest) GetCustomLogFolders()([]string) {
val, err := m.GetBackingStore().Get("customLogFolders")
if err != nil {
panic(err)
}
if val != nil {
return val.([]string)
}
return nil
}
// GetErrorMessage gets the errorMessage property value. Indicates error message if any during the upload process.
// returns a *string when successful
func (m *AppLogCollectionRequest) GetErrorMessage()(*string) {
val, err := m.GetBackingStore().Get("errorMessage")
if err != nil {
panic(err)
}
if val != nil {
return val.(*string)
}
return nil
}
// GetFieldDeserializers the deserialization information for the current model
// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful
func (m *AppLogCollectionRequest) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) {
res := m.Entity.GetFieldDeserializers()
res["completedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetTimeValue()
if err != nil {
return err
}
if val != nil {
m.SetCompletedDateTime(val)
}
return nil
}
res["customLogFolders"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetCollectionOfPrimitiveValues("string")
if err != nil {
return err
}
if val != nil {
res := make([]string, len(val))
for i, v := range val {
if v != nil {
res[i] = *(v.(*string))
}
}
m.SetCustomLogFolders(res)
}
return nil
}
res["errorMessage"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetStringValue()
if err != nil {
return err
}
if val != nil {
m.SetErrorMessage(val)
}
return nil
}
res["status"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetEnumValue(ParseAppLogUploadState)
if err != nil {
return err
}
if val != nil {
m.SetStatus(val.(*AppLogUploadState))
}
return nil
}
return res
}
// GetStatus gets the status property value. AppLogUploadStatus
// returns a *AppLogUploadState when successful
func (m *AppLogCollectionRequest) GetStatus()(*AppLogUploadState) {
val, err := m.GetBackingStore().Get("status")
if err != nil {
panic(err)
}
if val != nil {
return val.(*AppLogUploadState)
}
return nil
}
// Serialize serializes information the current object
func (m *AppLogCollectionRequest) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) {
err := m.Entity.Serialize(writer)
if err != nil {
return err
}
{
err = writer.WriteTimeValue("completedDateTime", m.GetCompletedDateTime())
if err != nil {
return err
}
}
if m.GetCustomLogFolders() != nil {
err = writer.WriteCollectionOfStringValues("customLogFolders", m.GetCustomLogFolders())
if err != nil {
return err
}
}
{
err = writer.WriteStringValue("errorMessage", m.GetErrorMessage())
if err != nil {
return err
}
}
if m.GetStatus() != nil {
cast := (*m.GetStatus()).String()
err = writer.WriteStringValue("status", &cast)
if err != nil {
return err
}
}
return nil
}
// SetCompletedDateTime sets the completedDateTime property value. Time at which the upload log request reached a completed state if not completed yet NULL will be returned.
func (m *AppLogCollectionRequest) SetCompletedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() {
err := m.GetBackingStore().Set("completedDateTime", value)
if err != nil {
panic(err)
}
}
// SetCustomLogFolders sets the customLogFolders property value. List of log folders.
func (m *AppLogCollectionRequest) SetCustomLogFolders(value []string)() {
err := m.GetBackingStore().Set("customLogFolders", value)
if err != nil {
panic(err)
}
}
// SetErrorMessage sets the errorMessage property value. Indicates error message if any during the upload process.
func (m *AppLogCollectionRequest) SetErrorMessage(value *string)() {
err := m.GetBackingStore().Set("errorMessage", value)
if err != nil {
panic(err)
}
}
// SetStatus sets the status property value. AppLogUploadStatus
func (m *AppLogCollectionRequest) SetStatus(value *AppLogUploadState)() {
err := m.GetBackingStore().Set("status", value)
if err != nil {
panic(err)
}
}
type AppLogCollectionRequestable interface {
Entityable
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable
GetCompletedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)
GetCustomLogFolders()([]string)
GetErrorMessage()(*string)
GetStatus()(*AppLogUploadState)
SetCompletedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)()
SetCustomLogFolders(value []string)()
SetErrorMessage(value *string)()
SetStatus(value *AppLogUploadState)()
}