package com.bocloud.ims.entity.resource;

import com.bocloud.entity.annotations.*;
import com.bocloud.entity.bean.GenericEntity;
import com.bocloud.entity.meta.PKStrategy;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

import java.util.List;

@Data
@EqualsAndHashCode(callSuper = true)
@NoArgsConstructor
@AllArgsConstructor
@Table("nat_gateway_snat_rule")
public class NatGatewaySnatRule extends GenericEntity {

	// ID
	@PK(value = PKStrategy.AUTO)
	private Long id;
	@Column("vendor_id")
	private Long vendorId;
	// 地域
	@Column("region_id")
	private String regionId;
	@Column("uuid")
	private String uuid;
	@Column("nat_gateway_id")
	private Long natGatewayId;
	@Column("elastic_ip_id")
	private Long elasticIpId;
	@Column("subnet_id")
	private Long subnetId;
	@Column("cidr")
	private String cidr;
	@Column("source_type")
	private Integer sourceType; // 0:VPC侧,可以指定network_id 或者cidr1:专线侧,只能指定cidr 不输入默认为0(VPC)
	@Column("freezed_ip_address")
	private String freezedIpAddress; // 功能说明:冻结的弹性公网IP,多个冻结的弹性公网IP使用逗号分隔。取值范围:最大长度1024字节
	@Column("admin_state_up")
	private Boolean adminStateUp;
	@IgnoreAll
	private List<Long> elasticIpIds;
	@IgnoreAll
	private String elasticIps;

	/** 阿里云新增属性 **/
	@Column("snat_table_id")
	private String snatTableId;
	@Column("snat_ip")
	private String snatIp; // 公网ip,多个IP以逗号分割
	@Column("ecs_id")
	private Long ecsId; // ecs实例id
	/** end **/

	@IgnoreAll
	private String subnetName;

	@IgnoreAll
	private String natGatewayName;
}
