package org.jeecg.modules.adweb.dmp.dto.google.gtm;

import com.google.common.base.Joiner;

import lombok.*;
import lombok.experimental.SuperBuilder;

import org.apache.commons.lang3.StringUtils;
import org.jeecg.modules.adweb.dmp.dto.google.ResourceDTO;

/**
 * @author wfansh
 */
@Data
@SuperBuilder
@NoArgsConstructor
@ToString(callSuper = true)
@EqualsAndHashCode(callSuper = true)
public class GTMAccountDTO extends ResourceDTO {

    private boolean supportUserPermissions;

    private boolean supportMultipleContainers;

    public static String toResourceName(String id) {
        return StringUtils.isNumeric(id)
                ? Joiner.on(RESOURCE_NAME_SPLITTER).join("accounts", id)
                : id;
    }
}
