# Class NatRule

© 2019 Palo Alto Networks, Inc. All rights reserved.

Licensed under SCRIPT SOFTWARE AGREEMENT, Palo Alto Networks, Inc., at https://www.paloaltonetworks.com/legal/script-software-license-1-0.pdf

  Rule uses PathableName, centralServiceStoreUser, centralAddressStoreUser, ObjectWithDescription, XmlConvertible
  NatRule

Located at rule-classes/NatRule.php

Methods summary
`public` | # `__construct( `RuleStore` $owner, boolean $fromTemplateXML = FALSE )` #### Parameters $owner ``RuleStore`` $owner $fromTemplateXML `boolean` $fromTemplateXML
`public` | # `load_from_domxml( mixed $xml )`
`public` | # `referencedObjectRenamed( mixed $h, mixed $oldname = "" )`
`public boolean` | # `replaceReferencedObject( `ReferenceableObject` $old, `ReferenceableObject` $new )` #### Parameters $old ``ReferenceableObject`` $old $new ``ReferenceableObject`` $new #### Returns `boolean` #### Throws ``Exception``
`public boolean` | # `API_replaceReferencedObject( mixed $old, mixed $new )` #### Parameters $old `mixed` $old AddressGroup|Address|Service|ServiceGroup $new `mixed` $new Address|AddressGroup|Service|ServiceGroup #### Returns `boolean` #### Throws ``Exception``
`public` | # `rewriteSNAT_XML( )`
`public` | # `setBiDirectional( boolean $yes )` #### Parameters $yes `boolean` $yes
`public boolean` | # `isBiDirectional( )` #### Returns `boolean`
`public` | # `changeSourceNAT( mixed $newtype, mixed $interface = null, mixed $bidirectional = FALSE )`
`public` | # `setNoDNAT( )` Reset DNAT to none Reset DNAT to none
`public` | # `API_setNoDNAT( )`
`public boolean` | # `setDNAT( `Address`|`AddressGroup` $host, null $ports = null, mixed $type = 'static' )` #### Parameters $host ``Address`|`AddressGroup`` $host $ports `null` $ports $type #### Returns `boolean` #### Throws ``Exception``
`public` | # `API_setDNAT( mixed $host, mixed $ports = null, mixed $type = 'static' )`
`public` | # `rewriteDNAT( )`
`public` | # `setNoSNAT( )`
`public` | # `API_setNoSNAT( )`
`public` | # `setDestinationInterface( mixed $newDestinationInterface )`
`public` | # `setSNATInterface( mixed $newSNATInterface )`
`public boolean` | # `setService( mixed $newServiceObject )` #### Parameters $newServiceObject `mixed` $newServiceObject Service|ServiceGroup|null use null to set ANY #### Returns `boolean` return true if any change was made
`public boolean` | # `API_setService( mixed $newServiceObject )` #### Parameters $newServiceObject `mixed` $newServiceObject Service|ServiceGroup|null use null to set ANY #### Returns `boolean` return true if any change was made
`public` | # `reLinkObjects( )`
`public` | # `rewriteService_XML( )`
`public` | # `display( mixed $padding = 0 )`
`public` | # `destinationInterface( )`
`public` | # `destinationNatIsEnabled( )`
`public string` | # `sourceNatIsEnabled( )` #### Returns `string` options are : 'none' , 'dynamic-ip', 'dynamic-ip-and-port', 'static-ip'
`public` | # `SourceNat_Type( )`
`public` | # `sourceNatTypeIs_None( )`
`public` | # `sourceNatTypeIs_Dynamic( )`
`public` | # `sourceNatTypeIs_DIPP( )`
`public` | # `sourceNatTypeIs_Static( )`
`public` | # `hasDestinationInterface( )`
`public` | # `isNatRule( )` #### Overrides `Rule::isNatRule()`
`public` | # `cleanForDestruction( )`
`public` | # `storeVariableName( )`
`public` | # `ruleNature( )` #### Overrides `Rule::ruleNature()`

Methods inherited from Rule
`API_clearPolicyAppUsageDATA(), API_setDisabled(), API_setEnabled(), API_setName(), API_target_addDevice(), API_target_negateSet(), API_target_removeDevice(), API_target_setAny(), getXPath(), isAppOverrideRule(), isAuthenticationRule(), isCaptivePortalRule(), isDecryptionRule(), isDisabled(), isDoSRule(), isEnabled(), isPbfRule(), isPostRule(), isPreRule(), isQoSRule(), isSecurityRule(), load_common_from_domxml(), load_destination(), load_from(), load_source(), load_to(), name(), rewriteSDisabled_XML(), setDisabled(), setEnabled(), setName(), target_addDevice(), target_hasDeviceAndVsys(), target_isAny(), target_isNegated(), target_negateSet(), target_removeDevice(), target_rewriteXML(), target_setAny(), targets(), targets_toString(), uuid(), zoneCalculation(), zoneCalculationNatClone()`

Methods used from PathableName
`(), (), ()`

Methods used from centralServiceStoreUser
`()`

Methods used from centralAddressStoreUser
`()`

Methods used from ObjectWithDescription
`(), (), (), (), ()`

Methods used from XmlConvertible
`(), (), (), (), ()`

Properties summary
`public null|`Service`|`ServiceGroup`` | $service | `null` | # $service Destination port associated to this NatRule. Null means 'any' $service Destination port associated to this NatRule. Null means 'any'
`protected string` | $snattype | `'none'` | #
`public `AddressRuleContainer`|null` | $snathosts | `null` | #
`public null|string` | $snatinterface | `null` | #
`public null|`Address`|`AddressGroup`` | $dnathost | `null` | #
`public string` | $dnattype | `"none"` | #
`public null|string` | $dnatports | `null` | #
`public null|`DOMElement`` | $snatroot | `null` | #
`protected null|`EthernetInterface`|`AggregateEthernetInterface`|`IPsecTunnel`|`LoopbackInterface`|`TmpInterface`` | $_destinationInterface | `null` | #
`public static string` | $templatexml | `'<entry name="**temporarynamechangeme**"><from><member>any</member></from><to><member>any</member></to> <source><member>any</member></source><destination><member>any</member></destination><service>any</service><disabled>no</disabled></entry>'` | #
`protected static mixed` | $templatexmlroot | `null` | #

Properties inherited from Rule
`$_targetIsNegated, $_targets, $destination, $disabled, $from, $name, $owner, $services, $source, $tags, $to`

Properties used from centralServiceStoreUser
`$parentServiceStore`

Properties used from centralAddressStoreUser
`$parentAddressStore`

Properties used from ObjectWithDescription
`$_description`

Properties used from XmlConvertible
`$xmlroot`

Magic properties used from PathableName
`$name, $owner`

Magic properties used from ObjectWithDescription
`$xmlroot`