github.com/vmware/go-vmware-nsxt@v0.0.0-20230223012718-d31b8a1ca05e/manager/firewall_rule.go (about) 1 /* Copyright © 2017 VMware, Inc. All Rights Reserved. 2 SPDX-License-Identifier: BSD-2-Clause 3 4 Generated by: https://github.com/swagger-api/swagger-codegen.git */ 5 6 package manager 7 8 import ( 9 "github.com/vmware/go-vmware-nsxt/common" 10 ) 11 12 type FirewallRule struct { 13 14 // The server will populate this field when returing the resource. Ignored on PUT and POST. 15 Links []common.ResourceLink `json:"_links,omitempty"` 16 17 Schema string `json:"_schema,omitempty"` 18 19 Self *common.SelfResourceLink `json:"_self,omitempty"` 20 21 // 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. 22 Revision int64 `json:"_revision"` 23 24 Owner *common.OwnerResourceLink `json:"_owner,omitempty"` 25 26 // Description of this resource 27 Description string `json:"description,omitempty"` 28 29 // Defaults to ID if not set 30 DisplayName string `json:"display_name,omitempty"` 31 32 // Identifier of the resource 33 Id string `json:"id,omitempty"` 34 35 // The type of this resource. 36 ResourceType string `json:"resource_type,omitempty"` 37 38 // Action enforced on the packets which matches the firewall rule. 39 Action string `json:"action"` 40 41 // List of object where rule will be enforced. The section level field overrides this one. Null will be treated as any. 42 AppliedTos []common.ResourceReference `json:"applied_tos,omitempty"` 43 44 // List of the destinations. Null will be treated as any. 45 Destinations []common.ResourceReference `json:"destinations,omitempty"` 46 47 // Negation of the destination. 48 DestinationsExcluded bool `json:"destinations_excluded,omitempty"` 49 50 // 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. 51 Direction string `json:"direction,omitempty"` 52 53 // Flag to disable rule. Disabled will only be persisted but never provisioned/realized. 54 Disabled bool `json:"disabled,omitempty"` 55 56 // Type of IP packet that should be matched while enforcing the rule. 57 IpProtocol string `json:"ip_protocol,omitempty"` 58 59 // Flag to indicate whether rule is default. 60 IsDefault bool `json:"is_default,omitempty"` 61 62 // Flag to enable packet logging. Default is disabled. 63 Logged bool `json:"logged,omitempty"` 64 65 // User notes specific to the rule. 66 Notes string `json:"notes,omitempty"` 67 68 // User level field which will be printed in CLI and packet logs. 69 RuleTag string `json:"rule_tag,omitempty"` 70 71 // List of the services. Null will be treated as any. 72 Services []FirewallService `json:"services,omitempty"` 73 74 // List of sources. Null will be treated as any. 75 Sources []common.ResourceReference `json:"sources,omitempty"` 76 77 // Negation of the source. 78 SourcesExcluded bool `json:"sources_excluded,omitempty"` 79 }