-
Notifications
You must be signed in to change notification settings - Fork 40
/
predicates.go
62 lines (48 loc) · 1.65 KB
/
predicates.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
package scriptexecutionhistory
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See NOTICE.txt in the project root for license information.
type RuntimeScriptActionDetailOperationPredicate struct {
ApplicationName *string
DebugInformation *string
EndTime *string
Name *string
Operation *string
Parameters *string
ScriptExecutionId *int64
StartTime *string
Status *string
Uri *string
}
func (p RuntimeScriptActionDetailOperationPredicate) Matches(input RuntimeScriptActionDetail) bool {
if p.ApplicationName != nil && (input.ApplicationName == nil || *p.ApplicationName != *input.ApplicationName) {
return false
}
if p.DebugInformation != nil && (input.DebugInformation == nil || *p.DebugInformation != *input.DebugInformation) {
return false
}
if p.EndTime != nil && (input.EndTime == nil || *p.EndTime != *input.EndTime) {
return false
}
if p.Name != nil && *p.Name != input.Name {
return false
}
if p.Operation != nil && (input.Operation == nil || *p.Operation != *input.Operation) {
return false
}
if p.Parameters != nil && (input.Parameters == nil || *p.Parameters != *input.Parameters) {
return false
}
if p.ScriptExecutionId != nil && (input.ScriptExecutionId == nil || *p.ScriptExecutionId != *input.ScriptExecutionId) {
return false
}
if p.StartTime != nil && (input.StartTime == nil || *p.StartTime != *input.StartTime) {
return false
}
if p.Status != nil && (input.Status == nil || *p.Status != *input.Status) {
return false
}
if p.Uri != nil && *p.Uri != input.Uri {
return false
}
return true
}