package com.sequenceiq.freeipa.api.v1.freeipa.stack.model.common.instance;

import javax.validation.Valid;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.sequenceiq.freeipa.api.v1.freeipa.stack.doc.FreeIpaModelDescriptions.InstanceGroupModelDescription;
import com.sequenceiq.freeipa.api.v1.freeipa.stack.model.common.security.SecurityGroupRequest;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

@ApiModel("InstanceGroupV1Request")
@JsonIgnoreProperties(ignoreUnknown = true)
@JsonInclude(JsonInclude.Include.NON_NULL)
public class InstanceGroupRequest extends InstanceGroupBase {
    @ApiModelProperty(InstanceGroupModelDescription.TEMPLATE)
    private InstanceTemplateRequest instanceTemplate;

    @Valid
    @ApiModelProperty(InstanceGroupModelDescription.SECURITYGROUP)
    private SecurityGroupRequest securityGroup;

    public InstanceTemplateRequest getInstanceTemplate() {
        return instanceTemplate;
    }

    public void setInstanceTemplateRequest(InstanceTemplateRequest instanceTemplate) {
        this.instanceTemplate = instanceTemplate;
    }

    public SecurityGroupRequest getSecurityGroup() {
        return securityGroup;
    }

    public void setSecurityGroup(SecurityGroupRequest securityGroup) {
        this.securityGroup = securityGroup;
    }

    @Override
    public String toString() {
        return super.toString() + "InstanceGroupRequest{"
                + "instanceTemplate=" + instanceTemplate
                + ", securityGroup=" + securityGroup
                + '}';
    }
}

@@ -1518,16 +1518,159 @@
      + %22
+instanceGroupName=%22 + getName()%0A                + %22, nodeCount=%22 + getNodeCount()%0A                + %22, type=%22 + getType()%0A                + %22, 
 instance

Improve log message for FreeIPA InstanceGroupRequest