/*
 * Licensed to the Apache Software Foundation (ASF) under one
 * or more contributor license agreements.  See the NOTICE file
 * distributed with this work for additional information
 * regarding copyright ownership.  The ASF licenses this file
 * to you 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.
 */
{
   "type":"record",
   "name":"HoodieArchivedMetaEntry",
   "namespace":"org.apache.hudi.avro.model",
   "fields":[
      {
         "name":"hoodieCommitMetadata",
         "type":[
            "null",
            "HoodieCommitMetadata"
         ],
         "default": null
      },
      {
         "name":"hoodieCleanMetadata",
         "type":[
            "null",
            "HoodieCleanMetadata"
         ],
         "default": null
      },
      {
         /** DEPRECATED **/
         "name":"hoodieCompactionMetadata",
         "type":[
            "null",
            "HoodieCompactionMetadata"
         ],
         "default": null
      },
      {
         "name":"hoodieRollbackMetadata",
         "type":[
            "null",
            "HoodieRollbackMetadata"
         ],
         "default": null
      },
      {
         "name":"hoodieSavePointMetadata",
         "type":[
            "null",
            "HoodieSavepointMetadata"
         ],
         "default": null
      },
      {
         "name":"commitTime",
         "type":["null","string"],
         "default": null
      },
      {
         "name":"actionType",
         "type":["null","string"],
         "default": null
      },
      {
         "name":"version",
         "type":["int", "null"],
         "default": 1
      },
      {
         "name":"hoodieCompactionPlan",
         "type":[
            "null",
            "HoodieCompactionPlan"
         ],
         "default": null
      },
      {
         "name":"hoodieCleanerPlan",
         "type":[
            "null",
            "HoodieCleanerPlan"
         ],
         "default": null
      },
      {
         "name":"actionState",
         "type":["null","string"],
         "default": null
      },
      {
         "name":"hoodieReplaceCommitMetadata",
         "type":[
            "null",
            "HoodieReplaceCommitMetadata"
         ],
         "default": null
      },
      {
         "name":"hoodieRequestedReplaceMetadata",
         "type":[
            "null",
            "HoodieRequestedReplaceMetadata"
         ],
         "default": null
      },
      {
         "name":"HoodieInflightReplaceMetadata",
         "type":[
            "null",
            "HoodieCommitMetadata"
         ],
         "default": null
      },
      {
         "name":"hoodieIndexCommitMetadata",
         "type":[
            "null",
            "HoodieIndexCommitMetadata"
         ],
         "default": null
      },
      {
         "name":"stateTransitionTime",
         "type":["null","string"],
         "default": null
      }
   ]
}
