vpc-20160428/src/Models/CreateVpnGatewayRequest.php (186 lines of code) (raw):
<?php
// This file is auto-generated, don't edit it. Thanks.
namespace AlibabaCloud\SDK\Vpc\V20160428\Models;
use AlibabaCloud\Dara\Model;
class CreateVpnGatewayRequest extends Model
{
/**
* @var bool
*/
public $autoPay;
/**
* @var int
*/
public $bandwidth;
/**
* @var string
*/
public $clientToken;
/**
* @var string
*/
public $disasterRecoveryVSwitchId;
/**
* @var bool
*/
public $enableIpsec;
/**
* @var bool
*/
public $enableSsl;
/**
* @var string
*/
public $instanceChargeType;
/**
* @var string
*/
public $name;
/**
* @var string
*/
public $networkType;
/**
* @var string
*/
public $ownerAccount;
/**
* @var int
*/
public $ownerId;
/**
* @var int
*/
public $period;
/**
* @var string
*/
public $regionId;
/**
* @var string
*/
public $resourceGroupId;
/**
* @var string
*/
public $resourceOwnerAccount;
/**
* @var int
*/
public $resourceOwnerId;
/**
* @var int
*/
public $sslConnections;
/**
* @var string
*/
public $vSwitchId;
/**
* @var string
*/
public $vpcId;
/**
* @var string
*/
public $vpnType;
protected $_name = [
'autoPay' => 'AutoPay',
'bandwidth' => 'Bandwidth',
'clientToken' => 'ClientToken',
'disasterRecoveryVSwitchId' => 'DisasterRecoveryVSwitchId',
'enableIpsec' => 'EnableIpsec',
'enableSsl' => 'EnableSsl',
'instanceChargeType' => 'InstanceChargeType',
'name' => 'Name',
'networkType' => 'NetworkType',
'ownerAccount' => 'OwnerAccount',
'ownerId' => 'OwnerId',
'period' => 'Period',
'regionId' => 'RegionId',
'resourceGroupId' => 'ResourceGroupId',
'resourceOwnerAccount' => 'ResourceOwnerAccount',
'resourceOwnerId' => 'ResourceOwnerId',
'sslConnections' => 'SslConnections',
'vSwitchId' => 'VSwitchId',
'vpcId' => 'VpcId',
'vpnType' => 'VpnType',
];
public function validate()
{
parent::validate();
}
public function toArray($noStream = false)
{
$res = [];
if (null !== $this->autoPay) {
$res['AutoPay'] = $this->autoPay;
}
if (null !== $this->bandwidth) {
$res['Bandwidth'] = $this->bandwidth;
}
if (null !== $this->clientToken) {
$res['ClientToken'] = $this->clientToken;
}
if (null !== $this->disasterRecoveryVSwitchId) {
$res['DisasterRecoveryVSwitchId'] = $this->disasterRecoveryVSwitchId;
}
if (null !== $this->enableIpsec) {
$res['EnableIpsec'] = $this->enableIpsec;
}
if (null !== $this->enableSsl) {
$res['EnableSsl'] = $this->enableSsl;
}
if (null !== $this->instanceChargeType) {
$res['InstanceChargeType'] = $this->instanceChargeType;
}
if (null !== $this->name) {
$res['Name'] = $this->name;
}
if (null !== $this->networkType) {
$res['NetworkType'] = $this->networkType;
}
if (null !== $this->ownerAccount) {
$res['OwnerAccount'] = $this->ownerAccount;
}
if (null !== $this->ownerId) {
$res['OwnerId'] = $this->ownerId;
}
if (null !== $this->period) {
$res['Period'] = $this->period;
}
if (null !== $this->regionId) {
$res['RegionId'] = $this->regionId;
}
if (null !== $this->resourceGroupId) {
$res['ResourceGroupId'] = $this->resourceGroupId;
}
if (null !== $this->resourceOwnerAccount) {
$res['ResourceOwnerAccount'] = $this->resourceOwnerAccount;
}
if (null !== $this->resourceOwnerId) {
$res['ResourceOwnerId'] = $this->resourceOwnerId;
}
if (null !== $this->sslConnections) {
$res['SslConnections'] = $this->sslConnections;
}
if (null !== $this->vSwitchId) {
$res['VSwitchId'] = $this->vSwitchId;
}
if (null !== $this->vpcId) {
$res['VpcId'] = $this->vpcId;
}
if (null !== $this->vpnType) {
$res['VpnType'] = $this->vpnType;
}
return $res;
}
public function toMap($noStream = false)
{
return $this->toArray($noStream);
}
public static function fromMap($map = [])
{
$model = new self();
if (isset($map['AutoPay'])) {
$model->autoPay = $map['AutoPay'];
}
if (isset($map['Bandwidth'])) {
$model->bandwidth = $map['Bandwidth'];
}
if (isset($map['ClientToken'])) {
$model->clientToken = $map['ClientToken'];
}
if (isset($map['DisasterRecoveryVSwitchId'])) {
$model->disasterRecoveryVSwitchId = $map['DisasterRecoveryVSwitchId'];
}
if (isset($map['EnableIpsec'])) {
$model->enableIpsec = $map['EnableIpsec'];
}
if (isset($map['EnableSsl'])) {
$model->enableSsl = $map['EnableSsl'];
}
if (isset($map['InstanceChargeType'])) {
$model->instanceChargeType = $map['InstanceChargeType'];
}
if (isset($map['Name'])) {
$model->name = $map['Name'];
}
if (isset($map['NetworkType'])) {
$model->networkType = $map['NetworkType'];
}
if (isset($map['OwnerAccount'])) {
$model->ownerAccount = $map['OwnerAccount'];
}
if (isset($map['OwnerId'])) {
$model->ownerId = $map['OwnerId'];
}
if (isset($map['Period'])) {
$model->period = $map['Period'];
}
if (isset($map['RegionId'])) {
$model->regionId = $map['RegionId'];
}
if (isset($map['ResourceGroupId'])) {
$model->resourceGroupId = $map['ResourceGroupId'];
}
if (isset($map['ResourceOwnerAccount'])) {
$model->resourceOwnerAccount = $map['ResourceOwnerAccount'];
}
if (isset($map['ResourceOwnerId'])) {
$model->resourceOwnerId = $map['ResourceOwnerId'];
}
if (isset($map['SslConnections'])) {
$model->sslConnections = $map['SslConnections'];
}
if (isset($map['VSwitchId'])) {
$model->vSwitchId = $map['VSwitchId'];
}
if (isset($map['VpcId'])) {
$model->vpcId = $map['VpcId'];
}
if (isset($map['VpnType'])) {
$model->vpnType = $map['VpnType'];
}
return $model;
}
}