com.networknt.oas.model.impl.OAuthFlowImpl Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of openapi-parser Show documentation
Show all versions of openapi-parser Show documentation
A light-weight, fast OpenAPI 3.0 parser and validator
/*******************************************************************************
* Copyright (c) 2017 ModelSolv, Inc. and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* ModelSolv, Inc. - initial API and implementation and/or initial documentation
*******************************************************************************/
package com.networknt.oas.model.impl;
import com.fasterxml.jackson.databind.JsonNode;
import com.networknt.jsonoverlay.*;
import com.networknt.oas.model.OAuthFlow;
import com.networknt.oas.model.OpenApi3;
import javax.annotation.Generated;
import java.util.Map;
public class OAuthFlowImpl extends PropertiesOverlay implements OAuthFlow {
@Generated("com.reprezen.jsonoverlay.gen.CodeGenerator")
public OAuthFlowImpl(JsonNode json, JsonOverlay> parent, ReferenceManager refMgr) {
super(json, parent, factory, refMgr);
}
@Generated("com.reprezen.jsonoverlay.gen.CodeGenerator")
public OAuthFlowImpl(OAuthFlow oAuthFlow, JsonOverlay> parent, ReferenceManager refMgr) {
super(oAuthFlow, parent, factory, refMgr);
}
// AuthorizationUrl
@Override
@Generated("com.reprezen.jsonoverlay.gen.CodeGenerator")
public String getAuthorizationUrl() {
return _get("authorizationUrl", String.class);
}
@Override
@Generated("com.reprezen.jsonoverlay.gen.CodeGenerator")
public void setAuthorizationUrl(String authorizationUrl) {
_setScalar("authorizationUrl", authorizationUrl, String.class);
}
// TokenUrl
@Override
@Generated("com.reprezen.jsonoverlay.gen.CodeGenerator")
public String getTokenUrl() {
return _get("tokenUrl", String.class);
}
@Override
@Generated("com.reprezen.jsonoverlay.gen.CodeGenerator")
public void setTokenUrl(String tokenUrl) {
_setScalar("tokenUrl", tokenUrl, String.class);
}
// RefreshUrl
@Override
@Generated("com.reprezen.jsonoverlay.gen.CodeGenerator")
public String getRefreshUrl() {
return _get("refreshUrl", String.class);
}
@Override
@Generated("com.reprezen.jsonoverlay.gen.CodeGenerator")
public void setRefreshUrl(String refreshUrl) {
_setScalar("refreshUrl", refreshUrl, String.class);
}
// Scope
@Override
@Generated("com.reprezen.jsonoverlay.gen.CodeGenerator")
public Map getScopes() {
return _getMap("scopes", String.class);
}
@Override
@Generated("com.reprezen.jsonoverlay.gen.CodeGenerator")
public Map getScopes(boolean elaborate) {
return _getMap("scopes", elaborate, String.class);
}
@Override
@Generated("com.reprezen.jsonoverlay.gen.CodeGenerator")
public boolean hasScopes() {
return _isPresent("scopes");
}
@Override
@Generated("com.reprezen.jsonoverlay.gen.CodeGenerator")
public boolean hasScope(String name) {
return _getMap("scopes", String.class).containsKey(name);
}
@Override
@Generated("com.reprezen.jsonoverlay.gen.CodeGenerator")
public String getScope(String name) {
return _get("scopes", name, String.class);
}
@Override
@Generated("com.reprezen.jsonoverlay.gen.CodeGenerator")
public void setScopes(Map scopes) {
_setMap("scopes", scopes, String.class);
}
@Override
@Generated("com.reprezen.jsonoverlay.gen.CodeGenerator")
public void setScope(String name, String scope) {
_set("scopes", name, scope, String.class);
}
@Override
@Generated("com.reprezen.jsonoverlay.gen.CodeGenerator")
public void removeScope(String name) {
_remove("scopes", name, String.class);
}
// ScopesExtension
@Override
@Generated("com.reprezen.jsonoverlay.gen.CodeGenerator")
public Map getScopesExtensions() {
return _getMap("scopesExtensions", Object.class);
}
@Override
@Generated("com.reprezen.jsonoverlay.gen.CodeGenerator")
public Map getScopesExtensions(boolean elaborate) {
return _getMap("scopesExtensions", elaborate, Object.class);
}
@Override
@Generated("com.reprezen.jsonoverlay.gen.CodeGenerator")
public boolean hasScopesExtensions() {
return _isPresent("scopesExtensions");
}
@Override
@Generated("com.reprezen.jsonoverlay.gen.CodeGenerator")
public boolean hasScopesExtension(String name) {
return _getMap("scopesExtensions", Object.class).containsKey(name);
}
@Override
@Generated("com.reprezen.jsonoverlay.gen.CodeGenerator")
public Object getScopesExtension(String name) {
return _get("scopesExtensions", name, Object.class);
}
@Override
@Generated("com.reprezen.jsonoverlay.gen.CodeGenerator")
public void setScopesExtensions(Map scopesExtensions) {
_setMap("scopesExtensions", scopesExtensions, Object.class);
}
@Override
@Generated("com.reprezen.jsonoverlay.gen.CodeGenerator")
public void setScopesExtension(String name, Object scopesExtension) {
_set("scopesExtensions", name, scopesExtension, Object.class);
}
@Override
@Generated("com.reprezen.jsonoverlay.gen.CodeGenerator")
public void removeScopesExtension(String name) {
_remove("scopesExtensions", name, Object.class);
}
// Extension
@Override
@Generated("com.reprezen.jsonoverlay.gen.CodeGenerator")
public Map getExtensions() {
return _getMap("extensions", Object.class);
}
@Override
@Generated("com.reprezen.jsonoverlay.gen.CodeGenerator")
public Map getExtensions(boolean elaborate) {
return _getMap("extensions", elaborate, Object.class);
}
@Override
@Generated("com.reprezen.jsonoverlay.gen.CodeGenerator")
public boolean hasExtensions() {
return _isPresent("extensions");
}
@Override
@Generated("com.reprezen.jsonoverlay.gen.CodeGenerator")
public boolean hasExtension(String name) {
return _getMap("extensions", Object.class).containsKey(name);
}
@Override
@Generated("com.reprezen.jsonoverlay.gen.CodeGenerator")
public Object getExtension(String name) {
return _get("extensions", name, Object.class);
}
@Override
@Generated("com.reprezen.jsonoverlay.gen.CodeGenerator")
public void setExtensions(Map extensions) {
_setMap("extensions", extensions, Object.class);
}
@Override
@Generated("com.reprezen.jsonoverlay.gen.CodeGenerator")
public void setExtension(String name, Object extension) {
_set("extensions", name, extension, Object.class);
}
@Override
@Generated("com.reprezen.jsonoverlay.gen.CodeGenerator")
public void removeExtension(String name) {
_remove("extensions", name, Object.class);
}
@Generated("com.reprezen.jsonoverlay.gen.CodeGenerator")
public static final String F_authorizationUrl = "authorizationUrl";
@Generated("com.reprezen.jsonoverlay.gen.CodeGenerator")
public static final String F_tokenUrl = "tokenUrl";
@Generated("com.reprezen.jsonoverlay.gen.CodeGenerator")
public static final String F_refreshUrl = "refreshUrl";
@Generated("com.reprezen.jsonoverlay.gen.CodeGenerator")
public static final String F_scopes = "scopes";
@Generated("com.reprezen.jsonoverlay.gen.CodeGenerator")
public static final String F_scopesExtensions = "scopesExtensions";
@Generated("com.reprezen.jsonoverlay.gen.CodeGenerator")
public static final String F_extensions = "extensions";
@Override
@Generated("com.reprezen.jsonoverlay.gen.CodeGenerator")
protected void _elaborateJson() {
super._elaborateJson();
_createScalar("authorizationUrl", "authorizationUrl", StringOverlay.factory);
_createScalar("tokenUrl", "tokenUrl", StringOverlay.factory);
_createScalar("refreshUrl", "refreshUrl", StringOverlay.factory);
_createMap("scopes", "scopes", StringOverlay.factory, "(?!x-).*");
_createMap("scopesExtensions", "scopes", ObjectOverlay.factory, "x-.+");
_createMap("extensions", "", ObjectOverlay.factory, "x-.+");
}
@Generated("com.reprezen.jsonoverlay.gen.CodeGenerator")
public static OverlayFactory factory = new OverlayFactory() {
@Override
protected Class extends JsonOverlay super OAuthFlow>> getOverlayClass() {
return OAuthFlowImpl.class;
}
@Override
public JsonOverlay _create(OAuthFlow oAuthFlow, JsonOverlay> parent, ReferenceManager refMgr) {
JsonOverlay> overlay;
overlay = new OAuthFlowImpl(oAuthFlow, parent, refMgr);
@SuppressWarnings("unchecked")
JsonOverlay castOverlay = (JsonOverlay) overlay;
return castOverlay;
}
@Override
public JsonOverlay _create(JsonNode json, JsonOverlay> parent, ReferenceManager refMgr) {
JsonOverlay> overlay;
overlay = new OAuthFlowImpl(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 extends OAuthFlow> getSubtypeOf(OAuthFlow oAuthFlow) {
return OAuthFlow.class;
}
@Generated("com.reprezen.jsonoverlay.gen.CodeGenerator")
private static Class extends OAuthFlow> getSubtypeOf(JsonNode json) {
return OAuthFlow.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 > OAuthFlow create(OV modelMember) {
return (OAuthFlow) builder(modelMember).build();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy