/*
 * Copyright 2017 Google, Inc.
 *
 * 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.netflix.spinnaker.kork.artifacts.model;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Map;

@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class Artifact {
  private String type;
  private String name;
  private String version;
  private String location;
  private String reference;
  private Map<String, Object> metadata;
  private String artifactAccount;
  private String provenance;
  private String uuid;
}

@@ -643,16 +643,71 @@
 model;%0A%0A
+import com.fasterxml.jackson.annotation.JsonAnySetter;%0A
 import l
@@ -732,16 +732,16 @@
 ructor;%0A
-
 import l
@@ -809,16 +809,42 @@
 uctor;%0A%0A
+import java.util.HashMap;%0A
 import j
@@ -1162,24 +1162,24 @@
 provenance;%0A
-
   private St
@@ -1188,11 +1188,235 @@
 ng uuid;
+%0A%0A  // Add extra, unknown data to the metadata map:%0A  @JsonAnySetter%0A  public void putMetadata(String key, Object value) %7B%0A    if (metadata == null) %7B%0A      metadata = new HashMap%3C%3E();%0A    %7D%0A    metadata.put(key, value);%0A  %7D
 %0A%7D%0A

Put "unknown" fields into the metadata map (#138)