github.com/vmware/go-vmware-nsxt@v0.0.0-20230223012718-d31b8a1ca05e/manager/nat_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 NatRule 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 // Timestamp of resource creation 25 CreateTime int64 `json:"_create_time,omitempty"` 26 27 // ID of the user who created this resource 28 CreateUser string `json:"_create_user,omitempty"` 29 30 // Timestamp of last modification 31 LastModifiedTime int64 `json:"_last_modified_time,omitempty"` 32 33 // ID of the user who last modified this resource 34 LastModifiedUser string `json:"_last_modified_user,omitempty"` 35 36 // Indicates system owned resource 37 SystemOwned bool `json:"_system_owned,omitempty"` 38 39 // Description of this resource 40 Description string `json:"description,omitempty"` 41 42 // Defaults to ID if not set 43 DisplayName string `json:"display_name,omitempty"` 44 45 // Unique identifier of this resource 46 Id string `json:"id,omitempty"` 47 48 // The type of this resource. 49 ResourceType string `json:"resource_type,omitempty"` 50 51 // Opaque identifiers meaningful to the API user 52 Tags []common.Tag `json:"tags,omitempty"` 53 54 // valid actions: SNAT, DNAT, NO_NAT, REFLEXIVE. All rules in a logical router are either stateless or stateful. Mix is not supported. SNAT and DNAT are stateful, can NOT be supported when the logical router is running at active-active HA mode; REFLEXIVE is stateless. NO_NAT has no translated_fields, only match fields. 55 Action string `json:"action"` 56 57 // enable/disable the rule 58 Enabled bool `json:"enabled"` 59 60 // enable/disable the logging of rule 61 Logging bool `json:"logging"` 62 63 // Logical router id 64 LogicalRouterId string `json:"logical_router_id,omitempty"` 65 66 // IP Address | CIDR | (null implies Any) 67 MatchDestinationNetwork string `json:"match_destination_network,omitempty"` 68 69 // A NSServiceElement that specifies the matching services of source ports, destination ports, ip protocol version and number, sub protocol version and number, ICMP type and code, etc. 70 MatchService *NsServiceElement `json:"match_service,omitempty"` 71 72 // IP Address | CIDR | (null implies Any) 73 MatchSourceNetwork string `json:"match_source_network,omitempty"` 74 75 // Default is true. If the nat_pass is set to true, the following firewall stage will be skipped. Please note, if action is NO_NAT, then nat_pass must be set to true or omitted. 76 NatPass bool `json:"nat_pass"` 77 78 // Ascending, valid range [0-2147483647]. If multiple rules have the same priority, evaluation sequence is undefined. 79 RulePriority int64 `json:"rule_priority,omitempty"` 80 81 // IP Address | IP Range | CIDR 82 TranslatedNetwork string `json:"translated_network,omitempty"` 83 84 // port number or port range. DNAT only 85 TranslatedPorts string `json:"translated_ports,omitempty"` 86 }