001/*
002Copyright 2022 The OpenFunction Authors.
003
004Licensed under the Apache License, Version 2.0 (the "License");
005you may not use this file except in compliance with the License.
006You may obtain a copy of the License at
007
008    http://www.apache.org/licenses/LICENSE-2.0
009
010Unless required by applicable law or agreed to in writing, software
011distributed under the License is distributed on an "AS IS" BASIS,
012WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013See the License for the specific language governing permissions and
014limitations under the License.
015*/
016
017package dev.openfunction.functions;
018
019import java.nio.ByteBuffer;
020import java.util.Map;
021
022public class BindingEvent {
023    /**
024     * The name of the input binding component.
025     */
026    private final String name;
027
028    private final ByteBuffer data;
029
030    private final Map<String, String> metadata;
031
032    public BindingEvent(String name, Map<String, String> metadata, ByteBuffer data) {
033        this.name = name;
034        this.metadata = metadata;
035        this.data = data;
036    }
037
038    public ByteBuffer getData() {
039        return data;
040    }
041
042    public Map<String, String> getMetadata() {
043        return metadata;
044    }
045
046    public String getName() {
047        return name;
048    }
049}