/*
 * Copyright 2017-present Open Networking Laboratory
 *
 * 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 org.onosproject.mapping.web.codec;

import com.fasterxml.jackson.databind.node.ObjectNode;
import org.onosproject.codec.CodecContext;
import org.onosproject.codec.JsonCodec;
import org.onosproject.mapping.instructions.MappingInstruction;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import static com.google.common.base.Preconditions.checkNotNull;

/**
 * Mapping instruction codec.
 */
public final class MappingInstructionCodec extends JsonCodec<MappingInstruction> {

    protected static final Logger log = LoggerFactory.getLogger(MappingInstruction.class);

    protected static final String TYPE = "type";
    protected static final String SUBTYPE = "subtype";
    protected static final String UNICAST_WEIGHT = "unicastWeight";
    protected static final String UNICAST_PRIORITY = "unicastPriority";
    protected static final String MULTICAST_WEIGHT = "multicastWeight";
    protected static final String MULTICAST_PRIORITY = "multicastPriority";

    protected static final String MISSING_MEMBER_MESSAGE =
                                        " member is required in Instruction";
    protected static final String ERROR_MESSAGE =
                                        " not specified in Instruction";

    @Override
    public ObjectNode encode(MappingInstruction instruction, CodecContext context) {
        checkNotNull(instruction, "Mapping instruction cannot be null");

        return new EncodeMappingInstructionCodecHelper(instruction, context).encode();
    }
}

@@ -2114,11 +2114,274 @@
 );%0A    %7D
+%0A%0A    @Override%0A    public MappingInstruction decode(ObjectNode json, CodecContext context) %7B%0A        if (json == null %7C%7C !json.isObject()) %7B%0A            return null;%0A        %7D%0A%0A        return new DecodeMappingInstructionCodecHelper(json, context).decode();%0A    %7D
 %0A%7D%0A

Add missing decode method for MappingInstructionCodec