/*-
 * -\-\-
 * docker-client
 * --
 * Copyright (C) 2016 Spotify AB
 * --
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * 
 *      http://www.apache.org/licenses/LICENSE-2.0
 * 
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * -/-/-
 */

package com.spotify.docker.client.messages;

import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.ANY;
import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE;

import com.fasterxml.jackson.annotation.JsonAutoDetect;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.google.auto.value.AutoValue;
import com.google.common.collect.ImmutableList;
import javax.annotation.Nullable;


@AutoValue
@JsonAutoDetect(fieldVisibility = ANY, getterVisibility = NONE, setterVisibility = NONE)
public abstract class EndpointConfig {

  @Nullable
  @JsonProperty("Aliases")
  public abstract ImmutableList<String> aliases();

  @Nullable
  @JsonProperty("Gateway")
  public abstract String gateway();

  @Nullable
  @JsonProperty("IPAddress")
  public abstract String ipAddress();

  @Nullable
  @JsonProperty("IPPrefixLen")
  public abstract Integer ipPrefixLen();

  @Nullable
  @JsonProperty("IPv6Gateway")
  public abstract String ipv6Gateway();

  @Nullable
  @JsonProperty("GlobalIPv6Address")
  public abstract String globalIPv6Address();

  @Nullable
  @JsonProperty("GlobalIPv6PrefixLen")
  public abstract Integer globalIPv6PrefixLen();

  @Nullable
  @JsonProperty("MacAddress")
  public abstract String macAddress();

  public static Builder builder() {
    return new AutoValue_EndpointConfig.Builder();
  }

  @AutoValue.Builder
  public abstract static class Builder {
    public abstract Builder aliases(ImmutableList<String> aliases);

    public abstract Builder gateway(String gateway);

    public abstract Builder ipAddress(String ipAddress);

    public abstract Builder ipPrefixLen(Integer ipPrefixLen);

    public abstract Builder ipv6Gateway(String ipv6Gateway);

    public abstract Builder globalIPv6Address(String globalIPv6Address);

    public abstract Builder globalIPv6PrefixLen(Integer globalIPv6PrefixLen);

    public abstract Builder macAddress(String macAddress);

    public abstract EndpointConfig build();
  }
}

@@ -1040,16 +1040,40 @@
 bleList;
+%0A%0Aimport java.util.List;
 %0Aimport 
@@ -1100,17 +1100,16 @@
 lable;%0A%0A
-%0A
 @AutoVal
@@ -1240,16 +1240,197 @@
 nfig %7B%0A%0A
+  @Nullable%0A  @JsonProperty(%22IPAMConfig%22)%0A  public abstract EndpointIpamConfig ipamConfig();%0A%0A  @Nullable%0A  @JsonProperty(%22Links%22)%0A  public abstract ImmutableList%3CString%3E links();%0A%0A
   @Nulla
@@ -2270,16 +2270,145 @@
 ilder %7B%0A
+%0A    public abstract Builder ipamConfig(EndpointIpamConfig ipamConfig);%0A%0A    public abstract Builder links(List%3CString%3E links);%0A%0A
     publ
@@ -2910,32 +2910,32 @@
 g macAddress);%0A%0A
-
     public abstr
@@ -2965,11 +2965,809 @@
 d();%0A  %7D
+%0A%0A  @AutoValue%0A  public abstract static class EndpointIpamConfig %7B%0A%0A    @Nullable%0A    @JsonProperty(%22IPv4Address%22)%0A    public abstract String ipv4Address();%0A%0A    @Nullable%0A    @JsonProperty(%22IPv6Address%22)%0A    public abstract String ipv6Address();%0A%0A    @Nullable%0A    @JsonProperty(%22LinkLocalIPs%22)%0A    public abstract ImmutableList%3CString%3E linkLocalIps();%0A%0A    public static Builder builder() %7B%0A      return new AutoValue_EndpointConfig_EndpointIpamConfig.Builder();%0A    %7D%0A%0A    @AutoValue.Builder%0A    public abstract static class Builder %7B%0A%0A      public abstract Builder ipv4Address(String ipv4Address);%0A%0A      public abstract Builder ipv6Address(String ipv6Address);%0A%0A      public abstract Builder linkLocalIps(List%3CString%3E linkLocalIps);%0A%0A      public abstract EndpointIpamConfig build();%0A    %7D%0A  %7D
 %0A%7D%0A

Add IPAMConfig to EndpointConfig