예제 #1
0
 /**
  * Creates an ip forwarding rule
  *
  * @param CreateIpForwardingRuleData $requestData Create ip rule data object
  * @return ForwardingRuleResponseData
  */
 public function createIpForwardingRule(CreateIpForwardingRuleData $requestData)
 {
     $result = null;
     $response = $this->getClient()->call('createIpForwardingRule', $requestData->toArray());
     if ($response->hasError() === false) {
         $resultObject = $response->getResult();
         if (!empty($resultObject)) {
             $result = $this->_loadPortForwardingRulesData($resultObject);
         }
     }
     return $result;
 }
예제 #2
0
 /**
  * Creates an ip forwarding rule
  *
  * @param CreateIpForwardingRuleData|array $request Create ip rule data object
  * @return ForwardingRuleResponseData
  */
 public function createIpForwardingRule($request)
 {
     if ($request !== null && !$request instanceof CreateIpForwardingRuleData) {
         $request = CreateIpForwardingRuleData::initArray($request);
     }
     return $this->getApiHandler()->createIpForwardingRule($request);
 }