/
firewall_rule.go
79 lines (52 loc) · 2.9 KB
/
firewall_rule.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
/* Copyright © 2017 VMware, Inc. All Rights Reserved.
SPDX-License-Identifier: BSD-2-Clause
Generated by: https://github.com/swagger-api/swagger-codegen.git */
package manager
import (
"github.com/vmware/go-vmware-nsxt/common"
)
type FirewallRule struct {
// The server will populate this field when returing the resource. Ignored on PUT and POST.
Links []common.ResourceLink `json:"_links,omitempty"`
Schema string `json:"_schema,omitempty"`
Self *common.SelfResourceLink `json:"_self,omitempty"`
// The _revision property describes the current revision of the resource. To prevent clients from overwriting each other's changes, PUT operations must include the current _revision of the resource, which clients should obtain by issuing a GET operation. If the _revision provided in a PUT request is missing or stale, the operation will be rejected.
Revision int64 `json:"_revision"`
Owner *common.OwnerResourceLink `json:"_owner,omitempty"`
// Description of this resource
Description string `json:"description,omitempty"`
// Defaults to ID if not set
DisplayName string `json:"display_name,omitempty"`
// Identifier of the resource
Id string `json:"id,omitempty"`
// The type of this resource.
ResourceType string `json:"resource_type,omitempty"`
// Action enforced on the packets which matches the firewall rule.
Action string `json:"action"`
// List of object where rule will be enforced. The section level field overrides this one. Null will be treated as any.
AppliedTos []common.ResourceReference `json:"applied_tos,omitempty"`
// List of the destinations. Null will be treated as any.
Destinations []common.ResourceReference `json:"destinations,omitempty"`
// Negation of the destination.
DestinationsExcluded bool `json:"destinations_excluded,omitempty"`
// Rule direction in case of stateless firewall rules. This will only considered if section level parameter is set to stateless. Default to IN_OUT if not specified.
Direction string `json:"direction,omitempty"`
// Flag to disable rule. Disabled will only be persisted but never provisioned/realized.
Disabled bool `json:"disabled,omitempty"`
// Type of IP packet that should be matched while enforcing the rule.
IpProtocol string `json:"ip_protocol,omitempty"`
// Flag to indicate whether rule is default.
IsDefault bool `json:"is_default,omitempty"`
// Flag to enable packet logging. Default is disabled.
Logged bool `json:"logged,omitempty"`
// User notes specific to the rule.
Notes string `json:"notes,omitempty"`
// User level field which will be printed in CLI and packet logs.
RuleTag string `json:"rule_tag,omitempty"`
// List of the services. Null will be treated as any.
Services []FirewallService `json:"services,omitempty"`
// List of sources. Null will be treated as any.
Sources []common.ResourceReference `json:"sources,omitempty"`
// Negation of the source.
SourcesExcluded bool `json:"sources_excluded,omitempty"`
}