-
Notifications
You must be signed in to change notification settings - Fork 38
/
model_jobrunproperties.go
77 lines (67 loc) · 3.52 KB
/
model_jobrunproperties.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
package jobruns
import (
"time"
"github.com/hashicorp/go-azure-helpers/lang/dates"
)
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See NOTICE.txt in the project root for license information.
type JobRunProperties struct {
AgentName *string `json:"agentName,omitempty"`
AgentResourceId *string `json:"agentResourceId,omitempty"`
BytesExcluded *int64 `json:"bytesExcluded,omitempty"`
BytesFailed *int64 `json:"bytesFailed,omitempty"`
BytesNoTransferNeeded *int64 `json:"bytesNoTransferNeeded,omitempty"`
BytesScanned *int64 `json:"bytesScanned,omitempty"`
BytesTransferred *int64 `json:"bytesTransferred,omitempty"`
BytesUnsupported *int64 `json:"bytesUnsupported,omitempty"`
Error *JobRunError `json:"error,omitempty"`
ExecutionEndTime *string `json:"executionEndTime,omitempty"`
ExecutionStartTime *string `json:"executionStartTime,omitempty"`
ItemsExcluded *int64 `json:"itemsExcluded,omitempty"`
ItemsFailed *int64 `json:"itemsFailed,omitempty"`
ItemsNoTransferNeeded *int64 `json:"itemsNoTransferNeeded,omitempty"`
ItemsScanned *int64 `json:"itemsScanned,omitempty"`
ItemsTransferred *int64 `json:"itemsTransferred,omitempty"`
ItemsUnsupported *int64 `json:"itemsUnsupported,omitempty"`
JobDefinitionProperties *interface{} `json:"jobDefinitionProperties,omitempty"`
LastStatusUpdate *string `json:"lastStatusUpdate,omitempty"`
ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"`
ScanStatus *JobRunScanStatus `json:"scanStatus,omitempty"`
SourceName *string `json:"sourceName,omitempty"`
SourceProperties *interface{} `json:"sourceProperties,omitempty"`
SourceResourceId *string `json:"sourceResourceId,omitempty"`
Status *JobRunStatus `json:"status,omitempty"`
TargetName *string `json:"targetName,omitempty"`
TargetProperties *interface{} `json:"targetProperties,omitempty"`
TargetResourceId *string `json:"targetResourceId,omitempty"`
}
func (o *JobRunProperties) GetExecutionEndTimeAsTime() (*time.Time, error) {
if o.ExecutionEndTime == nil {
return nil, nil
}
return dates.ParseAsFormat(o.ExecutionEndTime, "2006-01-02T15:04:05Z07:00")
}
func (o *JobRunProperties) SetExecutionEndTimeAsTime(input time.Time) {
formatted := input.Format("2006-01-02T15:04:05Z07:00")
o.ExecutionEndTime = &formatted
}
func (o *JobRunProperties) GetExecutionStartTimeAsTime() (*time.Time, error) {
if o.ExecutionStartTime == nil {
return nil, nil
}
return dates.ParseAsFormat(o.ExecutionStartTime, "2006-01-02T15:04:05Z07:00")
}
func (o *JobRunProperties) SetExecutionStartTimeAsTime(input time.Time) {
formatted := input.Format("2006-01-02T15:04:05Z07:00")
o.ExecutionStartTime = &formatted
}
func (o *JobRunProperties) GetLastStatusUpdateAsTime() (*time.Time, error) {
if o.LastStatusUpdate == nil {
return nil, nil
}
return dates.ParseAsFormat(o.LastStatusUpdate, "2006-01-02T15:04:05Z07:00")
}
func (o *JobRunProperties) SetLastStatusUpdateAsTime(input time.Time) {
formatted := input.Format("2006-01-02T15:04:05Z07:00")
o.LastStatusUpdate = &formatted
}