<?php
/**
 * TOP API: taobao.hotel.room.img.upload request
 *
 * @author auto create
 * @since 1.0, 2012-02-07 12:35:56
 */
class HotelRoomImgUploadRequest
{
	/**
	 * 酒店房间商品gid。必须为数字。
	 **/
	private $gid;

	/**
	 * 酒店商品图片。类型:JPG,GIF;最大长度:500K。支持的文件类型：gif,jpg,jpeg,png。
	 如果原图片少于5张，若没传序号或序号大于原图片个数，则在原图片最后添加，否则按序号插入到原图片中去，自动后移。
	 如果原图片大于5张，若没传序号，则替换最后一张图片，否则在序号位置插入，图片向后移，最后一张被删除。
	 **/
	private $pic;

	/**
	 * 图片序号，可选值：1，2，3，4，5
	 **/
	private $position;

	private $apiParas = array();

	public function setGid($gid)
	{
		$this->gid = $gid;
		$this->apiParas["gid"] = $gid;
	}

	public function getGid()
	{
		return $this->gid;
	}

	public function setPic($pic)
	{
		$this->pic = $pic;
		$this->apiParas["pic"] = $pic;
	}

	public function getPic()
	{
		return $this->pic;
	}

	public function setPosition($position)
	{
		$this->position = $position;
		$this->apiParas["position"] = $position;
	}

	public function getPosition()
	{
		return $this->position;
	}

	public function getApiMethodName()
	{
		return "taobao.hotel.room.img.upload";
	}

	public function getApiParas()
	{
		return $this->apiParas;
	}

	public function check()
	{

		RequestCheckUtil::checkNotNull($this->gid,"gid");
		RequestCheckUtil::checkNotNull($this->pic,"pic");
	}
}
