package com.bocloud.ims.entity.resource.f5;

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

/**
 * dns解析器
 *
 * @author liuyuanyuan
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@EqualsAndHashCode(callSuper = true)
@Table("bi_dns_resolvers")
public class BiDnsResolvers extends GenericEntity {
    @PK(value = PKStrategy.AUTO)
    private Long id; // ID
    @Column("vendor_id")
    private Long vendorId;
    @Column("route_domain_id")
    private Long routeDomainId;
    @Column("cache_size")
    private Long cacheSize;
    @Column("answer_default_zones")
    private Boolean answerDefaultZones;
    @Column("randomize_query_name_case")
    private Boolean randomizeQueryNameCase;
    @Column("use_ipv4")
    private Boolean useIpv4;
    @Column("use_ipv6")
    private Boolean useIpv6;
    @Column("use_tcp")
    private Boolean useTcp;
    @Column("use_udp")
    private Boolean useUdp;
    @Column("partition_id")
    private Long partitionId;

    public BiDnsResolvers(Long vendorId, Long routeDomainId, Long cacheSize, Boolean answerDefaultZones,
                          Boolean randomizeQueryNameCase, Boolean useIpv4, Boolean useIpv6, Boolean useTcp, Boolean useUdp) {
        super();
        this.vendorId = vendorId;
        this.routeDomainId = routeDomainId;
        this.cacheSize = cacheSize;
        this.answerDefaultZones = answerDefaultZones;
        this.randomizeQueryNameCase = randomizeQueryNameCase;
        this.useIpv4 = useIpv4;
        this.useIpv6 = useIpv6;
        this.useTcp = useTcp;
        this.useUdp = useUdp;
    }

    public BiDnsResolvers(Boolean answerDefaultZones, Boolean randomizeQueryNameCase, Boolean useIpv4, Boolean useIpv6,
                          Boolean useTcp, Boolean useUdp) {
        super();
        this.answerDefaultZones = answerDefaultZones;
        this.randomizeQueryNameCase = randomizeQueryNameCase;
        this.useIpv4 = useIpv4;
        this.useIpv6 = useIpv6;
        this.useTcp = useTcp;
        this.useUdp = useUdp;
    }
}
