-
Notifications
You must be signed in to change notification settings - Fork 38
/
predicates.go
32 lines (24 loc) · 1.13 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
package billingaccounts
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See NOTICE.txt in the project root for license information.
type InvoiceSectionWithCreateSubPermissionOperationPredicate struct {
BillingProfileDisplayName *string
BillingProfileId *string
InvoiceSectionDisplayName *string
InvoiceSectionId *string
}
func (p InvoiceSectionWithCreateSubPermissionOperationPredicate) Matches(input InvoiceSectionWithCreateSubPermission) bool {
if p.BillingProfileDisplayName != nil && (input.BillingProfileDisplayName == nil || *p.BillingProfileDisplayName != *input.BillingProfileDisplayName) {
return false
}
if p.BillingProfileId != nil && (input.BillingProfileId == nil || *p.BillingProfileId != *input.BillingProfileId) {
return false
}
if p.InvoiceSectionDisplayName != nil && (input.InvoiceSectionDisplayName == nil || *p.InvoiceSectionDisplayName != *input.InvoiceSectionDisplayName) {
return false
}
if p.InvoiceSectionId != nil && (input.InvoiceSectionId == nil || *p.InvoiceSectionId != *input.InvoiceSectionId) {
return false
}
return true
}