<?php

// This file is auto-generated, don't edit it. Thanks.

namespace AlibabaCloud\SDK\Alidns\V20150109\Models;

use AlibabaCloud\Tea\Model;

class SwitchDnsGtmInstanceStrategyModeRequest extends Model
{
    /**
     * @description The ID of the GTM instance.
     *
     * This parameter is required.
     * @example instance1
     *
     * @var string
     */
    public $instanceId;

    /**
     * @description The language of the values of specific response parameters. Default value: en. Valid values: en, zh, and ja.
     *
     * @example en
     *
     * @var string
     */
    public $lang;

    /**
     * @description The access policy type. Valid values:
     *
     *   GEO: geographical location-based
     *   LATENCY: latency-based
     *
     * This parameter is required.
     * @example GEO
     *
     * @var string
     */
    public $strategyMode;
    protected $_name = [
        'instanceId'   => 'InstanceId',
        'lang'         => 'Lang',
        'strategyMode' => 'StrategyMode',
    ];

    public function validate()
    {
    }

    public function toMap()
    {
        $res = [];
        if (null !== $this->instanceId) {
            $res['InstanceId'] = $this->instanceId;
        }
        if (null !== $this->lang) {
            $res['Lang'] = $this->lang;
        }
        if (null !== $this->strategyMode) {
            $res['StrategyMode'] = $this->strategyMode;
        }

        return $res;
    }

    /**
     * @param array $map
     *
     * @return SwitchDnsGtmInstanceStrategyModeRequest
     */
    public static function fromMap($map = [])
    {
        $model = new self();
        if (isset($map['InstanceId'])) {
            $model->instanceId = $map['InstanceId'];
        }
        if (isset($map['Lang'])) {
            $model->lang = $map['Lang'];
        }
        if (isset($map['StrategyMode'])) {
            $model->strategyMode = $map['StrategyMode'];
        }

        return $model;
    }
}
