// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.document.json;

import com.yahoo.document.DocumentOperation;

/**
 * The result of JSON parsing a single document operation
 *
 * @param operation
 *         the parsed operation
 * @param fullyApplied
 *         true if all the JSON content could be applied,
 *         false if some (or all) of the fields were not poresent in this document and was ignored
 */
public record ParsedDocumentOperation(DocumentOperation operation, boolean fullyApplied) {
}

@@ -178,16 +178,43 @@
 ation;%0A%0A
+import java.util.Objects;%0A%0A
 /**%0A * T
@@ -269,26 +269,99 @@
 ation%0A *
-%0A * @param
+/%0Apublic final class ParsedDocumentOperation %7B%0A%0A    private final DocumentOperation
  operati
@@ -362,24 +362,90 @@
 peration
+;
 %0A 
-*  
    
+private final boolean fullyApplied;%0A%0A    /**%0A     * @param operation
     the 
@@ -461,16 +461,20 @@
 eration%0A
+    
  * @para
@@ -487,27 +487,16 @@
 yApplied
-%0A *        
  true if
@@ -536,17 +536,33 @@
 plied,%0A 
-*
+    *            
         
@@ -655,49 +655,506 @@
 ed%0A 
-*/%0Apublic record ParsedDocumentOperation(
+    */%0A    public ParsedDocumentOperation(DocumentOperation operation, boolean fullyApplied) %7B%0A        this.operation = operation;%0A        this.fullyApplied = fullyApplied;%0A    %7D%0A%0A    public DocumentOperation operation() %7B return operation; %7D%0A%0A    public boolean fullyApplied() %7B return fullyApplied; %7D%0A%0A    @Override%0A    public boolean equals(Object obj) %7B%0A        if (obj == this) return true;%0A        if (obj == null %7C%7C obj.getClass() != this.getClass()) return false;%0A        var that = (Parsed
 Docu
@@ -1170,42 +1170,441 @@
 tion
+)
  o
-peration, boolean fullyApplied) %7B
+bj;%0A        return Objects.equals(this.operation, that.operation) &&%0A               this.fullyApplied == that.fullyApplied;%0A    %7D%0A%0A    @Override%0A    public int hashCode() %7B%0A        return Objects.hash(operation, fullyApplied);%0A    %7D%0A%0A    @Override%0A    public String toString() %7B%0A        return %22ParsedDocumentOperation%5B%22 +%0A               %22operation=%22 + operation + %22, %22 +%0A               %22fullyApplied=%22 + fullyApplied + '%5D';%0A    %7D%0A
 %0A%7D%0A

Convert record to class, since we need to build this for JDK 8