/*-
 * ~~~~~~licensing~~~~~~
 * adapters-core
 * ==========
 * Copyright (C) 2020 - 2021 EmDev LLC
 * ==========
 * 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.
 * ~~~~~~/licensing~~~~~~
 */
package ru.entaxy.esb.platform.runtime.base.connecting.adapter.core.metadata;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.util.ArrayList;
import java.util.List;

public class AdapterMetadataElement {
	
	protected static final Logger log = LoggerFactory.getLogger(AdapterMetadataElement.class);
	
	protected String id;
	protected String name;
	protected String description;

	protected List<AdapterFieldElement> fields = new ArrayList<>();

	public List<AdapterGeneratorElement> getGenerators() {
		return generators;
	}

	public void setGenerators(List<AdapterGeneratorElement> generators) {
		this.generators = generators;
	}

	protected List<AdapterGeneratorElement> generators = new ArrayList();

	public void addField(AdapterFieldElement field) {
		this.fields.add(field);
	}
	
	public int getFieldsCount() {
		return this.fields.size();
	}
	
	public List<AdapterFieldElement> getFields() {
		return fields;
	}

	public String getId() {
		return id;
	}
	public void setId(String id) {
		this.id = id;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public String getDescription() {
		return description;
	}
	public void setDescription(String description) {
		this.description = description;
	}
	
}
