/*-
 * -\-\-
 * docker-client
 * --
 * Copyright (C) 2016 - 2018 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;

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.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.google.auto.value.AutoValue;
import com.google.common.collect.ImmutableMap;
import com.spotify.docker.client.messages.RegistryAuth;

import java.util.Map;
import javax.annotation.Nullable;

/**
 * Represents the contents of the docker config.json file.
 */
@AutoValue
@JsonAutoDetect(fieldVisibility = ANY, getterVisibility = NONE, setterVisibility = NONE)
public abstract class DockerConfig {

  @Nullable
  @JsonProperty("credsHelpers")
  public abstract ImmutableMap<String, String> credsHelpers();

  @Nullable
  @JsonProperty("auths")
  public abstract ImmutableMap<String, RegistryAuth> auths();

  @Nullable
  @JsonProperty("HttpHeaders")
  public abstract ImmutableMap<String, String> httpHeaders();

  @Nullable
  @JsonProperty("credsStore")
  public abstract String credsStore();

  @Nullable
  @JsonProperty("detachKeys")
  public abstract String detachKeys();

  @Nullable
  @JsonProperty("stackOrchestrator")
  public abstract String stackOrchestrator();

  @JsonCreator
  public static DockerConfig create(
          @JsonProperty("credsHelpers") final Map<String, String> credsHelpers,
          @JsonProperty("auths") final Map<String, RegistryAuth> auths,
          @JsonProperty("HttpHeaders") final Map<String, String> httpHeaders,
          @JsonProperty("credsStore") final String credsStore,
          @JsonProperty("detachKeys") final String detachKeys,
          @JsonProperty("stackOrchestrator") final String stackOrchestrator) {
    return new AutoValue_DockerConfig(
        credsHelpers == null
            ? ImmutableMap.<String, String>of()
            : ImmutableMap.copyOf(credsHelpers),
        auths == null
            ? ImmutableMap.<String, RegistryAuth>of()
            : ImmutableMap.copyOf(auths),
        httpHeaders == null
            ? ImmutableMap.<String, String>of()
            : ImmutableMap.copyOf(httpHeaders),
        credsStore,
        detachKeys,
        stackOrchestrator);
  }
}

@@ -1984,16 +1984,180 @@
 tor();%0A%0A
+  @Nullable%0A  @JsonProperty(%22psFormat%22)%0A  public abstract String psFormat();%0A%0A  @Nullable%0A  @JsonProperty(%22imagesFormat%22)%0A  public abstract String imagesFormat();%0A%0A
   @JsonC
@@ -2163,16 +2163,16 @@
 Creator%0A
-
   public
@@ -2631,16 +2631,142 @@
 estrator
+,%0A          @JsonProperty(%22psFormat%22) final String psFormat,%0A          @JsonProperty(%22imagesFormat%22) final String imagesFormat
 ) %7B%0A    
@@ -3200,32 +3200,32 @@
     detachKeys,%0A
-
         stackOrc
@@ -3233,16 +3233,56 @@
 estrator
+,%0A        psFormat,%0A        imagesFormat
 );%0A  %7D%0A%7D

Add docker config file properties from https://github.com/docker/cli/blob/08cf36daa65e22771cc47365ff1507c156c4a459/man/docker-config-json.5.md