All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.reprezen.kaizen.oasparser.ovl3.SecurityParameterImpl Maven / Gradle / Ivy

package com.reprezen.kaizen.oasparser.ovl3;

import java.util.List;

import javax.annotation.Generated;

import com.fasterxml.jackson.databind.JsonNode;
import com.reprezen.jsonoverlay.Builder;
import com.reprezen.jsonoverlay.IJsonOverlay;
import com.reprezen.jsonoverlay.JsonOverlay;
import com.reprezen.jsonoverlay.OverlayFactory;
import com.reprezen.jsonoverlay.PropertiesOverlay;
import com.reprezen.jsonoverlay.ReferenceManager;
import com.reprezen.jsonoverlay.StringOverlay;
import com.reprezen.kaizen.oasparser.model3.OpenApi3;
import com.reprezen.kaizen.oasparser.model3.SecurityParameter;

public class SecurityParameterImpl extends PropertiesOverlay implements SecurityParameter {

	@Override
	protected JsonNode _fixJson(JsonNode json) {
		return json.isMissingNode() ? _jsonArray() : json;
	}

	@Generated("com.reprezen.jsonoverlay.gen.CodeGenerator")
	public SecurityParameterImpl(JsonNode json, JsonOverlay parent, ReferenceManager refMgr) {
		super(json, parent, factory, refMgr);
	}

	@Generated("com.reprezen.jsonoverlay.gen.CodeGenerator")
	public SecurityParameterImpl(SecurityParameter securityParameter, JsonOverlay parent, ReferenceManager refMgr) {
		super(securityParameter, parent, factory, refMgr);
	}

	// Parameter
	@Override
	@Generated("com.reprezen.jsonoverlay.gen.CodeGenerator")
	public List getParameters() {
		return _getList("parameters", String.class);
	}

	@Override
	@Generated("com.reprezen.jsonoverlay.gen.CodeGenerator")
	public List getParameters(boolean elaborate) {
		return _getList("parameters", elaborate, String.class);
	}

	@Override
	@Generated("com.reprezen.jsonoverlay.gen.CodeGenerator")
	public boolean hasParameters() {
		return _isPresent("parameters");
	}

	@Override
	@Generated("com.reprezen.jsonoverlay.gen.CodeGenerator")
	public String getParameter(int index) {
		return _get("parameters", index, String.class);
	}

	@Override
	@Generated("com.reprezen.jsonoverlay.gen.CodeGenerator")
	public void setParameters(List parameters) {
		_setList("parameters", parameters, String.class);
	}

	@Override
	@Generated("com.reprezen.jsonoverlay.gen.CodeGenerator")
	public void setParameter(int index, String parameter) {
		_set("parameters", index, parameter, String.class);
	}

	@Override
	@Generated("com.reprezen.jsonoverlay.gen.CodeGenerator")
	public void addParameter(String parameter) {
		_add("parameters", parameter, String.class);
	}

	@Override
	@Generated("com.reprezen.jsonoverlay.gen.CodeGenerator")
	public void insertParameter(int index, String parameter) {
		_insert("parameters", index, parameter, String.class);
	}

	@Override
	@Generated("com.reprezen.jsonoverlay.gen.CodeGenerator")
	public void removeParameter(int index) {
		_remove("parameters", index, String.class);
	}

	@Generated("com.reprezen.jsonoverlay.gen.CodeGenerator")
	public static final String F_parameters = "parameters";

	@Override
	@Generated("com.reprezen.jsonoverlay.gen.CodeGenerator")
	protected void _elaborateJson() {
		super._elaborateJson();
		_createList("parameters", "", StringOverlay.factory);
	}

	@Generated("com.reprezen.jsonoverlay.gen.CodeGenerator")
	public static OverlayFactory factory = new OverlayFactory() {

		@Override
		protected Class> getOverlayClass() {
			return SecurityParameterImpl.class;
		}

		@Override
		public JsonOverlay _create(SecurityParameter securityParameter, JsonOverlay parent,
				ReferenceManager refMgr) {
			JsonOverlay overlay;
			overlay = new SecurityParameterImpl(securityParameter, parent, refMgr);
			@SuppressWarnings("unchecked")
			JsonOverlay castOverlay = (JsonOverlay) overlay;
			return castOverlay;
		}

		@Override
		public JsonOverlay _create(JsonNode json, JsonOverlay parent, ReferenceManager refMgr) {
			JsonOverlay overlay;
			overlay = new SecurityParameterImpl(json, parent, refMgr);
			@SuppressWarnings("unchecked")
			JsonOverlay castOverlay = (JsonOverlay) overlay;
			return castOverlay;
		}

		@Override
		protected boolean isExtendedType() {
			return false;
		}
	};

	@Generated("com.reprezen.jsonoverlay.gen.CodeGenerator")
	private static Class getSubtypeOf(SecurityParameter securityParameter) {
		return SecurityParameter.class;
	}

	@Generated("com.reprezen.jsonoverlay.gen.CodeGenerator")
	private static Class getSubtypeOf(JsonNode json) {
		return SecurityParameter.class;
	}

	@Override
	@Generated("com.reprezen.jsonoverlay.gen.CodeGenerator")
	public Class _getModelType() {
		return OpenApi3.class;
	}

	@Override
	@Generated("com.reprezen.jsonoverlay.gen.CodeGenerator")
	protected OverlayFactory _getFactory() {
		return factory;
	}

	@Generated("com.reprezen.jsonoverlay.gen.CodeGenerator")
	public static > Builder builder(OV modelMember) {
		return new Builder(factory, modelMember);
	}

	@Generated("com.reprezen.jsonoverlay.gen.CodeGenerator")
	public static > SecurityParameter create(OV modelMember) {
		return (SecurityParameter) builder(modelMember).build();
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy