package mesosphere.marathon.client.model.v2;

import mesosphere.client.common.ModelUtils;

import java.util.ArrayList;
import java.util.List;

public class IpAddress {
    private IpDiscovery  discovery;
    private List<String> groups;
    private String       networkName;

    public IpDiscovery getDiscovery() {
        return discovery;
    }

    public void setDiscovery(IpDiscovery discovery) {
        this.discovery = discovery;
    }

    public List<String> getGroups() {
        return groups;
    }

    public void setGroups(List<String> groups) {
        this.groups = groups;
    }

    public void addGroup(final String group) {
        if (this.groups == null) this.groups = new ArrayList<>(5);
        this.groups.add(group);
    }

    public String getNetworkName() {
        return networkName;
    }

    public void setNetworkName(String networkName) {
        this.networkName = networkName;
    }

    @Override
    public String toString() {
        return ModelUtils.toString(this);
    }
}

@@ -129,20 +129,68 @@
 va.util.
-List
+HashMap;%0Aimport java.util.List;%0Aimport java.util.Map
 ;%0A%0Apubli
@@ -234,16 +234,23 @@
 covery  
+       
 discover
@@ -272,24 +272,31 @@
 List%3CString%3E
+       
  groups;%0A   
@@ -304,22 +304,69 @@
 private 
+Map%3C
 String
+, Object%3E labels;%0A    private String       
        n
@@ -847,32 +847,496 @@
 (group);%0A    %7D%0A%0A
+    public Map%3CString, Object%3E getLabels() %7B%0A        return labels;%0A    %7D%0A%0A    public void setLabels(Map%3CString, Object%3E labels) %7B%0A        this.labels = labels;%0A    %7D%0A%0A    public void addLabel(final String key, final Object value) %7B%0A        if (key != null && key.trim().length() %3E 0 && value != null) %7B%0A            if (this.labels == null) %7B%0A                this.labels = new HashMap%3C%3E(5);%0A            %7D%0A%0A            this.labels.put(key, value);%0A        %7D%0A    %7D%0A%0A
     public Strin

Add labels to IpAddress