/*-
 * ~~~~~~licensing~~~~~~
 * generator-api
 * ==========
 * 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.generator;

import java.util.Map;

import ru.entaxy.esb.platform.runtime.base.connecting.generator.impl.GeneratedImpl;

public interface Generated {
	
	public static final String GENERATED_TYPE_UNKNOWN = "unknown";

	public static final String GENERATED_TYPE_BLUEPRINT = "blueprint";

	public static final String GENERATED_TYPE_BLUEPRINT_FRAGMENT = "blueprint.fragment";

	public static Generated create() {
		return new GeneratedImpl();
	}

	public static Generated create(Object object) {
		return new GeneratedImpl(object);
	}
	
	public static Generated create(String type, Object object) {
		return new GeneratedImpl(type, object);
	}
	
	public String getType();
	
	public Object getObject();
	
	public Map<String, Object> getProperties();
	
	public default boolean isUnknown() {
		return GENERATED_TYPE_UNKNOWN.equals(getType());
	}
}
