/*
 * Copyright (c) 2014. Yuri Rychkov. Russia.
 * Some Rights Reserved.
 */

package ru.subscribe.pro.api.command;

import com.google.gson.annotations.SerializedName;

import ru.subscribe.pro.api.dto.Group;

/**
 * Create group.
 *
 * @author Yuri Rychkov
 */
public class CreateGroup extends SessionCommand {
    private Group group;
    @SerializedName("issue.passwd")
    private String issuePassword;

    /**
     * Constructor.
     *
     * @param sessionId session id
     * @param group group
     */
    public CreateGroup(String sessionId, Group group) {
        this(sessionId, group, null);
    }

    /**
     * Constructor.
     *
     * @param sessionId session id
     * @param group group
     * @param issuePassword issue password
     */
    public CreateGroup(String sessionId, Group group, String issuePassword) {
        super(Action.GROUP_CREATE, sessionId);
        this.group = group;
        this.issuePassword = issuePassword;
    }
}

@@ -194,21 +194,109 @@
 api.dto.
-Group
+AddressType;%0Aimport ru.subscribe.pro.api.dto.Group;%0Aimport ru.subscribe.pro.api.dto.GroupType
 ;%0A%0A/**%0A 
@@ -404,27 +404,148 @@
 private 
-Group group
+String id;%0A    private String name;%0A    private GroupType type;%0A    @SerializedName(%22addr_type%22)%0A    private AddressType addressType
 ;%0A    @S
@@ -1098,26 +1098,136 @@
     
-this.group = group
+id = group.getId();%0A        name = group.getName();%0A        type = group.getType();%0A        addressType = group.getAddressType()
 ;%0A  

Fix create group.