<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <title>SO Guilin APIs</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <meta charset="UTF-8" />
    <script>
/*! jQuery v3.1.0 | (c) jQuery Foundation | jquery.org/license */
!function(a,b){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){"use strict";var c=[],d=a.document,e=Object.getPrototypeOf,f=c.slice,g=c.concat,h=c.push,i=c.indexOf,j={},k=j.toString,l=j.hasOwnProperty,m=l.toString,n=m.call(Object),o={};function p(a,b){b=b||d;var c=b.createElement("script");c.text=a,b.head.appendChild(c).parentNode.removeChild(c)}var q="3.1.0",r=function(a,b){return new r.fn.init(a,b)},s=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,t=/^-ms-/,u=/-([a-z])/g,v=function(a,b){return b.toUpperCase()};r.fn=r.prototype={jquery:q,constructor:r,length:0,toArray:function(){return f.call(this)},get:function(a){return null!=a?a<0?this[a+this.length]:this[a]:f.call(this)},pushStack:function(a){var b=r.merge(this.constructor(),a);return b.prevObject=this,b},each:function(a){return r.each(this,a)},map:function(a){return this.pushStack(r.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(f.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(a<0?b:0);return this.pushStack(c>=0&&c<b?[this[c]]:[])},end:function(){return this.prevObject||this.constructor()},push:h,sort:c.sort,splice:c.splice},r.extend=r.fn.extend=function(){var a,b,c,d,e,f,g=arguments[0]||{},h=1,i=arguments.length,j=!1;for("boolean"==typeof g&&(j=g,g=arguments[h]||{},h++),"object"==typeof g||r.isFunction(g)||(g={}),h===i&&(g=this,h--);h<i;h++)if(null!=(a=arguments[h]))for(b in a)c=g[b],d=a[b],g!==d&&(j&&d&&(r.isPlainObject(d)||(e=r.isArray(d)))?(e?(e=!1,f=c&&r.isArray(c)?c:[]):f=c&&r.isPlainObject(c)?c:{},g[b]=r.extend(j,f,d)):void 0!==d&&(g[b]=d));return g},r.extend({expando:"jQuery"+(q+Math.random()).replace(/\D/g,""),isReady:!0,error:function(a){throw new Error(a)},noop:function(){},isFunction:function(a){return"function"===r.type(a)},isArray:Array.isArray,isWindow:function(a){return null!=a&&a===a.window},isNumeric:function(a){var b=r.type(a);return("number"===b||"string"===b)&&!isNaN(a-parseFloat(a))},isPlainObject:function(a){var b,c;return!(!a||"[object Object]"!==k.call(a))&&(!(b=e(a))||(c=l.call(b,"constructor")&&b.constructor,"function"==typeof c&&m.call(c)===n))},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},type:function(a){return null==a?a+"":"object"==typeof a||"function"==typeof a?j[k.call(a)]||"object":typeof a},globalEval:function(a){p(a)},camelCase:function(a){return a.replace(t,"ms-").replace(u,v)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,b){var c,d=0;if(w(a)){for(c=a.length;d<c;d++)if(b.call(a[d],d,a[d])===!1)break}else for(d in a)if(b.call(a[d],d,a[d])===!1)break;return a},trim:function(a){return null==a?"":(a+"").replace(s,"")},makeArray:function(a,b){var c=b||[];return null!=a&&(w(Object(a))?r.merge(c,"string"==typeof a?[a]:a):h.call(c,a)),c},inArray:function(a,b,c){return null==b?-1:i.call(b,a,c)},merge:function(a,b){for(var c=+b.length,d=0,e=a.length;d<c;d++)a[e++]=b[d];return a.length=e,a},grep:function(a,b,c){for(var d,e=[],f=0,g=a.length,h=!c;f<g;f++)d=!b(a[f],f),d!==h&&e.push(a[f]);return e},map:function(a,b,c){var d,e,f=0,h=[];if(w(a))for(d=a.length;f<d;f++)e=b(a[f],f,c),null!=e&&h.push(e);else for(f in a)e=b(a[f],f,c),null!=e&&h.push(e);return g.apply([],h)},guid:1,proxy:function(a,b){var c,d,e;if("string"==typeof b&&(c=a[b],b=a,a=c),r.isFunction(a))return d=f.call(arguments,2),e=function(){return a.apply(b||this,d.concat(f.call(arguments)))},e.guid=a.guid=a.guid||r.guid++,e},now:Date.now,support:o}),"function"==typeof Symbol&&(r.fn[Symbol.iterator]=c[Symbol.iterator]),r.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(a,b){j["[object "+b+"]"]=b.toLowerCase()});function w(a){var b=!!a&&"length"in a&&a.length,c=r.type(a);return"function"!==c&&!r.isWindow(a)&&("array"===c||0===b||"number"==typeof b&&b>0&&b-1 in a)}var x=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u="sizzle"+1*new Date,v=a.document,w=0,x=0,y=ha(),z=ha(),A=ha(),B=function(a,b){return a===b&&(l=!0),0},C={}.hasOwnProperty,D=[],E=D.pop,F=D.push,G=D.push,H=D.slice,I=function(a,b){for(var c=0,d=a.length;c<d;c++)if(a[c]===b)return c;return-1},J="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",K="[\\x20\\t\\r\\n\\f]",L="(?:\\\\.|[\\w-]|[^\0-\\xa0])+",M="\\["+K+"*("+L+")(?:"+K+"*([*^$|!~]?=)"+K+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+L+"))|)"+K+"*\\]",N=":("+L+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+M+")*)|.*)\\)|)",O=new RegExp(K+"+","g"),P=new RegExp("^"+K+"+|((?:^|[^\\\\])(?:\\\\.)*)"+K+"+$","g"),Q=new RegExp("^"+K+"*,"+K+"*"),R=new RegExp("^"+K+"*([>+~]|"+K+")"+K+"*"),S=new RegExp("="+K+"*([^\\]'\"]*?)"+K+"*\\]","g"),T=new RegExp(N),U=new RegExp("^"+L+"$"),V={ID:new RegExp("^#("+L+")"),CLASS:new RegExp("^\\.("+L+")"),TAG:new RegExp("^("+L+"|[*])"),ATTR:new RegExp("^"+M),PSEUDO:new RegExp("^"+N),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+K+"*(even|odd|(([+-]|)(\\d*)n|)"+K+"*(?:([+-]|)"+K+"*(\\d+)|))"+K+"*\\)|)","i"),bool:new RegExp("^(?:"+J+")$","i"),needsContext:new RegExp("^"+K+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+K+"*((?:-\\d)?\\d*)"+K+"*\\)|)(?=[^-]|$)","i")},W=/^(?:input|select|textarea|button)$/i,X=/^h\d$/i,Y=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,$=/[+~]/,_=new RegExp("\\\\([\\da-f]{1,6}"+K+"?|("+K+")|.)","ig"),aa=function(a,b,c){var d="0x"+b-65536;return d!==d||c?b:d<0?String.fromCharCode(d+65536):String.fromCharCode(d>>10|55296,1023&d|56320)},ba=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\x80-\uFFFF\w-]/g,ca=function(a,b){return b?"\0"===a?"\ufffd":a.slice(0,-1)+"\\"+a.charCodeAt(a.length-1).toString(16)+" ":"\\"+a},da=function(){m()},ea=ta(function(a){return a.disabled===!0},{dir:"parentNode",next:"legend"});try{G.apply(D=H.call(v.childNodes),v.childNodes),D[v.childNodes.length].nodeType}catch(fa){G={apply:D.length?function(a,b){F.apply(a,H.call(b))}:function(a,b){var c=a.length,d=0;while(a[c++]=b[d++]);a.length=c-1}}}function ga(a,b,d,e){var f,h,j,k,l,o,r,s=b&&b.ownerDocument,w=b?b.nodeType:9;if(d=d||[],"string"!=typeof a||!a||1!==w&&9!==w&&11!==w)return d;if(!e&&((b?b.ownerDocument||b:v)!==n&&m(b),b=b||n,p)){if(11!==w&&(l=Z.exec(a)))if(f=l[1]){if(9===w){if(!(j=b.getElementById(f)))return d;if(j.id===f)return d.push(j),d}else if(s&&(j=s.getElementById(f))&&t(b,j)&&j.id===f)return d.push(j),d}else{if(l[2])return G.apply(d,b.getElementsByTagName(a)),d;if((f=l[3])&&c.getElementsByClassName&&b.getElementsByClassName)return G.apply(d,b.getElementsByClassName(f)),d}if(c.qsa&&!A[a+" "]&&(!q||!q.test(a))){if(1!==w)s=b,r=a;else if("object"!==b.nodeName.toLowerCase()){(k=b.getAttribute("id"))?k=k.replace(ba,ca):b.setAttribute("id",k=u),o=g(a),h=o.length;while(h--)o[h]="#"+k+" "+sa(o[h]);r=o.join(","),s=$.test(a)&&qa(b.parentNode)||b}if(r)try{return G.apply(d,s.querySelectorAll(r)),d}catch(x){}finally{k===u&&b.removeAttribute("id")}}}return i(a.replace(P,"$1"),b,d,e)}function ha(){var a=[];function b(c,e){return a.push(c+" ")>d.cacheLength&&delete b[a.shift()],b[c+" "]=e}return b}function ia(a){return a[u]=!0,a}function ja(a){var b=n.createElement("fieldset");try{return!!a(b)}catch(c){return!1}finally{b.parentNode&&b.parentNode.removeChild(b),b=null}}function ka(a,b){var c=a.split("|"),e=c.length;while(e--)d.attrHandle[c[e]]=b}function la(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&a.sourceIndex-b.sourceIndex;if(d)return d;if(c)while(c=c.nextSibling)if(c===b)return-1;return a?1:-1}function ma(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function na(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function oa(a){return function(b){return"label"in b&&b.disabled===a||"form"in b&&b.disabled===a||"form"in b&&b.disabled===!1&&(b.isDisabled===a||b.isDisabled!==!a&&("label"in b||!ea(b))!==a)}}function pa(a){return ia(function(b){return b=+b,ia(function(c,d){var e,f=a([],c.length,b),g=f.length;while(g--)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function qa(a){return a&&"undefined"!=typeof a.getElementsByTagName&&a}c=ga.support={},f=ga.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return!!b&&"HTML"!==b.nodeName},m=ga.setDocument=function(a){var b,e,g=a?a.ownerDocument||a:v;return g!==n&&9===g.nodeType&&g.documentElement?(n=g,o=n.documentElement,p=!f(n),v!==n&&(e=n.defaultView)&&e.top!==e&&(e.addEventListener?e.addEventListener("unload",da,!1):e.attachEvent&&e.attachEvent("onunload",da)),c.attributes=ja(function(a){return a.className="i",!a.getAttribute("className")}),c.getElementsByTagName=ja(function(a){return a.appendChild(n.createComment("")),!a.getElementsByTagName("*").length}),c.getElementsByClassName=Y.test(n.getElementsByClassName),c.getById=ja(function(a){return o.appendChild(a).id=u,!n.getElementsByName||!n.getElementsByName(u).length}),c.getById?(d.find.ID=function(a,b){if("undefined"!=typeof b.getElementById&&p){var c=b.getElementById(a);return c?[c]:[]}},d.filter.ID=function(a){var b=a.replace(_,aa);return function(a){return a.getAttribute("id")===b}}):(delete d.find.ID,d.filter.ID=function(a){var b=a.replace(_,aa);return function(a){var c="undefined"!=typeof a.getAttributeNode&&a.getAttributeNode("id");return c&&c.value===b}}),d.find.TAG=c.getElementsByTagName?function(a,b){return"undefined"!=typeof b.getElementsByTagName?b.getElementsByTagName(a):c.qsa?b.querySelectorAll(a):void 0}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);if("*"===a){while(c=f[e++])1===c.nodeType&&d.push(c);return d}return f},d.find.CLASS=c.getElementsByClassName&&function(a,b){if("undefined"!=typeof b.getElementsByClassName&&p)return b.getElementsByClassName(a)},r=[],q=[],(c.qsa=Y.test(n.querySelectorAll))&&(ja(function(a){o.appendChild(a).innerHTML="<a id='"+u+"'></a><select id='"+u+"-\r\\' msallowcapture=''><option selected=''></option></select>",a.querySelectorAll("[msallowcapture^='']").length&&q.push("[*^$]="+K+"*(?:''|\"\")"),a.querySelectorAll("[selected]").length||q.push("\\["+K+"*(?:value|"+J+")"),a.querySelectorAll("[id~="+u+"-]").length||q.push("~="),a.querySelectorAll(":checked").length||q.push(":checked"),a.querySelectorAll("a#"+u+"+*").length||q.push(".#.+[+~]")}),ja(function(a){a.innerHTML="<a href='' disabled='disabled'></a><select disabled='disabled'><option/></select>";var b=n.createElement("input");b.setAttribute("type","hidden"),a.appendChild(b).setAttribute("name","D"),a.querySelectorAll("[name=d]").length&&q.push("name"+K+"*[*^$|!~]?="),2!==a.querySelectorAll(":enabled").length&&q.push(":enabled",":disabled"),o.appendChild(a).disabled=!0,2!==a.querySelectorAll(":disabled").length&&q.push(":enabled",":disabled"),a.querySelectorAll("*,:x"),q.push(",.*:")})),(c.matchesSelector=Y.test(s=o.matches||o.webkitMatchesSelector||o.mozMatchesSelector||o.oMatchesSelector||o.msMatchesSelector))&&ja(function(a){c.disconnectedMatch=s.call(a,"*"),s.call(a,"[s!='']:x"),r.push("!=",N)}),q=q.length&&new RegExp(q.join("|")),r=r.length&&new RegExp(r.join("|")),b=Y.test(o.compareDocumentPosition),t=b||Y.test(o.contains)?function(a,b){var c=9===a.nodeType?a.documentElement:a,d=b&&b.parentNode;return a===d||!(!d||1!==d.nodeType||!(c.contains?c.contains(d):a.compareDocumentPosition&&16&a.compareDocumentPosition(d)))}:function(a,b){if(b)while(b=b.parentNode)if(b===a)return!0;return!1},B=b?function(a,b){if(a===b)return l=!0,0;var d=!a.compareDocumentPosition-!b.compareDocumentPosition;return d?d:(d=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1,1&d||!c.sortDetached&&b.compareDocumentPosition(a)===d?a===n||a.ownerDocument===v&&t(v,a)?-1:b===n||b.ownerDocument===v&&t(v,b)?1:k?I(k,a)-I(k,b):0:4&d?-1:1)}:function(a,b){if(a===b)return l=!0,0;var c,d=0,e=a.parentNode,f=b.parentNode,g=[a],h=[b];if(!e||!f)return a===n?-1:b===n?1:e?-1:f?1:k?I(k,a)-I(k,b):0;if(e===f)return la(a,b);c=a;while(c=c.parentNode)g.unshift(c);c=b;while(c=c.parentNode)h.unshift(c);while(g[d]===h[d])d++;return d?la(g[d],h[d]):g[d]===v?-1:h[d]===v?1:0},n):n},ga.matches=function(a,b){return ga(a,null,null,b)},ga.matchesSelector=function(a,b){if((a.ownerDocument||a)!==n&&m(a),b=b.replace(S,"='$1']"),c.matchesSelector&&p&&!A[b+" "]&&(!r||!r.test(b))&&(!q||!q.test(b)))try{var d=s.call(a,b);if(d||c.disconnectedMatch||a.document&&11!==a.document.nodeType)return d}catch(e){}return ga(b,n,null,[a]).length>0},ga.contains=function(a,b){return(a.ownerDocument||a)!==n&&m(a),t(a,b)},ga.attr=function(a,b){(a.ownerDocument||a)!==n&&m(a);var e=d.attrHandle[b.toLowerCase()],f=e&&C.call(d.attrHandle,b.toLowerCase())?e(a,b,!p):void 0;return void 0!==f?f:c.attributes||!p?a.getAttribute(b):(f=a.getAttributeNode(b))&&f.specified?f.value:null},ga.escape=function(a){return(a+"").replace(ba,ca)},ga.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},ga.uniqueSort=function(a){var b,d=[],e=0,f=0;if(l=!c.detectDuplicates,k=!c.sortStable&&a.slice(0),a.sort(B),l){while(b=a[f++])b===a[f]&&(e=d.push(f));while(e--)a.splice(d[e],1)}return k=null,a},e=ga.getText=function(a){var b,c="",d=0,f=a.nodeType;if(f){if(1===f||9===f||11===f){if("string"==typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=e(a)}else if(3===f||4===f)return a.nodeValue}else while(b=a[d++])c+=e(b);return c},d=ga.selectors={cacheLength:50,createPseudo:ia,match:V,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(_,aa),a[3]=(a[3]||a[4]||a[5]||"").replace(_,aa),"~="===a[2]&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),"nth"===a[1].slice(0,3)?(a[3]||ga.error(a[0]),a[4]=+(a[4]?a[5]+(a[6]||1):2*("even"===a[3]||"odd"===a[3])),a[5]=+(a[7]+a[8]||"odd"===a[3])):a[3]&&ga.error(a[0]),a},PSEUDO:function(a){var b,c=!a[6]&&a[2];return V.CHILD.test(a[0])?null:(a[3]?a[2]=a[4]||a[5]||"":c&&T.test(c)&&(b=g(c,!0))&&(b=c.indexOf(")",c.length-b)-c.length)&&(a[0]=a[0].slice(0,b),a[2]=c.slice(0,b)),a.slice(0,3))}},filter:{TAG:function(a){var b=a.replace(_,aa).toLowerCase();return"*"===a?function(){return!0}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=y[a+" "];return b||(b=new RegExp("(^|"+K+")"+a+"("+K+"|$)"))&&y(a,function(a){return b.test("string"==typeof a.className&&a.className||"undefined"!=typeof a.getAttribute&&a.getAttribute("class")||"")})},ATTR:function(a,b,c){return function(d){var e=ga.attr(d,a);return null==e?"!="===b:!b||(e+="","="===b?e===c:"!="===b?e!==c:"^="===b?c&&0===e.indexOf(c):"*="===b?c&&e.indexOf(c)>-1:"$="===b?c&&e.slice(-c.length)===c:"~="===b?(" "+e.replace(O," ")+" ").indexOf(c)>-1:"|="===b&&(e===c||e.slice(0,c.length+1)===c+"-"))}},CHILD:function(a,b,c,d,e){var f="nth"!==a.slice(0,3),g="last"!==a.slice(-4),h="of-type"===b;return 1===d&&0===e?function(a){return!!a.parentNode}:function(b,c,i){var j,k,l,m,n,o,p=f!==g?"nextSibling":"previousSibling",q=b.parentNode,r=h&&b.nodeName.toLowerCase(),s=!i&&!h,t=!1;if(q){if(f){while(p){m=b;while(m=m[p])if(h?m.nodeName.toLowerCase()===r:1===m.nodeType)return!1;o=p="only"===a&&!o&&"nextSibling"}return!0}if(o=[g?q.firstChild:q.lastChild],g&&s){m=q,l=m[u]||(m[u]={}),k=l[m.uniqueID]||(l[m.uniqueID]={}),j=k[a]||[],n=j[0]===w&&j[1],t=n&&j[2],m=n&&q.childNodes[n];while(m=++n&&m&&m[p]||(t=n=0)||o.pop())if(1===m.nodeType&&++t&&m===b){k[a]=[w,n,t];break}}else if(s&&(m=b,l=m[u]||(m[u]={}),k=l[m.uniqueID]||(l[m.uniqueID]={}),j=k[a]||[],n=j[0]===w&&j[1],t=n),t===!1)while(m=++n&&m&&m[p]||(t=n=0)||o.pop())if((h?m.nodeName.toLowerCase()===r:1===m.nodeType)&&++t&&(s&&(l=m[u]||(m[u]={}),k=l[m.uniqueID]||(l[m.uniqueID]={}),k[a]=[w,t]),m===b))break;return t-=e,t===d||t%d===0&&t/d>=0}}},PSEUDO:function(a,b){var c,e=d.pseudos[a]||d.setFilters[a.toLowerCase()]||ga.error("unsupported pseudo: "+a);return e[u]?e(b):e.length>1?(c=[a,a,"",b],d.setFilters.hasOwnProperty(a.toLowerCase())?ia(function(a,c){var d,f=e(a,b),g=f.length;while(g--)d=I(a,f[g]),a[d]=!(c[d]=f[g])}):function(a){return e(a,0,c)}):e}},pseudos:{not:ia(function(a){var b=[],c=[],d=h(a.replace(P,"$1"));return d[u]?ia(function(a,b,c,e){var f,g=d(a,null,e,[]),h=a.length;while(h--)(f=g[h])&&(a[h]=!(b[h]=f))}):function(a,e,f){return b[0]=a,d(b,null,f,c),b[0]=null,!c.pop()}}),has:ia(function(a){return function(b){return ga(a,b).length>0}}),contains:ia(function(a){return a=a.replace(_,aa),function(b){return(b.textContent||b.innerText||e(b)).indexOf(a)>-1}}),lang:ia(function(a){return U.test(a||"")||ga.error("unsupported lang: "+a),a=a.replace(_,aa).toLowerCase(),function(b){var c;do if(c=p?b.lang:b.getAttribute("xml:lang")||b.getAttribute("lang"))return c=c.toLowerCase(),c===a||0===c.indexOf(a+"-");while((b=b.parentNode)&&1===b.nodeType);return!1}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===o},focus:function(a){return a===n.activeElement&&(!n.hasFocus||n.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:oa(!1),disabled:oa(!0),checked:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&!!a.checked||"option"===b&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeType<6)return!1;return!0},parent:function(a){return!d.pseudos.empty(a)},header:function(a){return X.test(a.nodeName)},input:function(a){return W.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&"button"===a.type||"button"===b},text:function(a){var b;return"input"===a.nodeName.toLowerCase()&&"text"===a.type&&(null==(b=a.getAttribute("type"))||"text"===b.toLowerCase())},first:pa(function(){return[0]}),last:pa(function(a,b){return[b-1]}),eq:pa(function(a,b,c){return[c<0?c+b:c]}),even:pa(function(a,b){for(var c=0;c<b;c+=2)a.push(c);return a}),odd:pa(function(a,b){for(var c=1;c<b;c+=2)a.push(c);return a}),lt:pa(function(a,b,c){for(var d=c<0?c+b:c;--d>=0;)a.push(d);return a}),gt:pa(function(a,b,c){for(var d=c<0?c+b:c;++d<b;)a.push(d);return a})}},d.pseudos.nth=d.pseudos.eq;for(b in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})d.pseudos[b]=ma(b);for(b in{submit:!0,reset:!0})d.pseudos[b]=na(b);function ra(){}ra.prototype=d.filters=d.pseudos,d.setFilters=new ra,g=ga.tokenize=function(a,b){var c,e,f,g,h,i,j,k=z[a+" "];if(k)return b?0:k.slice(0);h=a,i=[],j=d.preFilter;while(h){c&&!(e=Q.exec(h))||(e&&(h=h.slice(e[0].length)||h),i.push(f=[])),c=!1,(e=R.exec(h))&&(c=e.shift(),f.push({value:c,type:e[0].replace(P," ")}),h=h.slice(c.length));for(g in d.filter)!(e=V[g].exec(h))||j[g]&&!(e=j[g](e))||(c=e.shift(),f.push({value:c,type:g,matches:e}),h=h.slice(c.length));if(!c)break}return b?h.length:h?ga.error(a):z(a,i).slice(0)};function sa(a){for(var b=0,c=a.length,d="";b<c;b++)d+=a[b].value;return d}function ta(a,b,c){var d=b.dir,e=b.next,f=e||d,g=c&&"parentNode"===f,h=x++;return b.first?function(b,c,e){while(b=b[d])if(1===b.nodeType||g)return a(b,c,e)}:function(b,c,i){var j,k,l,m=[w,h];if(i){while(b=b[d])if((1===b.nodeType||g)&&a(b,c,i))return!0}else while(b=b[d])if(1===b.nodeType||g)if(l=b[u]||(b[u]={}),k=l[b.uniqueID]||(l[b.uniqueID]={}),e&&e===b.nodeName.toLowerCase())b=b[d]||b;else{if((j=k[f])&&j[0]===w&&j[1]===h)return m[2]=j[2];if(k[f]=m,m[2]=a(b,c,i))return!0}}}function ua(a){return a.length>1?function(b,c,d){var e=a.length;while(e--)if(!a[e](b,c,d))return!1;return!0}:a[0]}function va(a,b,c){for(var d=0,e=b.length;d<e;d++)ga(a,b[d],c);return c}function wa(a,b,c,d,e){for(var f,g=[],h=0,i=a.length,j=null!=b;h<i;h++)(f=a[h])&&(c&&!c(f,d,e)||(g.push(f),j&&b.push(h)));return g}function xa(a,b,c,d,e,f){return d&&!d[u]&&(d=xa(d)),e&&!e[u]&&(e=xa(e,f)),ia(function(f,g,h,i){var j,k,l,m=[],n=[],o=g.length,p=f||va(b||"*",h.nodeType?[h]:h,[]),q=!a||!f&&b?p:wa(p,m,a,h,i),r=c?e||(f?a:o||d)?[]:g:q;if(c&&c(q,r,h,i),d){j=wa(r,n),d(j,[],h,i),k=j.length;while(k--)(l=j[k])&&(r[n[k]]=!(q[n[k]]=l))}if(f){if(e||a){if(e){j=[],k=r.length;while(k--)(l=r[k])&&j.push(q[k]=l);e(null,r=[],j,i)}k=r.length;while(k--)(l=r[k])&&(j=e?I(f,l):m[k])>-1&&(f[j]=!(g[j]=l))}}else r=wa(r===g?r.splice(o,r.length):r),e?e(null,g,r,i):G.apply(g,r)})}function ya(a){for(var b,c,e,f=a.length,g=d.relative[a[0].type],h=g||d.relative[" "],i=g?1:0,k=ta(function(a){return a===b},h,!0),l=ta(function(a){return I(b,a)>-1},h,!0),m=[function(a,c,d){var e=!g&&(d||c!==j)||((b=c).nodeType?k(a,c,d):l(a,c,d));return b=null,e}];i<f;i++)if(c=d.relative[a[i].type])m=[ta(ua(m),c)];else{if(c=d.filter[a[i].type].apply(null,a[i].matches),c[u]){for(e=++i;e<f;e++)if(d.relative[a[e].type])break;return xa(i>1&&ua(m),i>1&&sa(a.slice(0,i-1).concat({value:" "===a[i-2].type?"*":""})).replace(P,"$1"),c,i<e&&ya(a.slice(i,e)),e<f&&ya(a=a.slice(e)),e<f&&sa(a))}m.push(c)}return ua(m)}function za(a,b){var c=b.length>0,e=a.length>0,f=function(f,g,h,i,k){var l,o,q,r=0,s="0",t=f&&[],u=[],v=j,x=f||e&&d.find.TAG("*",k),y=w+=null==v?1:Math.random()||.1,z=x.length;for(k&&(j=g===n||g||k);s!==z&&null!=(l=x[s]);s++){if(e&&l){o=0,g||l.ownerDocument===n||(m(l),h=!p);while(q=a[o++])if(q(l,g||n,h)){i.push(l);break}k&&(w=y)}c&&((l=!q&&l)&&r--,f&&t.push(l))}if(r+=s,c&&s!==r){o=0;while(q=b[o++])q(t,u,g,h);if(f){if(r>0)while(s--)t[s]||u[s]||(u[s]=E.call(i));u=wa(u)}G.apply(i,u),k&&!f&&u.length>0&&r+b.length>1&&ga.uniqueSort(i)}return k&&(w=y,j=v),t};return c?ia(f):f}return h=ga.compile=function(a,b){var c,d=[],e=[],f=A[a+" "];if(!f){b||(b=g(a)),c=b.length;while(c--)f=ya(b[c]),f[u]?d.push(f):e.push(f);f=A(a,za(e,d)),f.selector=a}return f},i=ga.select=function(a,b,e,f){var i,j,k,l,m,n="function"==typeof a&&a,o=!f&&g(a=n.selector||a);if(e=e||[],1===o.length){if(j=o[0]=o[0].slice(0),j.length>2&&"ID"===(k=j[0]).type&&c.getById&&9===b.nodeType&&p&&d.relative[j[1].type]){if(b=(d.find.ID(k.matches[0].replace(_,aa),b)||[])[0],!b)return e;n&&(b=b.parentNode),a=a.slice(j.shift().value.length)}i=V.needsContext.test(a)?0:j.length;while(i--){if(k=j[i],d.relative[l=k.type])break;if((m=d.find[l])&&(f=m(k.matches[0].replace(_,aa),$.test(j[0].type)&&qa(b.parentNode)||b))){if(j.splice(i,1),a=f.length&&sa(j),!a)return G.apply(e,f),e;break}}}return(n||h(a,o))(f,b,!p,e,!b||$.test(a)&&qa(b.parentNode)||b),e},c.sortStable=u.split("").sort(B).join("")===u,c.detectDuplicates=!!l,m(),c.sortDetached=ja(function(a){return 1&a.compareDocumentPosition(n.createElement("fieldset"))}),ja(function(a){return a.innerHTML="<a href='#'></a>","#"===a.firstChild.getAttribute("href")})||ka("type|href|height|width",function(a,b,c){if(!c)return a.getAttribute(b,"type"===b.toLowerCase()?1:2)}),c.attributes&&ja(function(a){return a.innerHTML="<input/>",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")})||ka("value",function(a,b,c){if(!c&&"input"===a.nodeName.toLowerCase())return a.defaultValue}),ja(function(a){return null==a.getAttribute("disabled")})||ka(J,function(a,b,c){var d;if(!c)return a[b]===!0?b.toLowerCase():(d=a.getAttributeNode(b))&&d.specified?d.value:null}),ga}(a);r.find=x,r.expr=x.selectors,r.expr[":"]=r.expr.pseudos,r.uniqueSort=r.unique=x.uniqueSort,r.text=x.getText,r.isXMLDoc=x.isXML,r.contains=x.contains,r.escapeSelector=x.escape;var y=function(a,b,c){var d=[],e=void 0!==c;while((a=a[b])&&9!==a.nodeType)if(1===a.nodeType){if(e&&r(a).is(c))break;d.push(a)}return d},z=function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c},A=r.expr.match.needsContext,B=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i,C=/^.[^:#\[\.,]*$/;function D(a,b,c){if(r.isFunction(b))return r.grep(a,function(a,d){return!!b.call(a,d,a)!==c});if(b.nodeType)return r.grep(a,function(a){return a===b!==c});if("string"==typeof b){if(C.test(b))return r.filter(b,a,c);b=r.filter(b,a)}return r.grep(a,function(a){return i.call(b,a)>-1!==c&&1===a.nodeType})}r.filter=function(a,b,c){var d=b[0];return c&&(a=":not("+a+")"),1===b.length&&1===d.nodeType?r.find.matchesSelector(d,a)?[d]:[]:r.find.matches(a,r.grep(b,function(a){return 1===a.nodeType}))},r.fn.extend({find:function(a){var b,c,d=this.length,e=this;if("string"!=typeof a)return this.pushStack(r(a).filter(function(){for(b=0;b<d;b++)if(r.contains(e[b],this))return!0}));for(c=this.pushStack([]),b=0;b<d;b++)r.find(a,e[b],c);return d>1?r.uniqueSort(c):c},filter:function(a){return this.pushStack(D(this,a||[],!1))},not:function(a){return this.pushStack(D(this,a||[],!0))},is:function(a){return!!D(this,"string"==typeof a&&A.test(a)?r(a):a||[],!1).length}});var E,F=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/,G=r.fn.init=function(a,b,c){var e,f;if(!a)return this;if(c=c||E,"string"==typeof a){if(e="<"===a[0]&&">"===a[a.length-1]&&a.length>=3?[null,a,null]:F.exec(a),!e||!e[1]&&b)return!b||b.jquery?(b||c).find(a):this.constructor(b).find(a);if(e[1]){if(b=b instanceof r?b[0]:b,r.merge(this,r.parseHTML(e[1],b&&b.nodeType?b.ownerDocument||b:d,!0)),B.test(e[1])&&r.isPlainObject(b))for(e in b)r.isFunction(this[e])?this[e](b[e]):this.attr(e,b[e]);return this}return f=d.getElementById(e[2]),f&&(this[0]=f,this.length=1),this}return a.nodeType?(this[0]=a,this.length=1,this):r.isFunction(a)?void 0!==c.ready?c.ready(a):a(r):r.makeArray(a,this)};G.prototype=r.fn,E=r(d);var H=/^(?:parents|prev(?:Until|All))/,I={children:!0,contents:!0,next:!0,prev:!0};r.fn.extend({has:function(a){var b=r(a,this),c=b.length;return this.filter(function(){for(var a=0;a<c;a++)if(r.contains(this,b[a]))return!0})},closest:function(a,b){var c,d=0,e=this.length,f=[],g="string"!=typeof a&&r(a);if(!A.test(a))for(;d<e;d++)for(c=this[d];c&&c!==b;c=c.parentNode)if(c.nodeType<11&&(g?g.index(c)>-1:1===c.nodeType&&r.find.matchesSelector(c,a))){f.push(c);break}return this.pushStack(f.length>1?r.uniqueSort(f):f)},index:function(a){return a?"string"==typeof a?i.call(r(a),this[0]):i.call(this,a.jquery?a[0]:a):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){return this.pushStack(r.uniqueSort(r.merge(this.get(),r(a,b))))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}});function J(a,b){while((a=a[b])&&1!==a.nodeType);return a}r.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return y(a,"parentNode")},parentsUntil:function(a,b,c){return y(a,"parentNode",c)},next:function(a){return J(a,"nextSibling")},prev:function(a){return J(a,"previousSibling")},nextAll:function(a){return y(a,"nextSibling")},prevAll:function(a){return y(a,"previousSibling")},nextUntil:function(a,b,c){return y(a,"nextSibling",c)},prevUntil:function(a,b,c){return y(a,"previousSibling",c)},siblings:function(a){return z((a.parentNode||{}).firstChild,a)},children:function(a){return z(a.firstChild)},contents:function(a){return a.contentDocument||r.merge([],a.childNodes)}},function(a,b){r.fn[a]=function(c,d){var e=r.map(this,b,c);return"Until"!==a.slice(-5)&&(d=c),d&&"string"==typeof d&&(e=r.filter(d,e)),this.length>1&&(I[a]||r.uniqueSort(e),H.test(a)&&e.reverse()),this.pushStack(e)}});var K=/\S+/g;function L(a){var b={};return r.each(a.match(K)||[],function(a,c){b[c]=!0}),b}r.Callbacks=function(a){a="string"==typeof a?L(a):r.extend({},a);var b,c,d,e,f=[],g=[],h=-1,i=function(){for(e=a.once,d=b=!0;g.length;h=-1){c=g.shift();while(++h<f.length)f[h].apply(c[0],c[1])===!1&&a.stopOnFalse&&(h=f.length,c=!1)}a.memory||(c=!1),b=!1,e&&(f=c?[]:"")},j={add:function(){return f&&(c&&!b&&(h=f.length-1,g.push(c)),function d(b){r.each(b,function(b,c){r.isFunction(c)?a.unique&&j.has(c)||f.push(c):c&&c.length&&"string"!==r.type(c)&&d(c)})}(arguments),c&&!b&&i()),this},remove:function(){return r.each(arguments,function(a,b){var c;while((c=r.inArray(b,f,c))>-1)f.splice(c,1),c<=h&&h--}),this},has:function(a){return a?r.inArray(a,f)>-1:f.length>0},empty:function(){return f&&(f=[]),this},disable:function(){return e=g=[],f=c="",this},disabled:function(){return!f},lock:function(){return e=g=[],c||b||(f=c=""),this},locked:function(){return!!e},fireWith:function(a,c){return e||(c=c||[],c=[a,c.slice?c.slice():c],g.push(c),b||i()),this},fire:function(){return j.fireWith(this,arguments),this},fired:function(){return!!d}};return j};function M(a){return a}function N(a){throw a}function O(a,b,c){var d;try{a&&r.isFunction(d=a.promise)?d.call(a).done(b).fail(c):a&&r.isFunction(d=a.then)?d.call(a,b,c):b.call(void 0,a)}catch(a){c.call(void 0,a)}}r.extend({Deferred:function(b){var c=[["notify","progress",r.Callbacks("memory"),r.Callbacks("memory"),2],["resolve","done",r.Callbacks("once memory"),r.Callbacks("once memory"),0,"resolved"],["reject","fail",r.Callbacks("once memory"),r.Callbacks("once memory"),1,"rejected"]],d="pending",e={state:function(){return d},always:function(){return f.done(arguments).fail(arguments),this},"catch":function(a){return e.then(null,a)},pipe:function(){var a=arguments;return r.Deferred(function(b){r.each(c,function(c,d){var e=r.isFunction(a[d[4]])&&a[d[4]];f[d[1]](function(){var a=e&&e.apply(this,arguments);a&&r.isFunction(a.promise)?a.promise().progress(b.notify).done(b.resolve).fail(b.reject):b[d[0]+"With"](this,e?[a]:arguments)})}),a=null}).promise()},then:function(b,d,e){var f=0;function g(b,c,d,e){return function(){var h=this,i=arguments,j=function(){var a,j;if(!(b<f)){if(a=d.apply(h,i),a===c.promise())throw new TypeError("Thenable self-resolution");j=a&&("object"==typeof a||"function"==typeof a)&&a.then,r.isFunction(j)?e?j.call(a,g(f,c,M,e),g(f,c,N,e)):(f++,j.call(a,g(f,c,M,e),g(f,c,N,e),g(f,c,M,c.notifyWith))):(d!==M&&(h=void 0,i=[a]),(e||c.resolveWith)(h,i))}},k=e?j:function(){try{j()}catch(a){r.Deferred.exceptionHook&&r.Deferred.exceptionHook(a,k.stackTrace),b+1>=f&&(d!==N&&(h=void 0,i=[a]),c.rejectWith(h,i))}};b?k():(r.Deferred.getStackHook&&(k.stackTrace=r.Deferred.getStackHook()),a.setTimeout(k))}}return r.Deferred(function(a){c[0][3].add(g(0,a,r.isFunction(e)?e:M,a.notifyWith)),c[1][3].add(g(0,a,r.isFunction(b)?b:M)),c[2][3].add(g(0,a,r.isFunction(d)?d:N))}).promise()},promise:function(a){return null!=a?r.extend(a,e):e}},f={};return r.each(c,function(a,b){var g=b[2],h=b[5];e[b[1]]=g.add,h&&g.add(function(){d=h},c[3-a][2].disable,c[0][2].lock),g.add(b[3].fire),f[b[0]]=function(){return f[b[0]+"With"](this===f?void 0:this,arguments),this},f[b[0]+"With"]=g.fireWith}),e.promise(f),b&&b.call(f,f),f},when:function(a){var b=arguments.length,c=b,d=Array(c),e=f.call(arguments),g=r.Deferred(),h=function(a){return function(c){d[a]=this,e[a]=arguments.length>1?f.call(arguments):c,--b||g.resolveWith(d,e)}};if(b<=1&&(O(a,g.done(h(c)).resolve,g.reject),"pending"===g.state()||r.isFunction(e[c]&&e[c].then)))return g.then();while(c--)O(e[c],h(c),g.reject);return g.promise()}});var P=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;r.Deferred.exceptionHook=function(b,c){a.console&&a.console.warn&&b&&P.test(b.name)&&a.console.warn("jQuery.Deferred exception: "+b.message,b.stack,c)},r.readyException=function(b){a.setTimeout(function(){throw b})};var Q=r.Deferred();r.fn.ready=function(a){return Q.then(a)["catch"](function(a){r.readyException(a)}),this},r.extend({isReady:!1,readyWait:1,holdReady:function(a){a?r.readyWait++:r.ready(!0)},ready:function(a){(a===!0?--r.readyWait:r.isReady)||(r.isReady=!0,a!==!0&&--r.readyWait>0||Q.resolveWith(d,[r]))}}),r.ready.then=Q.then;function R(){d.removeEventListener("DOMContentLoaded",R),a.removeEventListener("load",R),r.ready()}"complete"===d.readyState||"loading"!==d.readyState&&!d.documentElement.doScroll?a.setTimeout(r.ready):(d.addEventListener("DOMContentLoaded",R),a.addEventListener("load",R));var S=function(a,b,c,d,e,f,g){var h=0,i=a.length,j=null==c;if("object"===r.type(c)){e=!0;for(h in c)S(a,b,h,c[h],!0,f,g)}else if(void 0!==d&&(e=!0,
r.isFunction(d)||(g=!0),j&&(g?(b.call(a,d),b=null):(j=b,b=function(a,b,c){return j.call(r(a),c)})),b))for(;h<i;h++)b(a[h],c,g?d:d.call(a[h],h,b(a[h],c)));return e?a:j?b.call(a):i?b(a[0],c):f},T=function(a){return 1===a.nodeType||9===a.nodeType||!+a.nodeType};function U(){this.expando=r.expando+U.uid++}U.uid=1,U.prototype={cache:function(a){var b=a[this.expando];return b||(b={},T(a)&&(a.nodeType?a[this.expando]=b:Object.defineProperty(a,this.expando,{value:b,configurable:!0}))),b},set:function(a,b,c){var d,e=this.cache(a);if("string"==typeof b)e[r.camelCase(b)]=c;else for(d in b)e[r.camelCase(d)]=b[d];return e},get:function(a,b){return void 0===b?this.cache(a):a[this.expando]&&a[this.expando][r.camelCase(b)]},access:function(a,b,c){return void 0===b||b&&"string"==typeof b&&void 0===c?this.get(a,b):(this.set(a,b,c),void 0!==c?c:b)},remove:function(a,b){var c,d=a[this.expando];if(void 0!==d){if(void 0!==b){r.isArray(b)?b=b.map(r.camelCase):(b=r.camelCase(b),b=b in d?[b]:b.match(K)||[]),c=b.length;while(c--)delete d[b[c]]}(void 0===b||r.isEmptyObject(d))&&(a.nodeType?a[this.expando]=void 0:delete a[this.expando])}},hasData:function(a){var b=a[this.expando];return void 0!==b&&!r.isEmptyObject(b)}};var V=new U,W=new U,X=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,Y=/[A-Z]/g;function Z(a,b,c){var d;if(void 0===c&&1===a.nodeType)if(d="data-"+b.replace(Y,"-$&").toLowerCase(),c=a.getAttribute(d),"string"==typeof c){try{c="true"===c||"false"!==c&&("null"===c?null:+c+""===c?+c:X.test(c)?JSON.parse(c):c)}catch(e){}W.set(a,b,c)}else c=void 0;return c}r.extend({hasData:function(a){return W.hasData(a)||V.hasData(a)},data:function(a,b,c){return W.access(a,b,c)},removeData:function(a,b){W.remove(a,b)},_data:function(a,b,c){return V.access(a,b,c)},_removeData:function(a,b){V.remove(a,b)}}),r.fn.extend({data:function(a,b){var c,d,e,f=this[0],g=f&&f.attributes;if(void 0===a){if(this.length&&(e=W.get(f),1===f.nodeType&&!V.get(f,"hasDataAttrs"))){c=g.length;while(c--)g[c]&&(d=g[c].name,0===d.indexOf("data-")&&(d=r.camelCase(d.slice(5)),Z(f,d,e[d])));V.set(f,"hasDataAttrs",!0)}return e}return"object"==typeof a?this.each(function(){W.set(this,a)}):S(this,function(b){var c;if(f&&void 0===b){if(c=W.get(f,a),void 0!==c)return c;if(c=Z(f,a),void 0!==c)return c}else this.each(function(){W.set(this,a,b)})},null,b,arguments.length>1,null,!0)},removeData:function(a){return this.each(function(){W.remove(this,a)})}}),r.extend({queue:function(a,b,c){var d;if(a)return b=(b||"fx")+"queue",d=V.get(a,b),c&&(!d||r.isArray(c)?d=V.access(a,b,r.makeArray(c)):d.push(c)),d||[]},dequeue:function(a,b){b=b||"fx";var c=r.queue(a,b),d=c.length,e=c.shift(),f=r._queueHooks(a,b),g=function(){r.dequeue(a,b)};"inprogress"===e&&(e=c.shift(),d--),e&&("fx"===b&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return V.get(a,c)||V.access(a,c,{empty:r.Callbacks("once memory").add(function(){V.remove(a,[b+"queue",c])})})}}),r.fn.extend({queue:function(a,b){var c=2;return"string"!=typeof a&&(b=a,a="fx",c--),arguments.length<c?r.queue(this[0],a):void 0===b?this:this.each(function(){var c=r.queue(this,a,b);r._queueHooks(this,a),"fx"===a&&"inprogress"!==c[0]&&r.dequeue(this,a)})},dequeue:function(a){return this.each(function(){r.dequeue(this,a)})},clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a,b){var c,d=1,e=r.Deferred(),f=this,g=this.length,h=function(){--d||e.resolveWith(f,[f])};"string"!=typeof a&&(b=a,a=void 0),a=a||"fx";while(g--)c=V.get(f[g],a+"queueHooks"),c&&c.empty&&(d++,c.empty.add(h));return h(),e.promise(b)}});var $=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,_=new RegExp("^(?:([+-])=|)("+$+")([a-z%]*)$","i"),aa=["Top","Right","Bottom","Left"],ba=function(a,b){return a=b||a,"none"===a.style.display||""===a.style.display&&r.contains(a.ownerDocument,a)&&"none"===r.css(a,"display")},ca=function(a,b,c,d){var e,f,g={};for(f in b)g[f]=a.style[f],a.style[f]=b[f];e=c.apply(a,d||[]);for(f in b)a.style[f]=g[f];return e};function da(a,b,c,d){var e,f=1,g=20,h=d?function(){return d.cur()}:function(){return r.css(a,b,"")},i=h(),j=c&&c[3]||(r.cssNumber[b]?"":"px"),k=(r.cssNumber[b]||"px"!==j&&+i)&&_.exec(r.css(a,b));if(k&&k[3]!==j){j=j||k[3],c=c||[],k=+i||1;do f=f||".5",k/=f,r.style(a,b,k+j);while(f!==(f=h()/i)&&1!==f&&--g)}return c&&(k=+k||+i||0,e=c[1]?k+(c[1]+1)*c[2]:+c[2],d&&(d.unit=j,d.start=k,d.end=e)),e}var ea={};function fa(a){var b,c=a.ownerDocument,d=a.nodeName,e=ea[d];return e?e:(b=c.body.appendChild(c.createElement(d)),e=r.css(b,"display"),b.parentNode.removeChild(b),"none"===e&&(e="block"),ea[d]=e,e)}function ga(a,b){for(var c,d,e=[],f=0,g=a.length;f<g;f++)d=a[f],d.style&&(c=d.style.display,b?("none"===c&&(e[f]=V.get(d,"display")||null,e[f]||(d.style.display="")),""===d.style.display&&ba(d)&&(e[f]=fa(d))):"none"!==c&&(e[f]="none",V.set(d,"display",c)));for(f=0;f<g;f++)null!=e[f]&&(a[f].style.display=e[f]);return a}r.fn.extend({show:function(){return ga(this,!0)},hide:function(){return ga(this)},toggle:function(a){return"boolean"==typeof a?a?this.show():this.hide():this.each(function(){ba(this)?r(this).show():r(this).hide()})}});var ha=/^(?:checkbox|radio)$/i,ia=/<([a-z][^\/\0>\x20\t\r\n\f]+)/i,ja=/^$|\/(?:java|ecma)script/i,ka={option:[1,"<select multiple='multiple'>","</select>"],thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};ka.optgroup=ka.option,ka.tbody=ka.tfoot=ka.colgroup=ka.caption=ka.thead,ka.th=ka.td;function la(a,b){var c="undefined"!=typeof a.getElementsByTagName?a.getElementsByTagName(b||"*"):"undefined"!=typeof a.querySelectorAll?a.querySelectorAll(b||"*"):[];return void 0===b||b&&r.nodeName(a,b)?r.merge([a],c):c}function ma(a,b){for(var c=0,d=a.length;c<d;c++)V.set(a[c],"globalEval",!b||V.get(b[c],"globalEval"))}var na=/<|&#?\w+;/;function oa(a,b,c,d,e){for(var f,g,h,i,j,k,l=b.createDocumentFragment(),m=[],n=0,o=a.length;n<o;n++)if(f=a[n],f||0===f)if("object"===r.type(f))r.merge(m,f.nodeType?[f]:f);else if(na.test(f)){g=g||l.appendChild(b.createElement("div")),h=(ia.exec(f)||["",""])[1].toLowerCase(),i=ka[h]||ka._default,g.innerHTML=i[1]+r.htmlPrefilter(f)+i[2],k=i[0];while(k--)g=g.lastChild;r.merge(m,g.childNodes),g=l.firstChild,g.textContent=""}else m.push(b.createTextNode(f));l.textContent="",n=0;while(f=m[n++])if(d&&r.inArray(f,d)>-1)e&&e.push(f);else if(j=r.contains(f.ownerDocument,f),g=la(l.appendChild(f),"script"),j&&ma(g),c){k=0;while(f=g[k++])ja.test(f.type||"")&&c.push(f)}return l}!function(){var a=d.createDocumentFragment(),b=a.appendChild(d.createElement("div")),c=d.createElement("input");c.setAttribute("type","radio"),c.setAttribute("checked","checked"),c.setAttribute("name","t"),b.appendChild(c),o.checkClone=b.cloneNode(!0).cloneNode(!0).lastChild.checked,b.innerHTML="<textarea>x</textarea>",o.noCloneChecked=!!b.cloneNode(!0).lastChild.defaultValue}();var pa=d.documentElement,qa=/^key/,ra=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,sa=/^([^.]*)(?:\.(.+)|)/;function ta(){return!0}function ua(){return!1}function va(){try{return d.activeElement}catch(a){}}function wa(a,b,c,d,e,f){var g,h;if("object"==typeof b){"string"!=typeof c&&(d=d||c,c=void 0);for(h in b)wa(a,h,c,d,b[h],f);return a}if(null==d&&null==e?(e=c,d=c=void 0):null==e&&("string"==typeof c?(e=d,d=void 0):(e=d,d=c,c=void 0)),e===!1)e=ua;else if(!e)return a;return 1===f&&(g=e,e=function(a){return r().off(a),g.apply(this,arguments)},e.guid=g.guid||(g.guid=r.guid++)),a.each(function(){r.event.add(this,b,e,d,c)})}r.event={global:{},add:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,n,o,p,q=V.get(a);if(q){c.handler&&(f=c,c=f.handler,e=f.selector),e&&r.find.matchesSelector(pa,e),c.guid||(c.guid=r.guid++),(i=q.events)||(i=q.events={}),(g=q.handle)||(g=q.handle=function(b){return"undefined"!=typeof r&&r.event.triggered!==b.type?r.event.dispatch.apply(a,arguments):void 0}),b=(b||"").match(K)||[""],j=b.length;while(j--)h=sa.exec(b[j])||[],n=p=h[1],o=(h[2]||"").split(".").sort(),n&&(l=r.event.special[n]||{},n=(e?l.delegateType:l.bindType)||n,l=r.event.special[n]||{},k=r.extend({type:n,origType:p,data:d,handler:c,guid:c.guid,selector:e,needsContext:e&&r.expr.match.needsContext.test(e),namespace:o.join(".")},f),(m=i[n])||(m=i[n]=[],m.delegateCount=0,l.setup&&l.setup.call(a,d,o,g)!==!1||a.addEventListener&&a.addEventListener(n,g)),l.add&&(l.add.call(a,k),k.handler.guid||(k.handler.guid=c.guid)),e?m.splice(m.delegateCount++,0,k):m.push(k),r.event.global[n]=!0)}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,n,o,p,q=V.hasData(a)&&V.get(a);if(q&&(i=q.events)){b=(b||"").match(K)||[""],j=b.length;while(j--)if(h=sa.exec(b[j])||[],n=p=h[1],o=(h[2]||"").split(".").sort(),n){l=r.event.special[n]||{},n=(d?l.delegateType:l.bindType)||n,m=i[n]||[],h=h[2]&&new RegExp("(^|\\.)"+o.join("\\.(?:.*\\.|)")+"(\\.|$)"),g=f=m.length;while(f--)k=m[f],!e&&p!==k.origType||c&&c.guid!==k.guid||h&&!h.test(k.namespace)||d&&d!==k.selector&&("**"!==d||!k.selector)||(m.splice(f,1),k.selector&&m.delegateCount--,l.remove&&l.remove.call(a,k));g&&!m.length&&(l.teardown&&l.teardown.call(a,o,q.handle)!==!1||r.removeEvent(a,n,q.handle),delete i[n])}else for(n in i)r.event.remove(a,n+b[j],c,d,!0);r.isEmptyObject(i)&&V.remove(a,"handle events")}},dispatch:function(a){var b=r.event.fix(a),c,d,e,f,g,h,i=new Array(arguments.length),j=(V.get(this,"events")||{})[b.type]||[],k=r.event.special[b.type]||{};for(i[0]=b,c=1;c<arguments.length;c++)i[c]=arguments[c];if(b.delegateTarget=this,!k.preDispatch||k.preDispatch.call(this,b)!==!1){h=r.event.handlers.call(this,b,j),c=0;while((f=h[c++])&&!b.isPropagationStopped()){b.currentTarget=f.elem,d=0;while((g=f.handlers[d++])&&!b.isImmediatePropagationStopped())b.rnamespace&&!b.rnamespace.test(g.namespace)||(b.handleObj=g,b.data=g.data,e=((r.event.special[g.origType]||{}).handle||g.handler).apply(f.elem,i),void 0!==e&&(b.result=e)===!1&&(b.preventDefault(),b.stopPropagation()))}return k.postDispatch&&k.postDispatch.call(this,b),b.result}},handlers:function(a,b){var c,d,e,f,g=[],h=b.delegateCount,i=a.target;if(h&&i.nodeType&&("click"!==a.type||isNaN(a.button)||a.button<1))for(;i!==this;i=i.parentNode||this)if(1===i.nodeType&&(i.disabled!==!0||"click"!==a.type)){for(d=[],c=0;c<h;c++)f=b[c],e=f.selector+" ",void 0===d[e]&&(d[e]=f.needsContext?r(e,this).index(i)>-1:r.find(e,this,null,[i]).length),d[e]&&d.push(f);d.length&&g.push({elem:i,handlers:d})}return h<b.length&&g.push({elem:this,handlers:b.slice(h)}),g},addProp:function(a,b){Object.defineProperty(r.Event.prototype,a,{enumerable:!0,configurable:!0,get:r.isFunction(b)?function(){if(this.originalEvent)return b(this.originalEvent)}:function(){if(this.originalEvent)return this.originalEvent[a]},set:function(b){Object.defineProperty(this,a,{enumerable:!0,configurable:!0,writable:!0,value:b})}})},fix:function(a){return a[r.expando]?a:new r.Event(a)},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==va()&&this.focus)return this.focus(),!1},delegateType:"focusin"},blur:{trigger:function(){if(this===va()&&this.blur)return this.blur(),!1},delegateType:"focusout"},click:{trigger:function(){if("checkbox"===this.type&&this.click&&r.nodeName(this,"input"))return this.click(),!1},_default:function(a){return r.nodeName(a.target,"a")}},beforeunload:{postDispatch:function(a){void 0!==a.result&&a.originalEvent&&(a.originalEvent.returnValue=a.result)}}}},r.removeEvent=function(a,b,c){a.removeEventListener&&a.removeEventListener(b,c)},r.Event=function(a,b){return this instanceof r.Event?(a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||void 0===a.defaultPrevented&&a.returnValue===!1?ta:ua,this.target=a.target&&3===a.target.nodeType?a.target.parentNode:a.target,this.currentTarget=a.currentTarget,this.relatedTarget=a.relatedTarget):this.type=a,b&&r.extend(this,b),this.timeStamp=a&&a.timeStamp||r.now(),void(this[r.expando]=!0)):new r.Event(a,b)},r.Event.prototype={constructor:r.Event,isDefaultPrevented:ua,isPropagationStopped:ua,isImmediatePropagationStopped:ua,isSimulated:!1,preventDefault:function(){var a=this.originalEvent;this.isDefaultPrevented=ta,a&&!this.isSimulated&&a.preventDefault()},stopPropagation:function(){var a=this.originalEvent;this.isPropagationStopped=ta,a&&!this.isSimulated&&a.stopPropagation()},stopImmediatePropagation:function(){var a=this.originalEvent;this.isImmediatePropagationStopped=ta,a&&!this.isSimulated&&a.stopImmediatePropagation(),this.stopPropagation()}},r.each({altKey:!0,bubbles:!0,cancelable:!0,changedTouches:!0,ctrlKey:!0,detail:!0,eventPhase:!0,metaKey:!0,pageX:!0,pageY:!0,shiftKey:!0,view:!0,"char":!0,charCode:!0,key:!0,keyCode:!0,button:!0,buttons:!0,clientX:!0,clientY:!0,offsetX:!0,offsetY:!0,pointerId:!0,pointerType:!0,screenX:!0,screenY:!0,targetTouches:!0,toElement:!0,touches:!0,which:function(a){var b=a.button;return null==a.which&&qa.test(a.type)?null!=a.charCode?a.charCode:a.keyCode:!a.which&&void 0!==b&&ra.test(a.type)?1&b?1:2&b?3:4&b?2:0:a.which}},r.event.addProp),r.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(a,b){r.event.special[a]={delegateType:b,bindType:b,handle:function(a){var c,d=this,e=a.relatedTarget,f=a.handleObj;return e&&(e===d||r.contains(d,e))||(a.type=f.origType,c=f.handler.apply(this,arguments),a.type=b),c}}}),r.fn.extend({on:function(a,b,c,d){return wa(this,a,b,c,d)},one:function(a,b,c,d){return wa(this,a,b,c,d,1)},off:function(a,b,c){var d,e;if(a&&a.preventDefault&&a.handleObj)return d=a.handleObj,r(a.delegateTarget).off(d.namespace?d.origType+"."+d.namespace:d.origType,d.selector,d.handler),this;if("object"==typeof a){for(e in a)this.off(e,b,a[e]);return this}return b!==!1&&"function"!=typeof b||(c=b,b=void 0),c===!1&&(c=ua),this.each(function(){r.event.remove(this,a,c,b)})}});var xa=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([a-z][^\/\0>\x20\t\r\n\f]*)[^>]*)\/>/gi,ya=/<script|<style|<link/i,za=/checked\s*(?:[^=]|=\s*.checked.)/i,Aa=/^true\/(.*)/,Ba=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g;function Ca(a,b){return r.nodeName(a,"table")&&r.nodeName(11!==b.nodeType?b:b.firstChild,"tr")?a.getElementsByTagName("tbody")[0]||a:a}function Da(a){return a.type=(null!==a.getAttribute("type"))+"/"+a.type,a}function Ea(a){var b=Aa.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function Fa(a,b){var c,d,e,f,g,h,i,j;if(1===b.nodeType){if(V.hasData(a)&&(f=V.access(a),g=V.set(b,f),j=f.events)){delete g.handle,g.events={};for(e in j)for(c=0,d=j[e].length;c<d;c++)r.event.add(b,e,j[e][c])}W.hasData(a)&&(h=W.access(a),i=r.extend({},h),W.set(b,i))}}function Ga(a,b){var c=b.nodeName.toLowerCase();"input"===c&&ha.test(a.type)?b.checked=a.checked:"input"!==c&&"textarea"!==c||(b.defaultValue=a.defaultValue)}function Ha(a,b,c,d){b=g.apply([],b);var e,f,h,i,j,k,l=0,m=a.length,n=m-1,q=b[0],s=r.isFunction(q);if(s||m>1&&"string"==typeof q&&!o.checkClone&&za.test(q))return a.each(function(e){var f=a.eq(e);s&&(b[0]=q.call(this,e,f.html())),Ha(f,b,c,d)});if(m&&(e=oa(b,a[0].ownerDocument,!1,a,d),f=e.firstChild,1===e.childNodes.length&&(e=f),f||d)){for(h=r.map(la(e,"script"),Da),i=h.length;l<m;l++)j=e,l!==n&&(j=r.clone(j,!0,!0),i&&r.merge(h,la(j,"script"))),c.call(a[l],j,l);if(i)for(k=h[h.length-1].ownerDocument,r.map(h,Ea),l=0;l<i;l++)j=h[l],ja.test(j.type||"")&&!V.access(j,"globalEval")&&r.contains(k,j)&&(j.src?r._evalUrl&&r._evalUrl(j.src):p(j.textContent.replace(Ba,""),k))}return a}function Ia(a,b,c){for(var d,e=b?r.filter(b,a):a,f=0;null!=(d=e[f]);f++)c||1!==d.nodeType||r.cleanData(la(d)),d.parentNode&&(c&&r.contains(d.ownerDocument,d)&&ma(la(d,"script")),d.parentNode.removeChild(d));return a}r.extend({htmlPrefilter:function(a){return a.replace(xa,"<$1></$2>")},clone:function(a,b,c){var d,e,f,g,h=a.cloneNode(!0),i=r.contains(a.ownerDocument,a);if(!(o.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||r.isXMLDoc(a)))for(g=la(h),f=la(a),d=0,e=f.length;d<e;d++)Ga(f[d],g[d]);if(b)if(c)for(f=f||la(a),g=g||la(h),d=0,e=f.length;d<e;d++)Fa(f[d],g[d]);else Fa(a,h);return g=la(h,"script"),g.length>0&&ma(g,!i&&la(a,"script")),h},cleanData:function(a){for(var b,c,d,e=r.event.special,f=0;void 0!==(c=a[f]);f++)if(T(c)){if(b=c[V.expando]){if(b.events)for(d in b.events)e[d]?r.event.remove(c,d):r.removeEvent(c,d,b.handle);c[V.expando]=void 0}c[W.expando]&&(c[W.expando]=void 0)}}}),r.fn.extend({detach:function(a){return Ia(this,a,!0)},remove:function(a){return Ia(this,a)},text:function(a){return S(this,function(a){return void 0===a?r.text(this):this.empty().each(function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=a)})},null,a,arguments.length)},append:function(){return Ha(this,arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=Ca(this,a);b.appendChild(a)}})},prepend:function(){return Ha(this,arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=Ca(this,a);b.insertBefore(a,b.firstChild)}})},before:function(){return Ha(this,arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return Ha(this,arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling)})},empty:function(){for(var a,b=0;null!=(a=this[b]);b++)1===a.nodeType&&(r.cleanData(la(a,!1)),a.textContent="");return this},clone:function(a,b){return a=null!=a&&a,b=null==b?a:b,this.map(function(){return r.clone(this,a,b)})},html:function(a){return S(this,function(a){var b=this[0]||{},c=0,d=this.length;if(void 0===a&&1===b.nodeType)return b.innerHTML;if("string"==typeof a&&!ya.test(a)&&!ka[(ia.exec(a)||["",""])[1].toLowerCase()]){a=r.htmlPrefilter(a);try{for(;c<d;c++)b=this[c]||{},1===b.nodeType&&(r.cleanData(la(b,!1)),b.innerHTML=a);b=0}catch(e){}}b&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(){var a=[];return Ha(this,arguments,function(b){var c=this.parentNode;r.inArray(this,a)<0&&(r.cleanData(la(this)),c&&c.replaceChild(b,this))},a)}}),r.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){r.fn[a]=function(a){for(var c,d=[],e=r(a),f=e.length-1,g=0;g<=f;g++)c=g===f?this:this.clone(!0),r(e[g])[b](c),h.apply(d,c.get());return this.pushStack(d)}});var Ja=/^margin/,Ka=new RegExp("^("+$+")(?!px)[a-z%]+$","i"),La=function(b){var c=b.ownerDocument.defaultView;return c&&c.opener||(c=a),c.getComputedStyle(b)};!function(){function b(){if(i){i.style.cssText="box-sizing:border-box;position:relative;display:block;margin:auto;border:1px;padding:1px;top:1%;width:50%",i.innerHTML="",pa.appendChild(h);var b=a.getComputedStyle(i);c="1%"!==b.top,g="2px"===b.marginLeft,e="4px"===b.width,i.style.marginRight="50%",f="4px"===b.marginRight,pa.removeChild(h),i=null}}var c,e,f,g,h=d.createElement("div"),i=d.createElement("div");i.style&&(i.style.backgroundClip="content-box",i.cloneNode(!0).style.backgroundClip="",o.clearCloneStyle="content-box"===i.style.backgroundClip,h.style.cssText="border:0;width:8px;height:0;top:0;left:-9999px;padding:0;margin-top:1px;position:absolute",h.appendChild(i),r.extend(o,{pixelPosition:function(){return b(),c},boxSizingReliable:function(){return b(),e},pixelMarginRight:function(){return b(),f},reliableMarginLeft:function(){return b(),g}}))}();function Ma(a,b,c){var d,e,f,g,h=a.style;return c=c||La(a),c&&(g=c.getPropertyValue(b)||c[b],""!==g||r.contains(a.ownerDocument,a)||(g=r.style(a,b)),!o.pixelMarginRight()&&Ka.test(g)&&Ja.test(b)&&(d=h.width,e=h.minWidth,f=h.maxWidth,h.minWidth=h.maxWidth=h.width=g,g=c.width,h.width=d,h.minWidth=e,h.maxWidth=f)),void 0!==g?g+"":g}function Na(a,b){return{get:function(){return a()?void delete this.get:(this.get=b).apply(this,arguments)}}}var Oa=/^(none|table(?!-c[ea]).+)/,Pa={position:"absolute",visibility:"hidden",display:"block"},Qa={letterSpacing:"0",fontWeight:"400"},Ra=["Webkit","Moz","ms"],Sa=d.createElement("div").style;function Ta(a){if(a in Sa)return a;var b=a[0].toUpperCase()+a.slice(1),c=Ra.length;while(c--)if(a=Ra[c]+b,a in Sa)return a}function Ua(a,b,c){var d=_.exec(b);return d?Math.max(0,d[2]-(c||0))+(d[3]||"px"):b}function Va(a,b,c,d,e){for(var f=c===(d?"border":"content")?4:"width"===b?1:0,g=0;f<4;f+=2)"margin"===c&&(g+=r.css(a,c+aa[f],!0,e)),d?("content"===c&&(g-=r.css(a,"padding"+aa[f],!0,e)),"margin"!==c&&(g-=r.css(a,"border"+aa[f]+"Width",!0,e))):(g+=r.css(a,"padding"+aa[f],!0,e),"padding"!==c&&(g+=r.css(a,"border"+aa[f]+"Width",!0,e)));return g}function Wa(a,b,c){var d,e=!0,f=La(a),g="border-box"===r.css(a,"boxSizing",!1,f);if(a.getClientRects().length&&(d=a.getBoundingClientRect()[b]),d<=0||null==d){if(d=Ma(a,b,f),(d<0||null==d)&&(d=a.style[b]),Ka.test(d))return d;e=g&&(o.boxSizingReliable()||d===a.style[b]),d=parseFloat(d)||0}return d+Va(a,b,c||(g?"border":"content"),e,f)+"px"}r.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=Ma(a,"opacity");return""===c?"1":c}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":"cssFloat"},style:function(a,b,c,d){if(a&&3!==a.nodeType&&8!==a.nodeType&&a.style){var e,f,g,h=r.camelCase(b),i=a.style;return b=r.cssProps[h]||(r.cssProps[h]=Ta(h)||h),g=r.cssHooks[b]||r.cssHooks[h],void 0===c?g&&"get"in g&&void 0!==(e=g.get(a,!1,d))?e:i[b]:(f=typeof c,"string"===f&&(e=_.exec(c))&&e[1]&&(c=da(a,b,e),f="number"),null!=c&&c===c&&("number"===f&&(c+=e&&e[3]||(r.cssNumber[h]?"":"px")),o.clearCloneStyle||""!==c||0!==b.indexOf("background")||(i[b]="inherit"),g&&"set"in g&&void 0===(c=g.set(a,c,d))||(i[b]=c)),void 0)}},css:function(a,b,c,d){var e,f,g,h=r.camelCase(b);return b=r.cssProps[h]||(r.cssProps[h]=Ta(h)||h),g=r.cssHooks[b]||r.cssHooks[h],g&&"get"in g&&(e=g.get(a,!0,c)),void 0===e&&(e=Ma(a,b,d)),"normal"===e&&b in Qa&&(e=Qa[b]),""===c||c?(f=parseFloat(e),c===!0||isFinite(f)?f||0:e):e}}),r.each(["height","width"],function(a,b){r.cssHooks[b]={get:function(a,c,d){if(c)return!Oa.test(r.css(a,"display"))||a.getClientRects().length&&a.getBoundingClientRect().width?Wa(a,b,d):ca(a,Pa,function(){return Wa(a,b,d)})},set:function(a,c,d){var e,f=d&&La(a),g=d&&Va(a,b,d,"border-box"===r.css(a,"boxSizing",!1,f),f);return g&&(e=_.exec(c))&&"px"!==(e[3]||"px")&&(a.style[b]=c,c=r.css(a,b)),Ua(a,c,g)}}}),r.cssHooks.marginLeft=Na(o.reliableMarginLeft,function(a,b){if(b)return(parseFloat(Ma(a,"marginLeft"))||a.getBoundingClientRect().left-ca(a,{marginLeft:0},function(){return a.getBoundingClientRect().left}))+"px"}),r.each({margin:"",padding:"",border:"Width"},function(a,b){r.cssHooks[a+b]={expand:function(c){for(var d=0,e={},f="string"==typeof c?c.split(" "):[c];d<4;d++)e[a+aa[d]+b]=f[d]||f[d-2]||f[0];return e}},Ja.test(a)||(r.cssHooks[a+b].set=Ua)}),r.fn.extend({css:function(a,b){return S(this,function(a,b,c){var d,e,f={},g=0;if(r.isArray(b)){for(d=La(a),e=b.length;g<e;g++)f[b[g]]=r.css(a,b[g],!1,d);return f}return void 0!==c?r.style(a,b,c):r.css(a,b)},a,b,arguments.length>1)}});function Xa(a,b,c,d,e){return new Xa.prototype.init(a,b,c,d,e)}r.Tween=Xa,Xa.prototype={constructor:Xa,init:function(a,b,c,d,e,f){this.elem=a,this.prop=c,this.easing=e||r.easing._default,this.options=b,this.start=this.now=this.cur(),this.end=d,this.unit=f||(r.cssNumber[c]?"":"px")},cur:function(){var a=Xa.propHooks[this.prop];return a&&a.get?a.get(this):Xa.propHooks._default.get(this)},run:function(a){var b,c=Xa.propHooks[this.prop];return this.options.duration?this.pos=b=r.easing[this.easing](a,this.options.duration*a,0,1,this.options.duration):this.pos=b=a,this.now=(this.end-this.start)*b+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),c&&c.set?c.set(this):Xa.propHooks._default.set(this),this}},Xa.prototype.init.prototype=Xa.prototype,Xa.propHooks={_default:{get:function(a){var b;return 1!==a.elem.nodeType||null!=a.elem[a.prop]&&null==a.elem.style[a.prop]?a.elem[a.prop]:(b=r.css(a.elem,a.prop,""),b&&"auto"!==b?b:0)},set:function(a){r.fx.step[a.prop]?r.fx.step[a.prop](a):1!==a.elem.nodeType||null==a.elem.style[r.cssProps[a.prop]]&&!r.cssHooks[a.prop]?a.elem[a.prop]=a.now:r.style(a.elem,a.prop,a.now+a.unit)}}},Xa.propHooks.scrollTop=Xa.propHooks.scrollLeft={set:function(a){a.elem.nodeType&&a.elem.parentNode&&(a.elem[a.prop]=a.now)}},r.easing={linear:function(a){return a},swing:function(a){return.5-Math.cos(a*Math.PI)/2},_default:"swing"},r.fx=Xa.prototype.init,r.fx.step={};var Ya,Za,$a=/^(?:toggle|show|hide)$/,_a=/queueHooks$/;function ab(){Za&&(a.requestAnimationFrame(ab),r.fx.tick())}function bb(){return a.setTimeout(function(){Ya=void 0}),Ya=r.now()}function cb(a,b){var c,d=0,e={height:a};for(b=b?1:0;d<4;d+=2-b)c=aa[d],e["margin"+c]=e["padding"+c]=a;return b&&(e.opacity=e.width=a),e}function db(a,b,c){for(var d,e=(gb.tweeners[b]||[]).concat(gb.tweeners["*"]),f=0,g=e.length;f<g;f++)if(d=e[f].call(c,b,a))return d}function eb(a,b,c){var d,e,f,g,h,i,j,k,l="width"in b||"height"in b,m=this,n={},o=a.style,p=a.nodeType&&ba(a),q=V.get(a,"fxshow");c.queue||(g=r._queueHooks(a,"fx"),null==g.unqueued&&(g.unqueued=0,h=g.empty.fire,g.empty.fire=function(){g.unqueued||h()}),g.unqueued++,m.always(function(){m.always(function(){g.unqueued--,r.queue(a,"fx").length||g.empty.fire()})}));for(d in b)if(e=b[d],$a.test(e)){if(delete b[d],f=f||"toggle"===e,e===(p?"hide":"show")){if("show"!==e||!q||void 0===q[d])continue;p=!0}n[d]=q&&q[d]||r.style(a,d)}if(i=!r.isEmptyObject(b),i||!r.isEmptyObject(n)){l&&1===a.nodeType&&(c.overflow=[o.overflow,o.overflowX,o.overflowY],j=q&&q.display,null==j&&(j=V.get(a,"display")),k=r.css(a,"display"),"none"===k&&(j?k=j:(ga([a],!0),j=a.style.display||j,k=r.css(a,"display"),ga([a]))),("inline"===k||"inline-block"===k&&null!=j)&&"none"===r.css(a,"float")&&(i||(m.done(function(){o.display=j}),null==j&&(k=o.display,j="none"===k?"":k)),o.display="inline-block")),c.overflow&&(o.overflow="hidden",m.always(function(){o.overflow=c.overflow[0],o.overflowX=c.overflow[1],o.overflowY=c.overflow[2]})),i=!1;for(d in n)i||(q?"hidden"in q&&(p=q.hidden):q=V.access(a,"fxshow",{display:j}),f&&(q.hidden=!p),p&&ga([a],!0),m.done(function(){p||ga([a]),V.remove(a,"fxshow");for(d in n)r.style(a,d,n[d])})),i=db(p?q[d]:0,d,m),d in q||(q[d]=i.start,p&&(i.end=i.start,i.start=0))}}function fb(a,b){var c,d,e,f,g;for(c in a)if(d=r.camelCase(c),e=b[d],f=a[c],r.isArray(f)&&(e=f[1],f=a[c]=f[0]),c!==d&&(a[d]=f,delete a[c]),g=r.cssHooks[d],g&&"expand"in g){f=g.expand(f),delete a[d];for(c in f)c in a||(a[c]=f[c],b[c]=e)}else b[d]=e}function gb(a,b,c){var d,e,f=0,g=gb.prefilters.length,h=r.Deferred().always(function(){delete i.elem}),i=function(){if(e)return!1;for(var b=Ya||bb(),c=Math.max(0,j.startTime+j.duration-b),d=c/j.duration||0,f=1-d,g=0,i=j.tweens.length;g<i;g++)j.tweens[g].run(f);return h.notifyWith(a,[j,f,c]),f<1&&i?c:(h.resolveWith(a,[j]),!1)},j=h.promise({elem:a,props:r.extend({},b),opts:r.extend(!0,{specialEasing:{},easing:r.easing._default},c),originalProperties:b,originalOptions:c,startTime:Ya||bb(),duration:c.duration,tweens:[],createTween:function(b,c){var d=r.Tween(a,j.opts,b,c,j.opts.specialEasing[b]||j.opts.easing);return j.tweens.push(d),d},stop:function(b){var c=0,d=b?j.tweens.length:0;if(e)return this;for(e=!0;c<d;c++)j.tweens[c].run(1);return b?(h.notifyWith(a,[j,1,0]),h.resolveWith(a,[j,b])):h.rejectWith(a,[j,b]),this}}),k=j.props;for(fb(k,j.opts.specialEasing);f<g;f++)if(d=gb.prefilters[f].call(j,a,k,j.opts))return r.isFunction(d.stop)&&(r._queueHooks(j.elem,j.opts.queue).stop=r.proxy(d.stop,d)),d;return r.map(k,db,j),r.isFunction(j.opts.start)&&j.opts.start.call(a,j),r.fx.timer(r.extend(i,{elem:a,anim:j,queue:j.opts.queue})),j.progress(j.opts.progress).done(j.opts.done,j.opts.complete).fail(j.opts.fail).always(j.opts.always)}r.Animation=r.extend(gb,{tweeners:{"*":[function(a,b){var c=this.createTween(a,b);return da(c.elem,a,_.exec(b),c),c}]},tweener:function(a,b){r.isFunction(a)?(b=a,a=["*"]):a=a.match(K);for(var c,d=0,e=a.length;d<e;d++)c=a[d],gb.tweeners[c]=gb.tweeners[c]||[],gb.tweeners[c].unshift(b)},prefilters:[eb],prefilter:function(a,b){b?gb.prefilters.unshift(a):gb.prefilters.push(a)}}),r.speed=function(a,b,c){var e=a&&"object"==typeof a?r.extend({},a):{complete:c||!c&&b||r.isFunction(a)&&a,duration:a,easing:c&&b||b&&!r.isFunction(b)&&b};return r.fx.off||d.hidden?e.duration=0:e.duration="number"==typeof e.duration?e.duration:e.duration in r.fx.speeds?r.fx.speeds[e.duration]:r.fx.speeds._default,null!=e.queue&&e.queue!==!0||(e.queue="fx"),e.old=e.complete,e.complete=function(){r.isFunction(e.old)&&e.old.call(this),e.queue&&r.dequeue(this,e.queue)},e},r.fn.extend({fadeTo:function(a,b,c,d){return this.filter(ba).css("opacity",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,d){var e=r.isEmptyObject(a),f=r.speed(b,c,d),g=function(){var b=gb(this,r.extend({},a),f);(e||V.get(this,"finish"))&&b.stop(!0)};return g.finish=g,e||f.queue===!1?this.each(g):this.queue(f.queue,g)},stop:function(a,b,c){var d=function(a){var b=a.stop;delete a.stop,b(c)};return"string"!=typeof a&&(c=b,b=a,a=void 0),b&&a!==!1&&this.queue(a||"fx",[]),this.each(function(){var b=!0,e=null!=a&&a+"queueHooks",f=r.timers,g=V.get(this);if(e)g[e]&&g[e].stop&&d(g[e]);else for(e in g)g[e]&&g[e].stop&&_a.test(e)&&d(g[e]);for(e=f.length;e--;)f[e].elem!==this||null!=a&&f[e].queue!==a||(f[e].anim.stop(c),b=!1,f.splice(e,1));!b&&c||r.dequeue(this,a)})},finish:function(a){return a!==!1&&(a=a||"fx"),this.each(function(){var b,c=V.get(this),d=c[a+"queue"],e=c[a+"queueHooks"],f=r.timers,g=d?d.length:0;for(c.finish=!0,r.queue(this,a,[]),e&&e.stop&&e.stop.call(this,!0),b=f.length;b--;)f[b].elem===this&&f[b].queue===a&&(f[b].anim.stop(!0),f.splice(b,1));for(b=0;b<g;b++)d[b]&&d[b].finish&&d[b].finish.call(this);delete c.finish})}}),r.each(["toggle","show","hide"],function(a,b){var c=r.fn[b];r.fn[b]=function(a,d,e){return null==a||"boolean"==typeof a?c.apply(this,arguments):this.animate(cb(b,!0),a,d,e)}}),r.each({slideDown:cb("show"),slideUp:cb("hide"),slideToggle:cb("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){r.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),r.timers=[],r.fx.tick=function(){var a,b=0,c=r.timers;for(Ya=r.now();b<c.length;b++)a=c[b],a()||c[b]!==a||c.splice(b--,1);c.length||r.fx.stop(),Ya=void 0},r.fx.timer=function(a){r.timers.push(a),a()?r.fx.start():r.timers.pop()},r.fx.interval=13,r.fx.start=function(){Za||(Za=a.requestAnimationFrame?a.requestAnimationFrame(ab):a.setInterval(r.fx.tick,r.fx.interval))},r.fx.stop=function(){a.cancelAnimationFrame?a.cancelAnimationFrame(Za):a.clearInterval(Za),Za=null},r.fx.speeds={slow:600,fast:200,_default:400},r.fn.delay=function(b,c){return b=r.fx?r.fx.speeds[b]||b:b,c=c||"fx",this.queue(c,function(c,d){var e=a.setTimeout(c,b);d.stop=function(){a.clearTimeout(e)}})},function(){var a=d.createElement("input"),b=d.createElement("select"),c=b.appendChild(d.createElement("option"));a.type="checkbox",o.checkOn=""!==a.value,o.optSelected=c.selected,a=d.createElement("input"),a.value="t",a.type="radio",o.radioValue="t"===a.value}();var hb,ib=r.expr.attrHandle;r.fn.extend({attr:function(a,b){return S(this,r.attr,a,b,arguments.length>1)},removeAttr:function(a){return this.each(function(){r.removeAttr(this,a)})}}),r.extend({attr:function(a,b,c){var d,e,f=a.nodeType;if(3!==f&&8!==f&&2!==f)return"undefined"==typeof a.getAttribute?r.prop(a,b,c):(1===f&&r.isXMLDoc(a)||(e=r.attrHooks[b.toLowerCase()]||(r.expr.match.bool.test(b)?hb:void 0)),void 0!==c?null===c?void r.removeAttr(a,b):e&&"set"in e&&void 0!==(d=e.set(a,c,b))?d:(a.setAttribute(b,c+""),c):e&&"get"in e&&null!==(d=e.get(a,b))?d:(d=r.find.attr(a,b),null==d?void 0:d))},attrHooks:{type:{set:function(a,b){if(!o.radioValue&&"radio"===b&&r.nodeName(a,"input")){var c=a.value;return a.setAttribute("type",b),c&&(a.value=c),b}}}},removeAttr:function(a,b){var c,d=0,e=b&&b.match(K);
if(e&&1===a.nodeType)while(c=e[d++])a.removeAttribute(c)}}),hb={set:function(a,b,c){return b===!1?r.removeAttr(a,c):a.setAttribute(c,c),c}},r.each(r.expr.match.bool.source.match(/\w+/g),function(a,b){var c=ib[b]||r.find.attr;ib[b]=function(a,b,d){var e,f,g=b.toLowerCase();return d||(f=ib[g],ib[g]=e,e=null!=c(a,b,d)?g:null,ib[g]=f),e}});var jb=/^(?:input|select|textarea|button)$/i,kb=/^(?:a|area)$/i;r.fn.extend({prop:function(a,b){return S(this,r.prop,a,b,arguments.length>1)},removeProp:function(a){return this.each(function(){delete this[r.propFix[a]||a]})}}),r.extend({prop:function(a,b,c){var d,e,f=a.nodeType;if(3!==f&&8!==f&&2!==f)return 1===f&&r.isXMLDoc(a)||(b=r.propFix[b]||b,e=r.propHooks[b]),void 0!==c?e&&"set"in e&&void 0!==(d=e.set(a,c,b))?d:a[b]=c:e&&"get"in e&&null!==(d=e.get(a,b))?d:a[b]},propHooks:{tabIndex:{get:function(a){var b=r.find.attr(a,"tabindex");return b?parseInt(b,10):jb.test(a.nodeName)||kb.test(a.nodeName)&&a.href?0:-1}}},propFix:{"for":"htmlFor","class":"className"}}),o.optSelected||(r.propHooks.selected={get:function(a){var b=a.parentNode;return b&&b.parentNode&&b.parentNode.selectedIndex,null},set:function(a){var b=a.parentNode;b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex)}}),r.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){r.propFix[this.toLowerCase()]=this});var lb=/[\t\r\n\f]/g;function mb(a){return a.getAttribute&&a.getAttribute("class")||""}r.fn.extend({addClass:function(a){var b,c,d,e,f,g,h,i=0;if(r.isFunction(a))return this.each(function(b){r(this).addClass(a.call(this,b,mb(this)))});if("string"==typeof a&&a){b=a.match(K)||[];while(c=this[i++])if(e=mb(c),d=1===c.nodeType&&(" "+e+" ").replace(lb," ")){g=0;while(f=b[g++])d.indexOf(" "+f+" ")<0&&(d+=f+" ");h=r.trim(d),e!==h&&c.setAttribute("class",h)}}return this},removeClass:function(a){var b,c,d,e,f,g,h,i=0;if(r.isFunction(a))return this.each(function(b){r(this).removeClass(a.call(this,b,mb(this)))});if(!arguments.length)return this.attr("class","");if("string"==typeof a&&a){b=a.match(K)||[];while(c=this[i++])if(e=mb(c),d=1===c.nodeType&&(" "+e+" ").replace(lb," ")){g=0;while(f=b[g++])while(d.indexOf(" "+f+" ")>-1)d=d.replace(" "+f+" "," ");h=r.trim(d),e!==h&&c.setAttribute("class",h)}}return this},toggleClass:function(a,b){var c=typeof a;return"boolean"==typeof b&&"string"===c?b?this.addClass(a):this.removeClass(a):r.isFunction(a)?this.each(function(c){r(this).toggleClass(a.call(this,c,mb(this),b),b)}):this.each(function(){var b,d,e,f;if("string"===c){d=0,e=r(this),f=a.match(K)||[];while(b=f[d++])e.hasClass(b)?e.removeClass(b):e.addClass(b)}else void 0!==a&&"boolean"!==c||(b=mb(this),b&&V.set(this,"__className__",b),this.setAttribute&&this.setAttribute("class",b||a===!1?"":V.get(this,"__className__")||""))})},hasClass:function(a){var b,c,d=0;b=" "+a+" ";while(c=this[d++])if(1===c.nodeType&&(" "+mb(c)+" ").replace(lb," ").indexOf(b)>-1)return!0;return!1}});var nb=/\r/g,ob=/[\x20\t\r\n\f]+/g;r.fn.extend({val:function(a){var b,c,d,e=this[0];{if(arguments.length)return d=r.isFunction(a),this.each(function(c){var e;1===this.nodeType&&(e=d?a.call(this,c,r(this).val()):a,null==e?e="":"number"==typeof e?e+="":r.isArray(e)&&(e=r.map(e,function(a){return null==a?"":a+""})),b=r.valHooks[this.type]||r.valHooks[this.nodeName.toLowerCase()],b&&"set"in b&&void 0!==b.set(this,e,"value")||(this.value=e))});if(e)return b=r.valHooks[e.type]||r.valHooks[e.nodeName.toLowerCase()],b&&"get"in b&&void 0!==(c=b.get(e,"value"))?c:(c=e.value,"string"==typeof c?c.replace(nb,""):null==c?"":c)}}}),r.extend({valHooks:{option:{get:function(a){var b=r.find.attr(a,"value");return null!=b?b:r.trim(r.text(a)).replace(ob," ")}},select:{get:function(a){for(var b,c,d=a.options,e=a.selectedIndex,f="select-one"===a.type,g=f?null:[],h=f?e+1:d.length,i=e<0?h:f?e:0;i<h;i++)if(c=d[i],(c.selected||i===e)&&!c.disabled&&(!c.parentNode.disabled||!r.nodeName(c.parentNode,"optgroup"))){if(b=r(c).val(),f)return b;g.push(b)}return g},set:function(a,b){var c,d,e=a.options,f=r.makeArray(b),g=e.length;while(g--)d=e[g],(d.selected=r.inArray(r.valHooks.option.get(d),f)>-1)&&(c=!0);return c||(a.selectedIndex=-1),f}}}}),r.each(["radio","checkbox"],function(){r.valHooks[this]={set:function(a,b){if(r.isArray(b))return a.checked=r.inArray(r(a).val(),b)>-1}},o.checkOn||(r.valHooks[this].get=function(a){return null===a.getAttribute("value")?"on":a.value})});var pb=/^(?:focusinfocus|focusoutblur)$/;r.extend(r.event,{trigger:function(b,c,e,f){var g,h,i,j,k,m,n,o=[e||d],p=l.call(b,"type")?b.type:b,q=l.call(b,"namespace")?b.namespace.split("."):[];if(h=i=e=e||d,3!==e.nodeType&&8!==e.nodeType&&!pb.test(p+r.event.triggered)&&(p.indexOf(".")>-1&&(q=p.split("."),p=q.shift(),q.sort()),k=p.indexOf(":")<0&&"on"+p,b=b[r.expando]?b:new r.Event(p,"object"==typeof b&&b),b.isTrigger=f?2:3,b.namespace=q.join("."),b.rnamespace=b.namespace?new RegExp("(^|\\.)"+q.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,b.result=void 0,b.target||(b.target=e),c=null==c?[b]:r.makeArray(c,[b]),n=r.event.special[p]||{},f||!n.trigger||n.trigger.apply(e,c)!==!1)){if(!f&&!n.noBubble&&!r.isWindow(e)){for(j=n.delegateType||p,pb.test(j+p)||(h=h.parentNode);h;h=h.parentNode)o.push(h),i=h;i===(e.ownerDocument||d)&&o.push(i.defaultView||i.parentWindow||a)}g=0;while((h=o[g++])&&!b.isPropagationStopped())b.type=g>1?j:n.bindType||p,m=(V.get(h,"events")||{})[b.type]&&V.get(h,"handle"),m&&m.apply(h,c),m=k&&h[k],m&&m.apply&&T(h)&&(b.result=m.apply(h,c),b.result===!1&&b.preventDefault());return b.type=p,f||b.isDefaultPrevented()||n._default&&n._default.apply(o.pop(),c)!==!1||!T(e)||k&&r.isFunction(e[p])&&!r.isWindow(e)&&(i=e[k],i&&(e[k]=null),r.event.triggered=p,e[p](),r.event.triggered=void 0,i&&(e[k]=i)),b.result}},simulate:function(a,b,c){var d=r.extend(new r.Event,c,{type:a,isSimulated:!0});r.event.trigger(d,null,b)}}),r.fn.extend({trigger:function(a,b){return this.each(function(){r.event.trigger(a,b,this)})},triggerHandler:function(a,b){var c=this[0];if(c)return r.event.trigger(a,b,c,!0)}}),r.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(a,b){r.fn[b]=function(a,c){return arguments.length>0?this.on(b,null,a,c):this.trigger(b)}}),r.fn.extend({hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)}}),o.focusin="onfocusin"in a,o.focusin||r.each({focus:"focusin",blur:"focusout"},function(a,b){var c=function(a){r.event.simulate(b,a.target,r.event.fix(a))};r.event.special[b]={setup:function(){var d=this.ownerDocument||this,e=V.access(d,b);e||d.addEventListener(a,c,!0),V.access(d,b,(e||0)+1)},teardown:function(){var d=this.ownerDocument||this,e=V.access(d,b)-1;e?V.access(d,b,e):(d.removeEventListener(a,c,!0),V.remove(d,b))}}});var qb=a.location,rb=r.now(),sb=/\?/;r.parseXML=function(b){var c;if(!b||"string"!=typeof b)return null;try{c=(new a.DOMParser).parseFromString(b,"text/xml")}catch(d){c=void 0}return c&&!c.getElementsByTagName("parsererror").length||r.error("Invalid XML: "+b),c};var tb=/\[\]$/,ub=/\r?\n/g,vb=/^(?:submit|button|image|reset|file)$/i,wb=/^(?:input|select|textarea|keygen)/i;function xb(a,b,c,d){var e;if(r.isArray(b))r.each(b,function(b,e){c||tb.test(a)?d(a,e):xb(a+"["+("object"==typeof e&&null!=e?b:"")+"]",e,c,d)});else if(c||"object"!==r.type(b))d(a,b);else for(e in b)xb(a+"["+e+"]",b[e],c,d)}r.param=function(a,b){var c,d=[],e=function(a,b){var c=r.isFunction(b)?b():b;d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(null==c?"":c)};if(r.isArray(a)||a.jquery&&!r.isPlainObject(a))r.each(a,function(){e(this.name,this.value)});else for(c in a)xb(c,a[c],b,e);return d.join("&")},r.fn.extend({serialize:function(){return r.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var a=r.prop(this,"elements");return a?r.makeArray(a):this}).filter(function(){var a=this.type;return this.name&&!r(this).is(":disabled")&&wb.test(this.nodeName)&&!vb.test(a)&&(this.checked||!ha.test(a))}).map(function(a,b){var c=r(this).val();return null==c?null:r.isArray(c)?r.map(c,function(a){return{name:b.name,value:a.replace(ub,"\r\n")}}):{name:b.name,value:c.replace(ub,"\r\n")}}).get()}});var yb=/%20/g,zb=/#.*$/,Ab=/([?&])_=[^&]*/,Bb=/^(.*?):[ \t]*([^\r\n]*)$/gm,Cb=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Db=/^(?:GET|HEAD)$/,Eb=/^\/\//,Fb={},Gb={},Hb="*/".concat("*"),Ib=d.createElement("a");Ib.href=qb.href;function Jb(a){return function(b,c){"string"!=typeof b&&(c=b,b="*");var d,e=0,f=b.toLowerCase().match(K)||[];if(r.isFunction(c))while(d=f[e++])"+"===d[0]?(d=d.slice(1)||"*",(a[d]=a[d]||[]).unshift(c)):(a[d]=a[d]||[]).push(c)}}function Kb(a,b,c,d){var e={},f=a===Gb;function g(h){var i;return e[h]=!0,r.each(a[h]||[],function(a,h){var j=h(b,c,d);return"string"!=typeof j||f||e[j]?f?!(i=j):void 0:(b.dataTypes.unshift(j),g(j),!1)}),i}return g(b.dataTypes[0])||!e["*"]&&g("*")}function Lb(a,b){var c,d,e=r.ajaxSettings.flatOptions||{};for(c in b)void 0!==b[c]&&((e[c]?a:d||(d={}))[c]=b[c]);return d&&r.extend(!0,a,d),a}function Mb(a,b,c){var d,e,f,g,h=a.contents,i=a.dataTypes;while("*"===i[0])i.shift(),void 0===d&&(d=a.mimeType||b.getResponseHeader("Content-Type"));if(d)for(e in h)if(h[e]&&h[e].test(d)){i.unshift(e);break}if(i[0]in c)f=i[0];else{for(e in c){if(!i[0]||a.converters[e+" "+i[0]]){f=e;break}g||(g=e)}f=f||g}if(f)return f!==i[0]&&i.unshift(f),c[f]}function Nb(a,b,c,d){var e,f,g,h,i,j={},k=a.dataTypes.slice();if(k[1])for(g in a.converters)j[g.toLowerCase()]=a.converters[g];f=k.shift();while(f)if(a.responseFields[f]&&(c[a.responseFields[f]]=b),!i&&d&&a.dataFilter&&(b=a.dataFilter(b,a.dataType)),i=f,f=k.shift())if("*"===f)f=i;else if("*"!==i&&i!==f){if(g=j[i+" "+f]||j["* "+f],!g)for(e in j)if(h=e.split(" "),h[1]===f&&(g=j[i+" "+h[0]]||j["* "+h[0]])){g===!0?g=j[e]:j[e]!==!0&&(f=h[0],k.unshift(h[1]));break}if(g!==!0)if(g&&a["throws"])b=g(b);else try{b=g(b)}catch(l){return{state:"parsererror",error:g?l:"No conversion from "+i+" to "+f}}}return{state:"success",data:b}}r.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:qb.href,type:"GET",isLocal:Cb.test(qb.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Hb,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":r.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(a,b){return b?Lb(Lb(a,r.ajaxSettings),b):Lb(r.ajaxSettings,a)},ajaxPrefilter:Jb(Fb),ajaxTransport:Jb(Gb),ajax:function(b,c){"object"==typeof b&&(c=b,b=void 0),c=c||{};var e,f,g,h,i,j,k,l,m,n,o=r.ajaxSetup({},c),p=o.context||o,q=o.context&&(p.nodeType||p.jquery)?r(p):r.event,s=r.Deferred(),t=r.Callbacks("once memory"),u=o.statusCode||{},v={},w={},x="canceled",y={readyState:0,getResponseHeader:function(a){var b;if(k){if(!h){h={};while(b=Bb.exec(g))h[b[1].toLowerCase()]=b[2]}b=h[a.toLowerCase()]}return null==b?null:b},getAllResponseHeaders:function(){return k?g:null},setRequestHeader:function(a,b){return null==k&&(a=w[a.toLowerCase()]=w[a.toLowerCase()]||a,v[a]=b),this},overrideMimeType:function(a){return null==k&&(o.mimeType=a),this},statusCode:function(a){var b;if(a)if(k)y.always(a[y.status]);else for(b in a)u[b]=[u[b],a[b]];return this},abort:function(a){var b=a||x;return e&&e.abort(b),A(0,b),this}};if(s.promise(y),o.url=((b||o.url||qb.href)+"").replace(Eb,qb.protocol+"//"),o.type=c.method||c.type||o.method||o.type,o.dataTypes=(o.dataType||"*").toLowerCase().match(K)||[""],null==o.crossDomain){j=d.createElement("a");try{j.href=o.url,j.href=j.href,o.crossDomain=Ib.protocol+"//"+Ib.host!=j.protocol+"//"+j.host}catch(z){o.crossDomain=!0}}if(o.data&&o.processData&&"string"!=typeof o.data&&(o.data=r.param(o.data,o.traditional)),Kb(Fb,o,c,y),k)return y;l=r.event&&o.global,l&&0===r.active++&&r.event.trigger("ajaxStart"),o.type=o.type.toUpperCase(),o.hasContent=!Db.test(o.type),f=o.url.replace(zb,""),o.hasContent?o.data&&o.processData&&0===(o.contentType||"").indexOf("application/x-www-form-urlencoded")&&(o.data=o.data.replace(yb,"+")):(n=o.url.slice(f.length),o.data&&(f+=(sb.test(f)?"&":"?")+o.data,delete o.data),o.cache===!1&&(f=f.replace(Ab,""),n=(sb.test(f)?"&":"?")+"_="+rb++ +n),o.url=f+n),o.ifModified&&(r.lastModified[f]&&y.setRequestHeader("If-Modified-Since",r.lastModified[f]),r.etag[f]&&y.setRequestHeader("If-None-Match",r.etag[f])),(o.data&&o.hasContent&&o.contentType!==!1||c.contentType)&&y.setRequestHeader("Content-Type",o.contentType),y.setRequestHeader("Accept",o.dataTypes[0]&&o.accepts[o.dataTypes[0]]?o.accepts[o.dataTypes[0]]+("*"!==o.dataTypes[0]?", "+Hb+"; q=0.01":""):o.accepts["*"]);for(m in o.headers)y.setRequestHeader(m,o.headers[m]);if(o.beforeSend&&(o.beforeSend.call(p,y,o)===!1||k))return y.abort();if(x="abort",t.add(o.complete),y.done(o.success),y.fail(o.error),e=Kb(Gb,o,c,y)){if(y.readyState=1,l&&q.trigger("ajaxSend",[y,o]),k)return y;o.async&&o.timeout>0&&(i=a.setTimeout(function(){y.abort("timeout")},o.timeout));try{k=!1,e.send(v,A)}catch(z){if(k)throw z;A(-1,z)}}else A(-1,"No Transport");function A(b,c,d,h){var j,m,n,v,w,x=c;k||(k=!0,i&&a.clearTimeout(i),e=void 0,g=h||"",y.readyState=b>0?4:0,j=b>=200&&b<300||304===b,d&&(v=Mb(o,y,d)),v=Nb(o,v,y,j),j?(o.ifModified&&(w=y.getResponseHeader("Last-Modified"),w&&(r.lastModified[f]=w),w=y.getResponseHeader("etag"),w&&(r.etag[f]=w)),204===b||"HEAD"===o.type?x="nocontent":304===b?x="notmodified":(x=v.state,m=v.data,n=v.error,j=!n)):(n=x,!b&&x||(x="error",b<0&&(b=0))),y.status=b,y.statusText=(c||x)+"",j?s.resolveWith(p,[m,x,y]):s.rejectWith(p,[y,x,n]),y.statusCode(u),u=void 0,l&&q.trigger(j?"ajaxSuccess":"ajaxError",[y,o,j?m:n]),t.fireWith(p,[y,x]),l&&(q.trigger("ajaxComplete",[y,o]),--r.active||r.event.trigger("ajaxStop")))}return y},getJSON:function(a,b,c){return r.get(a,b,c,"json")},getScript:function(a,b){return r.get(a,void 0,b,"script")}}),r.each(["get","post"],function(a,b){r[b]=function(a,c,d,e){return r.isFunction(c)&&(e=e||d,d=c,c=void 0),r.ajax(r.extend({url:a,type:b,dataType:e,data:c,success:d},r.isPlainObject(a)&&a))}}),r._evalUrl=function(a){return r.ajax({url:a,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,"throws":!0})},r.fn.extend({wrapAll:function(a){var b;return this[0]&&(r.isFunction(a)&&(a=a.call(this[0])),b=r(a,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstElementChild)a=a.firstElementChild;return a}).append(this)),this},wrapInner:function(a){return r.isFunction(a)?this.each(function(b){r(this).wrapInner(a.call(this,b))}):this.each(function(){var b=r(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=r.isFunction(a);return this.each(function(c){r(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(a){return this.parent(a).not("body").each(function(){r(this).replaceWith(this.childNodes)}),this}}),r.expr.pseudos.hidden=function(a){return!r.expr.pseudos.visible(a)},r.expr.pseudos.visible=function(a){return!!(a.offsetWidth||a.offsetHeight||a.getClientRects().length)},r.ajaxSettings.xhr=function(){try{return new a.XMLHttpRequest}catch(b){}};var Ob={0:200,1223:204},Pb=r.ajaxSettings.xhr();o.cors=!!Pb&&"withCredentials"in Pb,o.ajax=Pb=!!Pb,r.ajaxTransport(function(b){var c,d;if(o.cors||Pb&&!b.crossDomain)return{send:function(e,f){var g,h=b.xhr();if(h.open(b.type,b.url,b.async,b.username,b.password),b.xhrFields)for(g in b.xhrFields)h[g]=b.xhrFields[g];b.mimeType&&h.overrideMimeType&&h.overrideMimeType(b.mimeType),b.crossDomain||e["X-Requested-With"]||(e["X-Requested-With"]="XMLHttpRequest");for(g in e)h.setRequestHeader(g,e[g]);c=function(a){return function(){c&&(c=d=h.onload=h.onerror=h.onabort=h.onreadystatechange=null,"abort"===a?h.abort():"error"===a?"number"!=typeof h.status?f(0,"error"):f(h.status,h.statusText):f(Ob[h.status]||h.status,h.statusText,"text"!==(h.responseType||"text")||"string"!=typeof h.responseText?{binary:h.response}:{text:h.responseText},h.getAllResponseHeaders()))}},h.onload=c(),d=h.onerror=c("error"),void 0!==h.onabort?h.onabort=d:h.onreadystatechange=function(){4===h.readyState&&a.setTimeout(function(){c&&d()})},c=c("abort");try{h.send(b.hasContent&&b.data||null)}catch(i){if(c)throw i}},abort:function(){c&&c()}}}),r.ajaxPrefilter(function(a){a.crossDomain&&(a.contents.script=!1)}),r.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(a){return r.globalEval(a),a}}}),r.ajaxPrefilter("script",function(a){void 0===a.cache&&(a.cache=!1),a.crossDomain&&(a.type="GET")}),r.ajaxTransport("script",function(a){if(a.crossDomain){var b,c;return{send:function(e,f){b=r("<script>").prop({charset:a.scriptCharset,src:a.url}).on("load error",c=function(a){b.remove(),c=null,a&&f("error"===a.type?404:200,a.type)}),d.head.appendChild(b[0])},abort:function(){c&&c()}}}});var Qb=[],Rb=/(=)\?(?=&|$)|\?\?/;r.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var a=Qb.pop()||r.expando+"_"+rb++;return this[a]=!0,a}}),r.ajaxPrefilter("json jsonp",function(b,c,d){var e,f,g,h=b.jsonp!==!1&&(Rb.test(b.url)?"url":"string"==typeof b.data&&0===(b.contentType||"").indexOf("application/x-www-form-urlencoded")&&Rb.test(b.data)&&"data");if(h||"jsonp"===b.dataTypes[0])return e=b.jsonpCallback=r.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,h?b[h]=b[h].replace(Rb,"$1"+e):b.jsonp!==!1&&(b.url+=(sb.test(b.url)?"&":"?")+b.jsonp+"="+e),b.converters["script json"]=function(){return g||r.error(e+" was not called"),g[0]},b.dataTypes[0]="json",f=a[e],a[e]=function(){g=arguments},d.always(function(){void 0===f?r(a).removeProp(e):a[e]=f,b[e]&&(b.jsonpCallback=c.jsonpCallback,Qb.push(e)),g&&r.isFunction(f)&&f(g[0]),g=f=void 0}),"script"}),o.createHTMLDocument=function(){var a=d.implementation.createHTMLDocument("").body;return a.innerHTML="<form></form><form></form>",2===a.childNodes.length}(),r.parseHTML=function(a,b,c){if("string"!=typeof a)return[];"boolean"==typeof b&&(c=b,b=!1);var e,f,g;return b||(o.createHTMLDocument?(b=d.implementation.createHTMLDocument(""),e=b.createElement("base"),e.href=d.location.href,b.head.appendChild(e)):b=d),f=B.exec(a),g=!c&&[],f?[b.createElement(f[1])]:(f=oa([a],b,g),g&&g.length&&r(g).remove(),r.merge([],f.childNodes))},r.fn.load=function(a,b,c){var d,e,f,g=this,h=a.indexOf(" ");return h>-1&&(d=r.trim(a.slice(h)),a=a.slice(0,h)),r.isFunction(b)?(c=b,b=void 0):b&&"object"==typeof b&&(e="POST"),g.length>0&&r.ajax({url:a,type:e||"GET",dataType:"html",data:b}).done(function(a){f=arguments,g.html(d?r("<div>").append(r.parseHTML(a)).find(d):a)}).always(c&&function(a,b){g.each(function(){c.apply(this,f||[a.responseText,b,a])})}),this},r.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(a,b){r.fn[b]=function(a){return this.on(b,a)}}),r.expr.pseudos.animated=function(a){return r.grep(r.timers,function(b){return a===b.elem}).length};function Sb(a){return r.isWindow(a)?a:9===a.nodeType&&a.defaultView}r.offset={setOffset:function(a,b,c){var d,e,f,g,h,i,j,k=r.css(a,"position"),l=r(a),m={};"static"===k&&(a.style.position="relative"),h=l.offset(),f=r.css(a,"top"),i=r.css(a,"left"),j=("absolute"===k||"fixed"===k)&&(f+i).indexOf("auto")>-1,j?(d=l.position(),g=d.top,e=d.left):(g=parseFloat(f)||0,e=parseFloat(i)||0),r.isFunction(b)&&(b=b.call(a,c,r.extend({},h))),null!=b.top&&(m.top=b.top-h.top+g),null!=b.left&&(m.left=b.left-h.left+e),"using"in b?b.using.call(a,m):l.css(m)}},r.fn.extend({offset:function(a){if(arguments.length)return void 0===a?this:this.each(function(b){r.offset.setOffset(this,a,b)});var b,c,d,e,f=this[0];if(f)return f.getClientRects().length?(d=f.getBoundingClientRect(),d.width||d.height?(e=f.ownerDocument,c=Sb(e),b=e.documentElement,{top:d.top+c.pageYOffset-b.clientTop,left:d.left+c.pageXOffset-b.clientLeft}):d):{top:0,left:0}},position:function(){if(this[0]){var a,b,c=this[0],d={top:0,left:0};return"fixed"===r.css(c,"position")?b=c.getBoundingClientRect():(a=this.offsetParent(),b=this.offset(),r.nodeName(a[0],"html")||(d=a.offset()),d={top:d.top+r.css(a[0],"borderTopWidth",!0),left:d.left+r.css(a[0],"borderLeftWidth",!0)}),{top:b.top-d.top-r.css(c,"marginTop",!0),left:b.left-d.left-r.css(c,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var a=this.offsetParent;while(a&&"static"===r.css(a,"position"))a=a.offsetParent;return a||pa})}}),r.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(a,b){var c="pageYOffset"===b;r.fn[a]=function(d){return S(this,function(a,d,e){var f=Sb(a);return void 0===e?f?f[b]:a[d]:void(f?f.scrollTo(c?f.pageXOffset:e,c?e:f.pageYOffset):a[d]=e)},a,d,arguments.length)}}),r.each(["top","left"],function(a,b){r.cssHooks[b]=Na(o.pixelPosition,function(a,c){if(c)return c=Ma(a,b),Ka.test(c)?r(a).position()[b]+"px":c})}),r.each({Height:"height",Width:"width"},function(a,b){r.each({padding:"inner"+a,content:b,"":"outer"+a},function(c,d){r.fn[d]=function(e,f){var g=arguments.length&&(c||"boolean"!=typeof e),h=c||(e===!0||f===!0?"margin":"border");return S(this,function(b,c,e){var f;return r.isWindow(b)?0===d.indexOf("outer")?b["inner"+a]:b.document.documentElement["client"+a]:9===b.nodeType?(f=b.documentElement,Math.max(b.body["scroll"+a],f["scroll"+a],b.body["offset"+a],f["offset"+a],f["client"+a])):void 0===e?r.css(b,c,h):r.style(b,c,e,h)},b,g?e:void 0,g)}})}),r.fn.extend({bind:function(a,b,c){return this.on(a,null,b,c)},unbind:function(a,b){return this.off(a,null,b)},delegate:function(a,b,c,d){return this.on(b,a,c,d)},undelegate:function(a,b,c){return 1===arguments.length?this.off(a,"**"):this.off(b,a||"**",c)}}),r.parseJSON=JSON.parse,"function"==typeof define&&define.amd&&define("jquery",[],function(){return r});var Tb=a.jQuery,Ub=a.$;return r.noConflict=function(b){return a.$===r&&(a.$=Ub),b&&a.jQuery===r&&(a.jQuery=Tb),r},b||(a.jQuery=a.$=r),r});
</script>

    <script>
!function(){var q=null;window.PR_SHOULD_USE_CONTINUATION=!0;
(function(){function S(a){function d(e){var b=e.charCodeAt(0);if(b!==92)return b;var a=e.charAt(1);return(b=r[a])?b:"0"<=a&&a<="7"?parseInt(e.substring(1),8):a==="u"||a==="x"?parseInt(e.substring(2),16):e.charCodeAt(1)}function g(e){if(e<32)return(e<16?"\\x0":"\\x")+e.toString(16);e=String.fromCharCode(e);return e==="\\"||e==="-"||e==="]"||e==="^"?"\\"+e:e}function b(e){var b=e.substring(1,e.length-1).match(/\\u[\dA-Fa-f]{4}|\\x[\dA-Fa-f]{2}|\\[0-3][0-7]{0,2}|\\[0-7]{1,2}|\\[\S\s]|[^\\]/g),e=[],a=
b[0]==="^",c=["["];a&&c.push("^");for(var a=a?1:0,f=b.length;a<f;++a){var h=b[a];if(/\\[bdsw]/i.test(h))c.push(h);else{var h=d(h),l;a+2<f&&"-"===b[a+1]?(l=d(b[a+2]),a+=2):l=h;e.push([h,l]);l<65||h>122||(l<65||h>90||e.push([Math.max(65,h)|32,Math.min(l,90)|32]),l<97||h>122||e.push([Math.max(97,h)&-33,Math.min(l,122)&-33]))}}e.sort(function(e,a){return e[0]-a[0]||a[1]-e[1]});b=[];f=[];for(a=0;a<e.length;++a)h=e[a],h[0]<=f[1]+1?f[1]=Math.max(f[1],h[1]):b.push(f=h);for(a=0;a<b.length;++a)h=b[a],c.push(g(h[0])),
h[1]>h[0]&&(h[1]+1>h[0]&&c.push("-"),c.push(g(h[1])));c.push("]");return c.join("")}function s(e){for(var a=e.source.match(/\[(?:[^\\\]]|\\[\S\s])*]|\\u[\dA-Fa-f]{4}|\\x[\dA-Fa-f]{2}|\\\d+|\\[^\dux]|\(\?[!:=]|[()^]|[^()[\\^]+/g),c=a.length,d=[],f=0,h=0;f<c;++f){var l=a[f];l==="("?++h:"\\"===l.charAt(0)&&(l=+l.substring(1))&&(l<=h?d[l]=-1:a[f]=g(l))}for(f=1;f<d.length;++f)-1===d[f]&&(d[f]=++x);for(h=f=0;f<c;++f)l=a[f],l==="("?(++h,d[h]||(a[f]="(?:")):"\\"===l.charAt(0)&&(l=+l.substring(1))&&l<=h&&
(a[f]="\\"+d[l]);for(f=0;f<c;++f)"^"===a[f]&&"^"!==a[f+1]&&(a[f]="");if(e.ignoreCase&&m)for(f=0;f<c;++f)l=a[f],e=l.charAt(0),l.length>=2&&e==="["?a[f]=b(l):e!=="\\"&&(a[f]=l.replace(/[A-Za-z]/g,function(a){a=a.charCodeAt(0);return"["+String.fromCharCode(a&-33,a|32)+"]"}));return a.join("")}for(var x=0,m=!1,j=!1,k=0,c=a.length;k<c;++k){var i=a[k];if(i.ignoreCase)j=!0;else if(/[a-z]/i.test(i.source.replace(/\\u[\da-f]{4}|\\x[\da-f]{2}|\\[^UXux]/gi,""))){m=!0;j=!1;break}}for(var r={b:8,t:9,n:10,v:11,
f:12,r:13},n=[],k=0,c=a.length;k<c;++k){i=a[k];if(i.global||i.multiline)throw Error(""+i);n.push("(?:"+s(i)+")")}return RegExp(n.join("|"),j?"gi":"g")}function T(a,d){function g(a){var c=a.nodeType;if(c==1){if(!b.test(a.className)){for(c=a.firstChild;c;c=c.nextSibling)g(c);c=a.nodeName.toLowerCase();if("br"===c||"li"===c)s[j]="\n",m[j<<1]=x++,m[j++<<1|1]=a}}else if(c==3||c==4)c=a.nodeValue,c.length&&(c=d?c.replace(/\r\n?/g,"\n"):c.replace(/[\t\n\r ]+/g," "),s[j]=c,m[j<<1]=x,x+=c.length,m[j++<<1|1]=
a)}var b=/(?:^|\s)nocode(?:\s|$)/,s=[],x=0,m=[],j=0;g(a);return{a:s.join("").replace(/\n$/,""),d:m}}function H(a,d,g,b){d&&(a={a:d,e:a},g(a),b.push.apply(b,a.g))}function U(a){for(var d=void 0,g=a.firstChild;g;g=g.nextSibling)var b=g.nodeType,d=b===1?d?a:g:b===3?V.test(g.nodeValue)?a:d:d;return d===a?void 0:d}function C(a,d){function g(a){for(var j=a.e,k=[j,"pln"],c=0,i=a.a.match(s)||[],r={},n=0,e=i.length;n<e;++n){var z=i[n],w=r[z],t=void 0,f;if(typeof w==="string")f=!1;else{var h=b[z.charAt(0)];
if(h)t=z.match(h[1]),w=h[0];else{for(f=0;f<x;++f)if(h=d[f],t=z.match(h[1])){w=h[0];break}t||(w="pln")}if((f=w.length>=5&&"lang-"===w.substring(0,5))&&!(t&&typeof t[1]==="string"))f=!1,w="src";f||(r[z]=w)}h=c;c+=z.length;if(f){f=t[1];var l=z.indexOf(f),B=l+f.length;t[2]&&(B=z.length-t[2].length,l=B-f.length);w=w.substring(5);H(j+h,z.substring(0,l),g,k);H(j+h+l,f,I(w,f),k);H(j+h+B,z.substring(B),g,k)}else k.push(j+h,w)}a.g=k}var b={},s;(function(){for(var g=a.concat(d),j=[],k={},c=0,i=g.length;c<i;++c){var r=
g[c],n=r[3];if(n)for(var e=n.length;--e>=0;)b[n.charAt(e)]=r;r=r[1];n=""+r;k.hasOwnProperty(n)||(j.push(r),k[n]=q)}j.push(/[\S\s]/);s=S(j)})();var x=d.length;return g}function v(a){var d=[],g=[];a.tripleQuotedStrings?d.push(["str",/^(?:'''(?:[^'\\]|\\[\S\s]|''?(?=[^']))*(?:'''|$)|"""(?:[^"\\]|\\[\S\s]|""?(?=[^"]))*(?:"""|$)|'(?:[^'\\]|\\[\S\s])*(?:'|$)|"(?:[^"\\]|\\[\S\s])*(?:"|$))/,q,"'\""]):a.multiLineStrings?d.push(["str",/^(?:'(?:[^'\\]|\\[\S\s])*(?:'|$)|"(?:[^"\\]|\\[\S\s])*(?:"|$)|`(?:[^\\`]|\\[\S\s])*(?:`|$))/,
q,"'\"`"]):d.push(["str",/^(?:'(?:[^\n\r'\\]|\\.)*(?:'|$)|"(?:[^\n\r"\\]|\\.)*(?:"|$))/,q,"\"'"]);a.verbatimStrings&&g.push(["str",/^@"(?:[^"]|"")*(?:"|$)/,q]);var b=a.hashComments;b&&(a.cStyleComments?(b>1?d.push(["com",/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,q,"#"]):d.push(["com",/^#(?:(?:define|e(?:l|nd)if|else|error|ifn?def|include|line|pragma|undef|warning)\b|[^\n\r]*)/,q,"#"]),g.push(["str",/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h(?:h|pp|\+\+)?|[a-z]\w*)>/,q])):d.push(["com",
/^#[^\n\r]*/,q,"#"]));a.cStyleComments&&(g.push(["com",/^\/\/[^\n\r]*/,q]),g.push(["com",/^\/\*[\S\s]*?(?:\*\/|$)/,q]));if(b=a.regexLiterals){var s=(b=b>1?"":"\n\r")?".":"[\\S\\s]";g.push(["lang-regex",RegExp("^(?:^^\\.?|[+-]|[!=]=?=?|\\#|%=?|&&?=?|\\(|\\*=?|[+\\-]=|->|\\/=?|::?|<<?=?|>>?>?=?|,|;|\\?|@|\\[|~|{|\\^\\^?=?|\\|\\|?=?|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*("+("/(?=[^/*"+b+"])(?:[^/\\x5B\\x5C"+b+"]|\\x5C"+s+"|\\x5B(?:[^\\x5C\\x5D"+b+"]|\\x5C"+
s+")*(?:\\x5D|$))+/")+")")])}(b=a.types)&&g.push(["typ",b]);b=(""+a.keywords).replace(/^ | $/g,"");b.length&&g.push(["kwd",RegExp("^(?:"+b.replace(/[\s,]+/g,"|")+")\\b"),q]);d.push(["pln",/^\s+/,q," \r\n\t\u00a0"]);b="^.[^\\s\\w.$@'\"`/\\\\]*";a.regexLiterals&&(b+="(?!s*/)");g.push(["lit",/^@[$_a-z][\w$@]*/i,q],["typ",/^(?:[@_]?[A-Z]+[a-z][\w$@]*|\w+_t\b)/,q],["pln",/^[$_a-z][\w$@]*/i,q],["lit",/^(?:0x[\da-f]+|(?:\d(?:_\d+)*\d*(?:\.\d*)?|\.\d\+)(?:e[+-]?\d+)?)[a-z]*/i,q,"0123456789"],["pln",/^\\[\S\s]?/,
q],["pun",RegExp(b),q]);return C(d,g)}function J(a,d,g){function b(a){var c=a.nodeType;if(c==1&&!x.test(a.className))if("br"===a.nodeName)s(a),a.parentNode&&a.parentNode.removeChild(a);else for(a=a.firstChild;a;a=a.nextSibling)b(a);else if((c==3||c==4)&&g){var d=a.nodeValue,i=d.match(m);if(i)c=d.substring(0,i.index),a.nodeValue=c,(d=d.substring(i.index+i[0].length))&&a.parentNode.insertBefore(j.createTextNode(d),a.nextSibling),s(a),c||a.parentNode.removeChild(a)}}function s(a){function b(a,c){var d=
c?a.cloneNode(!1):a,e=a.parentNode;if(e){var e=b(e,1),g=a.nextSibling;e.appendChild(d);for(var i=g;i;i=g)g=i.nextSibling,e.appendChild(i)}return d}for(;!a.nextSibling;)if(a=a.parentNode,!a)return;for(var a=b(a.nextSibling,0),d;(d=a.parentNode)&&d.nodeType===1;)a=d;c.push(a)}for(var x=/(?:^|\s)nocode(?:\s|$)/,m=/\r\n?|\n/,j=a.ownerDocument,k=j.createElement("li");a.firstChild;)k.appendChild(a.firstChild);for(var c=[k],i=0;i<c.length;++i)b(c[i]);d===(d|0)&&c[0].setAttribute("value",d);var r=j.createElement("ol");
r.className="linenums";for(var d=Math.max(0,d-1|0)||0,i=0,n=c.length;i<n;++i)k=c[i],k.className="L"+(i+d)%10,k.firstChild||k.appendChild(j.createTextNode("\u00a0")),r.appendChild(k);a.appendChild(r)}function p(a,d){for(var g=d.length;--g>=0;){var b=d[g];F.hasOwnProperty(b)?D.console&&console.warn("cannot override language handler %s",b):F[b]=a}}function I(a,d){if(!a||!F.hasOwnProperty(a))a=/^\s*</.test(d)?"default-markup":"default-code";return F[a]}function K(a){var d=a.h;try{var g=T(a.c,a.i),b=g.a;
a.a=b;a.d=g.d;a.e=0;I(d,b)(a);var s=/\bMSIE\s(\d+)/.exec(navigator.userAgent),s=s&&+s[1]<=8,d=/\n/g,x=a.a,m=x.length,g=0,j=a.d,k=j.length,b=0,c=a.g,i=c.length,r=0;c[i]=m;var n,e;for(e=n=0;e<i;)c[e]!==c[e+2]?(c[n++]=c[e++],c[n++]=c[e++]):e+=2;i=n;for(e=n=0;e<i;){for(var p=c[e],w=c[e+1],t=e+2;t+2<=i&&c[t+1]===w;)t+=2;c[n++]=p;c[n++]=w;e=t}c.length=n;var f=a.c,h;if(f)h=f.style.display,f.style.display="none";try{for(;b<k;){var l=j[b+2]||m,B=c[r+2]||m,t=Math.min(l,B),A=j[b+1],G;if(A.nodeType!==1&&(G=x.substring(g,
t))){s&&(G=G.replace(d,"\r"));A.nodeValue=G;var L=A.ownerDocument,o=L.createElement("span");o.className=c[r+1];var v=A.parentNode;v.replaceChild(o,A);o.appendChild(A);g<l&&(j[b+1]=A=L.createTextNode(x.substring(t,l)),v.insertBefore(A,o.nextSibling))}g=t;g>=l&&(b+=2);g>=B&&(r+=2)}}finally{if(f)f.style.display=h}}catch(u){D.console&&console.log(u&&u.stack||u)}}var D=window,y=["break,continue,do,else,for,if,return,while"],E=[[y,"auto,case,char,const,default,double,enum,extern,float,goto,inline,int,long,register,short,signed,sizeof,static,struct,switch,typedef,union,unsigned,void,volatile"],
"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],M=[E,"alignof,align_union,asm,axiom,bool,concept,concept_map,const_cast,constexpr,decltype,delegate,dynamic_cast,explicit,export,friend,generic,late_check,mutable,namespace,nullptr,property,reinterpret_cast,static_assert,static_cast,template,typeid,typename,using,virtual,where"],N=[E,"abstract,assert,boolean,byte,extends,final,finally,implements,import,instanceof,interface,null,native,package,strictfp,super,synchronized,throws,transient"],
O=[N,"as,base,by,checked,decimal,delegate,descending,dynamic,event,fixed,foreach,from,group,implicit,in,internal,into,is,let,lock,object,out,override,orderby,params,partial,readonly,ref,sbyte,sealed,stackalloc,string,select,uint,ulong,unchecked,unsafe,ushort,var,virtual,where"],E=[E,"debugger,eval,export,function,get,null,set,undefined,var,with,Infinity,NaN"],P=[y,"and,as,assert,class,def,del,elif,except,exec,finally,from,global,import,in,is,lambda,nonlocal,not,or,pass,print,raise,try,with,yield,False,True,None"],
Q=[y,"alias,and,begin,case,class,def,defined,elsif,end,ensure,false,in,module,next,nil,not,or,redo,rescue,retry,self,super,then,true,undef,unless,until,when,yield,BEGIN,END"],W=[y,"as,assert,const,copy,drop,enum,extern,fail,false,fn,impl,let,log,loop,match,mod,move,mut,priv,pub,pure,ref,self,static,struct,true,trait,type,unsafe,use"],y=[y,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],R=/^(DIR|FILE|vector|(de|priority_)?queue|list|stack|(const_)?iterator|(multi)?(set|map)|bitset|u?(int|float)\d*)\b/,
V=/\S/,X=v({keywords:[M,O,E,"caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END",P,Q,y],hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0}),F={};p(X,["default-code"]);p(C([],[["pln",/^[^<?]+/],["dec",/^<!\w[^>]*(?:>|$)/],["com",/^<\!--[\S\s]*?(?:--\>|$)/],["lang-",/^<\?([\S\s]+?)(?:\?>|$)/],["lang-",/^<%([\S\s]+?)(?:%>|$)/],["pun",/^(?:<[%?]|[%?]>)/],["lang-",
/^<xmp\b[^>]*>([\S\s]+?)<\/xmp\b[^>]*>/i],["lang-js",/^<script\b[^>]*>([\S\s]*?)(<\/script\b[^>]*>)/i],["lang-css",/^<style\b[^>]*>([\S\s]*?)(<\/style\b[^>]*>)/i],["lang-in.tag",/^(<\/?[a-z][^<>]*>)/i]]),["default-markup","htm","html","mxml","xhtml","xml","xsl"]);p(C([["pln",/^\s+/,q," \t\r\n"],["atv",/^(?:"[^"]*"?|'[^']*'?)/,q,"\"'"]],[["tag",/^^<\/?[a-z](?:[\w-.:]*\w)?|\/?>$/i],["atn",/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^\s"'>]*(?:[^\s"'/>]|\/(?=\s)))/],["pun",/^[/<->]+/],
["lang-js",/^on\w+\s*=\s*"([^"]+)"/i],["lang-js",/^on\w+\s*=\s*'([^']+)'/i],["lang-js",/^on\w+\s*=\s*([^\s"'>]+)/i],["lang-css",/^style\s*=\s*"([^"]+)"/i],["lang-css",/^style\s*=\s*'([^']+)'/i],["lang-css",/^style\s*=\s*([^\s"'>]+)/i]]),["in.tag"]);p(C([],[["atv",/^[\S\s]+/]]),["uq.val"]);p(v({keywords:M,hashComments:!0,cStyleComments:!0,types:R}),["c","cc","cpp","cxx","cyc","m"]);p(v({keywords:"null,true,false"}),["json"]);p(v({keywords:O,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:R}),
["cs"]);p(v({keywords:N,cStyleComments:!0}),["java"]);p(v({keywords:y,hashComments:!0,multiLineStrings:!0}),["bash","bsh","csh","sh"]);p(v({keywords:P,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}),["cv","py","python"]);p(v({keywords:"caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END",hashComments:!0,multiLineStrings:!0,regexLiterals:2}),["perl","pl","pm"]);p(v({keywords:Q,
hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb","ruby"]);p(v({keywords:E,cStyleComments:!0,regexLiterals:!0}),["javascript","js"]);p(v({keywords:"all,and,by,catch,class,else,extends,false,finally,for,if,in,is,isnt,loop,new,no,not,null,of,off,on,or,return,super,then,throw,true,try,unless,until,when,while,yes",hashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,regexLiterals:!0}),["coffee"]);p(v({keywords:W,cStyleComments:!0,multilineStrings:!0}),["rc","rs","rust"]);
p(C([],[["str",/^[\S\s]+/]]),["regex"]);var Y=D.PR={createSimpleLexer:C,registerLangHandler:p,sourceDecorator:v,PR_ATTRIB_NAME:"atn",PR_ATTRIB_VALUE:"atv",PR_COMMENT:"com",PR_DECLARATION:"dec",PR_KEYWORD:"kwd",PR_LITERAL:"lit",PR_NOCODE:"nocode",PR_PLAIN:"pln",PR_PUNCTUATION:"pun",PR_SOURCE:"src",PR_STRING:"str",PR_TAG:"tag",PR_TYPE:"typ",prettyPrintOne:D.prettyPrintOne=function(a,d,g){var b=document.createElement("div");b.innerHTML="<pre>"+a+"</pre>";b=b.firstChild;g&&J(b,g,!0);K({h:d,j:g,c:b,i:1});
return b.innerHTML},prettyPrint:D.prettyPrint=function(a,d){function g(){for(var b=D.PR_SHOULD_USE_CONTINUATION?c.now()+250:Infinity;i<p.length&&c.now()<b;i++){for(var d=p[i],j=h,k=d;k=k.previousSibling;){var m=k.nodeType,o=(m===7||m===8)&&k.nodeValue;if(o?!/^\??prettify\b/.test(o):m!==3||/\S/.test(k.nodeValue))break;if(o){j={};o.replace(/\b(\w+)=([\w%+\-.:]+)/g,function(a,b,c){j[b]=c});break}}k=d.className;if((j!==h||e.test(k))&&!v.test(k)){m=!1;for(o=d.parentNode;o;o=o.parentNode)if(f.test(o.tagName)&&
o.className&&e.test(o.className)){m=!0;break}if(!m){d.className+=" prettyprinted";m=j.lang;if(!m){var m=k.match(n),y;if(!m&&(y=U(d))&&t.test(y.tagName))m=y.className.match(n);m&&(m=m[1])}if(w.test(d.tagName))o=1;else var o=d.currentStyle,u=s.defaultView,o=(o=o?o.whiteSpace:u&&u.getComputedStyle?u.getComputedStyle(d,q).getPropertyValue("white-space"):0)&&"pre"===o.substring(0,3);u=j.linenums;if(!(u=u==="true"||+u))u=(u=k.match(/\blinenums\b(?::(\d+))?/))?u[1]&&u[1].length?+u[1]:!0:!1;u&&J(d,u,o);r=
{h:m,c:d,j:u,i:o};K(r)}}}i<p.length?setTimeout(g,250):"function"===typeof a&&a()}for(var b=d||document.body,s=b.ownerDocument||document,b=[b.getElementsByTagName("pre"),b.getElementsByTagName("code"),b.getElementsByTagName("xmp")],p=[],m=0;m<b.length;++m)for(var j=0,k=b[m].length;j<k;++j)p.push(b[m][j]);var b=q,c=Date;c.now||(c={now:function(){return+new Date}});var i=0,r,n=/\blang(?:uage)?-([\w.]+)(?!\S)/,e=/\bprettyprint\b/,v=/\bprettyprinted\b/,w=/pre|xmp/i,t=/^code$/i,f=/^(?:pre|code|xmp)$/i,
h={};g()}};typeof define==="function"&&define.amd&&define("google-code-prettify",[],function(){return Y})})();}()
</script>

    <script>
/*!
* Bootstrap.js by @fat & @mdo
* Copyright 2013 Twitter, Inc.
* http://www.apache.org/licenses/LICENSE-2.0.txt
*/
!function(e){"use strict";e(function(){e.support.transition=function(){var e=function(){var e=document.createElement("bootstrap"),t={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"},n;for(n in t)if(e.style[n]!==undefined)return t[n]}();return e&&{end:e}}()})}(window.jQuery),!function(e){"use strict";var t='[data-dismiss="alert"]',n=function(n){e(n).on("click",t,this.close)};n.prototype.close=function(t){function s(){i.trigger("closed").remove()}var n=e(this),r=n.attr("data-target"),i;r||(r=n.attr("href"),r=r&&r.replace(/.*(?=#[^\s]*$)/,"")),i=e(r),t&&t.preventDefault(),i.length||(i=n.hasClass("alert")?n:n.parent()),i.trigger(t=e.Event("close"));if(t.isDefaultPrevented())return;i.removeClass("in"),e.support.transition&&i.hasClass("fade")?i.on(e.support.transition.end,s):s()};var r=e.fn.alert;e.fn.alert=function(t){return this.each(function(){var r=e(this),i=r.data("alert");i||r.data("alert",i=new n(this)),typeof t=="string"&&i[t].call(r)})},e.fn.alert.Constructor=n,e.fn.alert.noConflict=function(){return e.fn.alert=r,this},e(document).on("click.alert.data-api",t,n.prototype.close)}(window.jQuery),!function(e){"use strict";var t=function(t,n){this.$element=e(t),this.options=e.extend({},e.fn.button.defaults,n)};t.prototype.setState=function(e){var t="disabled",n=this.$element,r=n.data(),i=n.is("input")?"val":"html";e+="Text",r.resetText||n.data("resetText",n[i]()),n[i](r[e]||this.options[e]),setTimeout(function(){e=="loadingText"?n.addClass(t).attr(t,t):n.removeClass(t).removeAttr(t)},0)},t.prototype.toggle=function(){var e=this.$element.closest('[data-toggle="buttons-radio"]');e&&e.find(".active").removeClass("active"),this.$element.toggleClass("active")};var n=e.fn.button;e.fn.button=function(n){return this.each(function(){var r=e(this),i=r.data("button"),s=typeof n=="object"&&n;i||r.data("button",i=new t(this,s)),n=="toggle"?i.toggle():n&&i.setState(n)})},e.fn.button.defaults={loadingText:"loading..."},e.fn.button.Constructor=t,e.fn.button.noConflict=function(){return e.fn.button=n,this},e(document).on("click.button.data-api","[data-toggle^=button]",function(t){var n=e(t.target);n.hasClass("btn")||(n=n.closest(".btn")),n.button("toggle")})}(window.jQuery),!function(e){"use strict";var t=function(t,n){this.$element=e(t),this.$indicators=this.$element.find(".carousel-indicators"),this.options=n,this.options.pause=="hover"&&this.$element.on("mouseenter",e.proxy(this.pause,this)).on("mouseleave",e.proxy(this.cycle,this))};t.prototype={cycle:function(t){return t||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(e.proxy(this.next,this),this.options.interval)),this},getActiveIndex:function(){return this.$active=this.$element.find(".item.active"),this.$items=this.$active.parent().children(),this.$items.index(this.$active)},to:function(t){var n=this.getActiveIndex(),r=this;if(t>this.$items.length-1||t<0)return;return this.sliding?this.$element.one("slid",function(){r.to(t)}):n==t?this.pause().cycle():this.slide(t>n?"next":"prev",e(this.$items[t]))},pause:function(t){return t||(this.paused=!0),this.$element.find(".next, .prev").length&&e.support.transition.end&&(this.$element.trigger(e.support.transition.end),this.cycle(!0)),clearInterval(this.interval),this.interval=null,this},next:function(){if(this.sliding)return;return this.slide("next")},prev:function(){if(this.sliding)return;return this.slide("prev")},slide:function(t,n){var r=this.$element.find(".item.active"),i=n||r[t](),s=this.interval,o=t=="next"?"left":"right",u=t=="next"?"first":"last",a=this,f;this.sliding=!0,s&&this.pause(),i=i.length?i:this.$element.find(".item")[u](),f=e.Event("slide",{relatedTarget:i[0],direction:o});if(i.hasClass("active"))return;this.$indicators.length&&(this.$indicators.find(".active").removeClass("active"),this.$element.one("slid",function(){var t=e(a.$indicators.children()[a.getActiveIndex()]);t&&t.addClass("active")}));if(e.support.transition&&this.$element.hasClass("slide")){this.$element.trigger(f);if(f.isDefaultPrevented())return;i.addClass(t),i[0].offsetWidth,r.addClass(o),i.addClass(o),this.$element.one(e.support.transition.end,function(){i.removeClass([t,o].join(" ")).addClass("active"),r.removeClass(["active",o].join(" ")),a.sliding=!1,setTimeout(function(){a.$element.trigger("slid")},0)})}else{this.$element.trigger(f);if(f.isDefaultPrevented())return;r.removeClass("active"),i.addClass("active"),this.sliding=!1,this.$element.trigger("slid")}return s&&this.cycle(),this}};var n=e.fn.carousel;e.fn.carousel=function(n){return this.each(function(){var r=e(this),i=r.data("carousel"),s=e.extend({},e.fn.carousel.defaults,typeof n=="object"&&n),o=typeof n=="string"?n:s.slide;i||r.data("carousel",i=new t(this,s)),typeof n=="number"?i.to(n):o?i[o]():s.interval&&i.pause().cycle()})},e.fn.carousel.defaults={interval:5e3,pause:"hover"},e.fn.carousel.Constructor=t,e.fn.carousel.noConflict=function(){return e.fn.carousel=n,this},e(document).on("click.carousel.data-api","[data-slide], [data-slide-to]",function(t){var n=e(this),r,i=e(n.attr("data-target")||(r=n.attr("href"))&&r.replace(/.*(?=#[^\s]+$)/,"")),s=e.extend({},i.data(),n.data()),o;i.carousel(s),(o=n.attr("data-slide-to"))&&i.data("carousel").pause().to(o).cycle(),t.preventDefault()})}(window.jQuery),!function(e){"use strict";var t=function(t,n){this.$element=e(t),this.options=e.extend({},e.fn.collapse.defaults,n),this.options.parent&&(this.$parent=e(this.options.parent)),this.options.toggle&&this.toggle()};t.prototype={constructor:t,dimension:function(){var e=this.$element.hasClass("width");return e?"width":"height"},show:function(){var t,n,r,i;if(this.transitioning||this.$element.hasClass("in"))return;t=this.dimension(),n=e.camelCase(["scroll",t].join("-")),r=this.$parent&&this.$parent.find("> .accordion-group > .in");if(r&&r.length){i=r.data("collapse");if(i&&i.transitioning)return;r.collapse("hide"),i||r.data("collapse",null)}this.$element[t](0),this.transition("addClass",e.Event("show"),"shown"),e.support.transition&&this.$element[t](this.$element[0][n])},hide:function(){var t;if(this.transitioning||!this.$element.hasClass("in"))return;t=this.dimension(),this.reset(this.$element[t]()),this.transition("removeClass",e.Event("hide"),"hidden"),this.$element[t](0)},reset:function(e){var t=this.dimension();return this.$element.removeClass("collapse")[t](e||"auto")[0].offsetWidth,this.$element[e!==null?"addClass":"removeClass"]("collapse"),this},transition:function(t,n,r){var i=this,s=function(){n.type=="show"&&i.reset(),i.transitioning=0,i.$element.trigger(r)};this.$element.trigger(n);if(n.isDefaultPrevented())return;this.transitioning=1,this.$element[t]("in"),e.support.transition&&this.$element.hasClass("collapse")?this.$element.one(e.support.transition.end,s):s()},toggle:function(){this[this.$element.hasClass("in")?"hide":"show"]()}};var n=e.fn.collapse;e.fn.collapse=function(n){return this.each(function(){var r=e(this),i=r.data("collapse"),s=e.extend({},e.fn.collapse.defaults,r.data(),typeof n=="object"&&n);i||r.data("collapse",i=new t(this,s)),typeof n=="string"&&i[n]()})},e.fn.collapse.defaults={toggle:!0},e.fn.collapse.Constructor=t,e.fn.collapse.noConflict=function(){return e.fn.collapse=n,this},e(document).on("click.collapse.data-api","[data-toggle=collapse]",function(t){var n=e(this),r,i=n.attr("data-target")||t.preventDefault()||(r=n.attr("href"))&&r.replace(/.*(?=#[^\s]+$)/,""),s=e(i).data("collapse")?"toggle":n.data();n[e(i).hasClass("in")?"addClass":"removeClass"]("collapsed"),e(i).collapse(s)})}(window.jQuery),!function(e){"use strict";function r(){e(".dropdown-backdrop").remove(),e(t).each(function(){i(e(this)).removeClass("open")})}function i(t){var n=t.attr("data-target"),r;n||(n=t.attr("href"),n=n&&/#/.test(n)&&n.replace(/.*(?=#[^\s]*$)/,"")),r=n&&e(n);if(!r||!r.length)r=t.parent();return r}var t="[data-toggle=dropdown]",n=function(t){var n=e(t).on("click.dropdown.data-api",this.toggle);e("html").on("click.dropdown.data-api",function(){n.parent().removeClass("open")})};n.prototype={constructor:n,toggle:function(t){var n=e(this),s,o;if(n.is(".disabled, :disabled"))return;return s=i(n),o=s.hasClass("open"),r(),o||("ontouchstart"in document.documentElement&&e('<div class="dropdown-backdrop"/>').insertBefore(e(this)).on("click",r),s.toggleClass("open")),n.focus(),!1},keydown:function(n){var r,s,o,u,a,f;if(!/(38|40|27)/.test(n.keyCode))return;r=e(this),n.preventDefault(),n.stopPropagation();if(r.is(".disabled, :disabled"))return;u=i(r),a=u.hasClass("open");if(!a||a&&n.keyCode==27)return n.which==27&&u.find(t).focus(),r.click();s=e("[role=menu] li:not(.divider):visible a",u);if(!s.length)return;f=s.index(s.filter(":focus")),n.keyCode==38&&f>0&&f--,n.keyCode==40&&f<s.length-1&&f++,~f||(f=0),s.eq(f).focus()}};var s=e.fn.dropdown;e.fn.dropdown=function(t){return this.each(function(){var r=e(this),i=r.data("dropdown");i||r.data("dropdown",i=new n(this)),typeof t=="string"&&i[t].call(r)})},e.fn.dropdown.Constructor=n,e.fn.dropdown.noConflict=function(){return e.fn.dropdown=s,this},e(document).on("click.dropdown.data-api",r).on("click.dropdown.data-api",".dropdown form",function(e){e.stopPropagation()}).on("click.dropdown.data-api",t,n.prototype.toggle).on("keydown.dropdown.data-api",t+", [role=menu]",n.prototype.keydown)}(window.jQuery),!function(e){"use strict";var t=function(t,n){this.options=n,this.$element=e(t).delegate('[data-dismiss="modal"]',"click.dismiss.modal",e.proxy(this.hide,this)),this.options.remote&&this.$element.find(".modal-body").load(this.options.remote)};t.prototype={constructor:t,toggle:function(){return this[this.isShown?"hide":"show"]()},show:function(){var t=this,n=e.Event("show");this.$element.trigger(n);if(this.isShown||n.isDefaultPrevented())return;this.isShown=!0,this.escape(),this.backdrop(function(){var n=e.support.transition&&t.$element.hasClass("fade");t.$element.parent().length||t.$element.appendTo(document.body),t.$element.show(),n&&t.$element[0].offsetWidth,t.$element.addClass("in").attr("aria-hidden",!1),t.enforceFocus(),n?t.$element.one(e.support.transition.end,function(){t.$element.focus().trigger("shown")}):t.$element.focus().trigger("shown")})},hide:function(t){t&&t.preventDefault();var n=this;t=e.Event("hide"),this.$element.trigger(t);if(!this.isShown||t.isDefaultPrevented())return;this.isShown=!1,this.escape(),e(document).off("focusin.modal"),this.$element.removeClass("in").attr("aria-hidden",!0),e.support.transition&&this.$element.hasClass("fade")?this.hideWithTransition():this.hideModal()},enforceFocus:function(){var t=this;e(document).on("focusin.modal",function(e){t.$element[0]!==e.target&&!t.$element.has(e.target).length&&t.$element.focus()})},escape:function(){var e=this;this.isShown&&this.options.keyboard?this.$element.on("keyup.dismiss.modal",function(t){t.which==27&&e.hide()}):this.isShown||this.$element.off("keyup.dismiss.modal")},hideWithTransition:function(){var t=this,n=setTimeout(function(){t.$element.off(e.support.transition.end),t.hideModal()},500);this.$element.one(e.support.transition.end,function(){clearTimeout(n),t.hideModal()})},hideModal:function(){var e=this;this.$element.hide(),this.backdrop(function(){e.removeBackdrop(),e.$element.trigger("hidden")})},removeBackdrop:function(){this.$backdrop&&this.$backdrop.remove(),this.$backdrop=null},backdrop:function(t){var n=this,r=this.$element.hasClass("fade")?"fade":"";if(this.isShown&&this.options.backdrop){var i=e.support.transition&&r;this.$backdrop=e('<div class="modal-backdrop '+r+'" />').appendTo(document.body),this.$backdrop.click(this.options.backdrop=="static"?e.proxy(this.$element[0].focus,this.$element[0]):e.proxy(this.hide,this)),i&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in");if(!t)return;i?this.$backdrop.one(e.support.transition.end,t):t()}else!this.isShown&&this.$backdrop?(this.$backdrop.removeClass("in"),e.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one(e.support.transition.end,t):t()):t&&t()}};var n=e.fn.modal;e.fn.modal=function(n){return this.each(function(){var r=e(this),i=r.data("modal"),s=e.extend({},e.fn.modal.defaults,r.data(),typeof n=="object"&&n);i||r.data("modal",i=new t(this,s)),typeof n=="string"?i[n]():s.show&&i.show()})},e.fn.modal.defaults={backdrop:!0,keyboard:!0,show:!0},e.fn.modal.Constructor=t,e.fn.modal.noConflict=function(){return e.fn.modal=n,this},e(document).on("click.modal.data-api",'[data-toggle="modal"]',function(t){var n=e(this),r=n.attr("href"),i=e(n.attr("data-target")||r&&r.replace(/.*(?=#[^\s]+$)/,"")),s=i.data("modal")?"toggle":e.extend({remote:!/#/.test(r)&&r},i.data(),n.data());t.preventDefault(),i.modal(s).one("hide",function(){n.focus()})})}(window.jQuery),!function(e){"use strict";var t=function(e,t){this.init("tooltip",e,t)};t.prototype={constructor:t,init:function(t,n,r){var i,s,o,u,a;this.type=t,this.$element=e(n),this.options=this.getOptions(r),this.enabled=!0,o=this.options.trigger.split(" ");for(a=o.length;a--;)u=o[a],u=="click"?this.$element.on("click."+this.type,this.options.selector,e.proxy(this.toggle,this)):u!="manual"&&(i=u=="hover"?"mouseenter":"focus",s=u=="hover"?"mouseleave":"blur",this.$element.on(i+"."+this.type,this.options.selector,e.proxy(this.enter,this)),this.$element.on(s+"."+this.type,this.options.selector,e.proxy(this.leave,this)));this.options.selector?this._options=e.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},getOptions:function(t){return t=e.extend({},e.fn[this.type].defaults,this.$element.data(),t),t.delay&&typeof t.delay=="number"&&(t.delay={show:t.delay,hide:t.delay}),t},enter:function(t){var n=e.fn[this.type].defaults,r={},i;this._options&&e.each(this._options,function(e,t){n[e]!=t&&(r[e]=t)},this),i=e(t.currentTarget)[this.type](r).data(this.type);if(!i.options.delay||!i.options.delay.show)return i.show();clearTimeout(this.timeout),i.hoverState="in",this.timeout=setTimeout(function(){i.hoverState=="in"&&i.show()},i.options.delay.show)},leave:function(t){var n=e(t.currentTarget)[this.type](this._options).data(this.type);this.timeout&&clearTimeout(this.timeout);if(!n.options.delay||!n.options.delay.hide)return n.hide();n.hoverState="out",this.timeout=setTimeout(function(){n.hoverState=="out"&&n.hide()},n.options.delay.hide)},show:function(){var t,n,r,i,s,o,u=e.Event("show");if(this.hasContent()&&this.enabled){this.$element.trigger(u);if(u.isDefaultPrevented())return;t=this.tip(),this.setContent(),this.options.animation&&t.addClass("fade"),s=typeof this.options.placement=="function"?this.options.placement.call(this,t[0],this.$element[0]):this.options.placement,t.detach().css({top:0,left:0,display:"block"}),this.options.container?t.appendTo(this.options.container):t.insertAfter(this.$element),n=this.getPosition(),r=t[0].offsetWidth,i=t[0].offsetHeight;switch(s){case"bottom":o={top:n.top+n.height,left:n.left+n.width/2-r/2};break;case"top":o={top:n.top-i,left:n.left+n.width/2-r/2};break;case"left":o={top:n.top+n.height/2-i/2,left:n.left-r};break;case"right":o={top:n.top+n.height/2-i/2,left:n.left+n.width}}this.applyPlacement(o,s),this.$element.trigger("shown")}},applyPlacement:function(e,t){var n=this.tip(),r=n[0].offsetWidth,i=n[0].offsetHeight,s,o,u,a;n.offset(e).addClass(t).addClass("in"),s=n[0].offsetWidth,o=n[0].offsetHeight,t=="top"&&o!=i&&(e.top=e.top+i-o,a=!0),t=="bottom"||t=="top"?(u=0,e.left<0&&(u=e.left*-2,e.left=0,n.offset(e),s=n[0].offsetWidth,o=n[0].offsetHeight),this.replaceArrow(u-r+s,s,"left")):this.replaceArrow(o-i,o,"top"),a&&n.offset(e)},replaceArrow:function(e,t,n){this.arrow().css(n,e?50*(1-e/t)+"%":"")},setContent:function(){var e=this.tip(),t=this.getTitle();e.find(".tooltip-inner")[this.options.html?"html":"text"](t),e.removeClass("fade in top bottom left right")},hide:function(){function i(){var t=setTimeout(function(){n.off(e.support.transition.end).detach()},500);n.one(e.support.transition.end,function(){clearTimeout(t),n.detach()})}var t=this,n=this.tip(),r=e.Event("hide");this.$element.trigger(r);if(r.isDefaultPrevented())return;return n.removeClass("in"),e.support.transition&&this.$tip.hasClass("fade")?i():n.detach(),this.$element.trigger("hidden"),this},fixTitle:function(){var e=this.$element;(e.attr("title")||typeof e.attr("data-original-title")!="string")&&e.attr("data-original-title",e.attr("title")||"").attr("title","")},hasContent:function(){return this.getTitle()},getPosition:function(){var t=this.$element[0];return e.extend({},typeof t.getBoundingClientRect=="function"?t.getBoundingClientRect():{width:t.offsetWidth,height:t.offsetHeight},this.$element.offset())},getTitle:function(){var e,t=this.$element,n=this.options;return e=t.attr("data-original-title")||(typeof n.title=="function"?n.title.call(t[0]):n.title),e},tip:function(){return this.$tip=this.$tip||e(this.options.template)},arrow:function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},validate:function(){this.$element[0].parentNode||(this.hide(),this.$element=null,this.options=null)},enable:function(){this.enabled=!0},disable:function(){this.enabled=!1},toggleEnabled:function(){this.enabled=!this.enabled},toggle:function(t){var n=t?e(t.currentTarget)[this.type](this._options).data(this.type):this;n.tip().hasClass("in")?n.hide():n.show()},destroy:function(){this.hide().$element.off("."+this.type).removeData(this.type)}};var n=e.fn.tooltip;e.fn.tooltip=function(n){return this.each(function(){var r=e(this),i=r.data("tooltip"),s=typeof n=="object"&&n;i||r.data("tooltip",i=new t(this,s)),typeof n=="string"&&i[n]()})},e.fn.tooltip.Constructor=t,e.fn.tooltip.defaults={animation:!0,placement:"top",selector:!1,template:'<div class="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:!1,container:!1},e.fn.tooltip.noConflict=function(){return e.fn.tooltip=n,this}}(window.jQuery),!function(e){"use strict";var t=function(e,t){this.init("popover",e,t)};t.prototype=e.extend({},e.fn.tooltip.Constructor.prototype,{constructor:t,setContent:function(){var e=this.tip(),t=this.getTitle(),n=this.getContent();e.find(".popover-title")[this.options.html?"html":"text"](t),e.find(".popover-content")[this.options.html?"html":"text"](n),e.removeClass("fade top bottom left right in")},hasContent:function(){return this.getTitle()||this.getContent()},getContent:function(){var e,t=this.$element,n=this.options;return e=(typeof n.content=="function"?n.content.call(t[0]):n.content)||t.attr("data-content"),e},tip:function(){return this.$tip||(this.$tip=e(this.options.template)),this.$tip},destroy:function(){this.hide().$element.off("."+this.type).removeData(this.type)}});var n=e.fn.popover;e.fn.popover=function(n){return this.each(function(){var r=e(this),i=r.data("popover"),s=typeof n=="object"&&n;i||r.data("popover",i=new t(this,s)),typeof n=="string"&&i[n]()})},e.fn.popover.Constructor=t,e.fn.popover.defaults=e.extend({},e.fn.tooltip.defaults,{placement:"right",trigger:"click",content:"",template:'<div class="popover"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'}),e.fn.popover.noConflict=function(){return e.fn.popover=n,this}}(window.jQuery),!function(e){"use strict";function t(t,n){var r=e.proxy(this.process,this),i=e(t).is("body")?e(window):e(t),s;this.options=e.extend({},e.fn.scrollspy.defaults,n),this.$scrollElement=i.on("scroll.scroll-spy.data-api",r),this.selector=(this.options.target||(s=e(t).attr("href"))&&s.replace(/.*(?=#[^\s]+$)/,"")||"")+" .nav li > a",this.$body=e("body"),this.refresh(),this.process()}t.prototype={constructor:t,refresh:function(){var t=this,n;this.offsets=e([]),this.targets=e([]),n=this.$body.find(this.selector).map(function(){var n=e(this),r=n.data("target")||n.attr("href"),i=/^#\w/.test(r)&&e(r);return i&&i.length&&[[i.position().top+(!e.isWindow(t.$scrollElement.get(0))&&t.$scrollElement.scrollTop()),r]]||null}).sort(function(e,t){return e[0]-t[0]}).each(function(){t.offsets.push(this[0]),t.targets.push(this[1])})},process:function(){var e=this.$scrollElement.scrollTop()+this.options.offset,t=this.$scrollElement[0].scrollHeight||this.$body[0].scrollHeight,n=t-this.$scrollElement.height(),r=this.offsets,i=this.targets,s=this.activeTarget,o;if(e>=n)return s!=(o=i.last()[0])&&this.activate(o);for(o=r.length;o--;)s!=i[o]&&e>=r[o]&&(!r[o+1]||e<=r[o+1])&&this.activate(i[o])},activate:function(t){var n,r;this.activeTarget=t,e(this.selector).parent(".active").removeClass("active"),r=this.selector+'[data-target="'+t+'"],'+this.selector+'[href="'+t+'"]',n=e(r).parent("li").addClass("active"),n.parent(".dropdown-menu").length&&(n=n.closest("li.dropdown").addClass("active")),n.trigger("activate")}};var n=e.fn.scrollspy;e.fn.scrollspy=function(n){return this.each(function(){var r=e(this),i=r.data("scrollspy"),s=typeof n=="object"&&n;i||r.data("scrollspy",i=new t(this,s)),typeof n=="string"&&i[n]()})},e.fn.scrollspy.Constructor=t,e.fn.scrollspy.defaults={offset:10},e.fn.scrollspy.noConflict=function(){return e.fn.scrollspy=n,this},e(window).on("load",function(){e('[data-spy="scroll"]').each(function(){var t=e(this);t.scrollspy(t.data())})})}(window.jQuery),!function(e){"use strict";var t=function(t){this.element=e(t)};t.prototype={constructor:t,show:function(){var t=this.element,n=t.closest("ul:not(.dropdown-menu)"),r=t.attr("data-target"),i,s,o;r||(r=t.attr("href"),r=r&&r.replace(/.*(?=#[^\s]*$)/,""));if(t.parent("li").hasClass("active"))return;i=n.find(".active:last a")[0],o=e.Event("show",{relatedTarget:i}),t.trigger(o);if(o.isDefaultPrevented())return;s=e(r),this.activate(t.parent("li"),n),this.activate(s,s.parent(),function(){t.trigger({type:"shown",relatedTarget:i})})},activate:function(t,n,r){function o(){i.removeClass("active").find("> .dropdown-menu > .active").removeClass("active"),t.addClass("active"),s?(t[0].offsetWidth,t.addClass("in")):t.removeClass("fade"),t.parent(".dropdown-menu")&&t.closest("li.dropdown").addClass("active"),r&&r()}var i=n.find("> .active"),s=r&&e.support.transition&&i.hasClass("fade");s?i.one(e.support.transition.end,o):o(),i.removeClass("in")}};var n=e.fn.tab;e.fn.tab=function(n){return this.each(function(){var r=e(this),i=r.data("tab");i||r.data("tab",i=new t(this)),typeof n=="string"&&i[n]()})},e.fn.tab.Constructor=t,e.fn.tab.noConflict=function(){return e.fn.tab=n,this},e(document).on("click.tab.data-api",'[data-toggle="tab"], [data-toggle="pill"]',function(t){t.preventDefault(),e(this).tab("show")})}(window.jQuery),!function(e){"use strict";var t=function(t,n){this.$element=e(t),this.options=e.extend({},e.fn.typeahead.defaults,n),this.matcher=this.options.matcher||this.matcher,this.sorter=this.options.sorter||this.sorter,this.highlighter=this.options.highlighter||this.highlighter,this.updater=this.options.updater||this.updater,this.source=this.options.source,this.$menu=e(this.options.menu),this.shown=!1,this.listen()};t.prototype={constructor:t,select:function(){var e=this.$menu.find(".active").attr("data-value");return this.$element.val(this.updater(e)).change(),this.hide()},updater:function(e){return e},show:function(){var t=e.extend({},this.$element.position(),{height:this.$element[0].offsetHeight});return this.$menu.insertAfter(this.$element).css({top:t.top+t.height,left:t.left}).show(),this.shown=!0,this},hide:function(){return this.$menu.hide(),this.shown=!1,this},lookup:function(t){var n;return this.query=this.$element.val(),!this.query||this.query.length<this.options.minLength?this.shown?this.hide():this:(n=e.isFunction(this.source)?this.source(this.query,e.proxy(this.process,this)):this.source,n?this.process(n):this)},process:function(t){var n=this;return t=e.grep(t,function(e){return n.matcher(e)}),t=this.sorter(t),t.length?this.render(t.slice(0,this.options.items)).show():this.shown?this.hide():this},matcher:function(e){return~e.toLowerCase().indexOf(this.query.toLowerCase())},sorter:function(e){var t=[],n=[],r=[],i;while(i=e.shift())i.toLowerCase().indexOf(this.query.toLowerCase())?~i.indexOf(this.query)?n.push(i):r.push(i):t.push(i);return t.concat(n,r)},highlighter:function(e){var t=this.query.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&");return e.replace(new RegExp("("+t+")","ig"),function(e,t){return"<strong>"+t+"</strong>"})},render:function(t){var n=this;return t=e(t).map(function(t,r){return t=e(n.options.item).attr("data-value",r),t.find("a").html(n.highlighter(r)),t[0]}),t.first().addClass("active"),this.$menu.html(t),this},next:function(t){var n=this.$menu.find(".active").removeClass("active"),r=n.next();r.length||(r=e(this.$menu.find("li")[0])),r.addClass("active")},prev:function(e){var t=this.$menu.find(".active").removeClass("active"),n=t.prev();n.length||(n=this.$menu.find("li").last()),n.addClass("active")},listen:function(){this.$element.on("focus",e.proxy(this.focus,this)).on("blur",e.proxy(this.blur,this)).on("keypress",e.proxy(this.keypress,this)).on("keyup",e.proxy(this.keyup,this)),this.eventSupported("keydown")&&this.$element.on("keydown",e.proxy(this.keydown,this)),this.$menu.on("click",e.proxy(this.click,this)).on("mouseenter","li",e.proxy(this.mouseenter,this)).on("mouseleave","li",e.proxy(this.mouseleave,this))},eventSupported:function(e){var t=e in this.$element;return t||(this.$element.setAttribute(e,"return;"),t=typeof this.$element[e]=="function"),t},move:function(e){if(!this.shown)return;switch(e.keyCode){case 9:case 13:case 27:e.preventDefault();break;case 38:e.preventDefault(),this.prev();break;case 40:e.preventDefault(),this.next()}e.stopPropagation()},keydown:function(t){this.suppressKeyPressRepeat=~e.inArray(t.keyCode,[40,38,9,13,27]),this.move(t)},keypress:function(e){if(this.suppressKeyPressRepeat)return;this.move(e)},keyup:function(e){switch(e.keyCode){case 40:case 38:case 16:case 17:case 18:break;case 9:case 13:if(!this.shown)return;this.select();break;case 27:if(!this.shown)return;this.hide();break;default:this.lookup()}e.stopPropagation(),e.preventDefault()},focus:function(e){this.focused=!0},blur:function(e){this.focused=!1,!this.mousedover&&this.shown&&this.hide()},click:function(e){e.stopPropagation(),e.preventDefault(),this.select(),this.$element.focus()},mouseenter:function(t){this.mousedover=!0,this.$menu.find(".active").removeClass("active"),e(t.currentTarget).addClass("active")},mouseleave:function(e){this.mousedover=!1,!this.focused&&this.shown&&this.hide()}};var n=e.fn.typeahead;e.fn.typeahead=function(n){return this.each(function(){var r=e(this),i=r.data("typeahead"),s=typeof n=="object"&&n;i||r.data("typeahead",i=new t(this,s)),typeof n=="string"&&i[n]()})},e.fn.typeahead.defaults={source:[],items:8,menu:'<ul class="typeahead dropdown-menu"></ul>',item:'<li><a href="#"></a></li>',minLength:1},e.fn.typeahead.Constructor=t,e.fn.typeahead.noConflict=function(){return e.fn.typeahead=n,this},e(document).on("focus.typeahead.data-api",'[data-provide="typeahead"]',function(t){var n=e(this);if(n.data("typeahead"))return;n.typeahead(n.data())})}(window.jQuery),!function(e){"use strict";var t=function(t,n){this.options=e.extend({},e.fn.affix.defaults,n),this.$window=e(window).on("scroll.affix.data-api",e.proxy(this.checkPosition,this)).on("click.affix.data-api",e.proxy(function(){setTimeout(e.proxy(this.checkPosition,this),1)},this)),this.$element=e(t),this.checkPosition()};t.prototype.checkPosition=function(){if(!this.$element.is(":visible"))return;var t=e(document).height(),n=this.$window.scrollTop(),r=this.$element.offset(),i=this.options.offset,s=i.bottom,o=i.top,u="affix affix-top affix-bottom",a;typeof i!="object"&&(s=o=i),typeof o=="function"&&(o=i.top()),typeof s=="function"&&(s=i.bottom()),a=this.unpin!=null&&n+this.unpin<=r.top?!1:s!=null&&r.top+this.$element.height()>=t-s?"bottom":o!=null&&n<=o?"top":!1;if(this.affixed===a)return;this.affixed=a,this.unpin=a=="bottom"?r.top-n:null,this.$element.removeClass(u).addClass("affix"+(a?"-"+a:""))};var n=e.fn.affix;e.fn.affix=function(n){return this.each(function(){var r=e(this),i=r.data("affix"),s=typeof n=="object"&&n;i||r.data("affix",i=new t(this,s)),typeof n=="string"&&i[n]()})},e.fn.affix.Constructor=t,e.fn.affix.defaults={offset:0},e.fn.affix.noConflict=function(){return e.fn.affix=n,this},e(window).on("load",function(){e('[data-spy="affix"]').each(function(){var t=e(this),n=t.data();n.offset=n.offset||{},n.offsetBottom&&(n.offset.bottom=n.offsetBottom),n.offsetTop&&(n.offset.top=n.offsetTop),t.affix(n)})})}(window.jQuery);
</script>

    <script>
/**
 * marked - a markdown parser
 * Copyright (c) 2011-2014, Christopher Jeffrey. (MIT Licensed)
 * https://github.com/chjj/marked
 */
(function(){var block={newline:/^\n+/,code:/^( {4}[^\n]+\n*)+/,fences:noop,hr:/^( *[-*_]){3,} *(?:\n+|$)/,heading:/^ *(#{1,6}) *([^\n]+?) *#* *(?:\n+|$)/,nptable:noop,lheading:/^([^\n]+)\n *(=|-){2,} *(?:\n+|$)/,blockquote:/^( *>[^\n]+(\n(?!def)[^\n]+)*\n*)+/,list:/^( *)(bull) [\s\S]+?(?:hr|def|\n{2,}(?! )(?!\1bull )\n*|\s*$)/,html:/^ *(?:comment *(?:\n|\s*$)|closed *(?:\n{2,}|\s*$)|closing *(?:\n{2,}|\s*$))/,def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +["(]([^\n]+)[")])? *(?:\n+|$)/,table:noop,paragraph:/^((?:[^\n]+\n?(?!hr|heading|lheading|blockquote|tag|def))+)\n*/,text:/^[^\n]+/};block.bullet=/(?:[*+-]|\d+\.)/;block.item=/^( *)(bull) [^\n]*(?:\n(?!\1bull )[^\n]*)*/;block.item=replace(block.item,"gm")(/bull/g,block.bullet)();block.list=replace(block.list)(/bull/g,block.bullet)("hr","\\n+(?=\\1?(?:[-*_] *){3,}(?:\\n+|$))")("def","\\n+(?="+block.def.source+")")();block.blockquote=replace(block.blockquote)("def",block.def)();block._tag="(?!(?:"+"a|em|strong|small|s|cite|q|dfn|abbr|data|time|code"+"|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo"+"|span|br|wbr|ins|del|img)\\b)\\w+(?!:/|[^\\w\\s@]*@)\\b";block.html=replace(block.html)("comment",/<!--[\s\S]*?-->/)("closed",/<(tag)[\s\S]+?<\/\1>/)("closing",/<tag(?:"[^"]*"|'[^']*'|[^'">])*?>/)(/tag/g,block._tag)();block.paragraph=replace(block.paragraph)("hr",block.hr)("heading",block.heading)("lheading",block.lheading)("blockquote",block.blockquote)("tag","<"+block._tag)("def",block.def)();block.normal=merge({},block);block.gfm=merge({},block.normal,{fences:/^ *(`{3,}|~{3,})[ \.]*(\S+)? *\n([\s\S]*?)\s*\1 *(?:\n+|$)/,paragraph:/^/,heading:/^ *(#{1,6}) +([^\n]+?) *#* *(?:\n+|$)/});block.gfm.paragraph=replace(block.paragraph)("(?!","(?!"+block.gfm.fences.source.replace("\\1","\\2")+"|"+block.list.source.replace("\\1","\\3")+"|")();block.tables=merge({},block.gfm,{nptable:/^ *(\S.*\|.*)\n *([-:]+ *\|[-| :]*)\n((?:.*\|.*(?:\n|$))*)\n*/,table:/^ *\|(.+)\n *\|( *[-:]+[-| :]*)\n((?: *\|.*(?:\n|$))*)\n*/});function Lexer(options){this.tokens=[];this.tokens.links={};this.options=options||marked.defaults;this.rules=block.normal;if(this.options.gfm){if(this.options.tables){this.rules=block.tables}else{this.rules=block.gfm}}}Lexer.rules=block;Lexer.lex=function(src,options){var lexer=new Lexer(options);return lexer.lex(src)};Lexer.prototype.lex=function(src){src=src.replace(/\r\n|\r/g,"\n").replace(/\t/g,"    ").replace(/\u00a0/g," ").replace(/\u2424/g,"\n");return this.token(src,true)};Lexer.prototype.token=function(src,top,bq){var src=src.replace(/^ +$/gm,""),next,loose,cap,bull,b,item,space,i,l;while(src){if(cap=this.rules.newline.exec(src)){src=src.substring(cap[0].length);if(cap[0].length>1){this.tokens.push({type:"space"})}}if(cap=this.rules.code.exec(src)){src=src.substring(cap[0].length);cap=cap[0].replace(/^ {4}/gm,"");this.tokens.push({type:"code",text:!this.options.pedantic?cap.replace(/\n+$/,""):cap});continue}if(cap=this.rules.fences.exec(src)){src=src.substring(cap[0].length);this.tokens.push({type:"code",lang:cap[2],text:cap[3]||""});continue}if(cap=this.rules.heading.exec(src)){src=src.substring(cap[0].length);this.tokens.push({type:"heading",depth:cap[1].length,text:cap[2]});continue}if(top&&(cap=this.rules.nptable.exec(src))){src=src.substring(cap[0].length);item={type:"table",header:cap[1].replace(/^ *| *\| *$/g,"").split(/ *\| */),align:cap[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:cap[3].replace(/\n$/,"").split("\n")};for(i=0;i<item.align.length;i++){if(/^ *-+: *$/.test(item.align[i])){item.align[i]="right"}else if(/^ *:-+: *$/.test(item.align[i])){item.align[i]="center"}else if(/^ *:-+ *$/.test(item.align[i])){item.align[i]="left"}else{item.align[i]=null}}for(i=0;i<item.cells.length;i++){item.cells[i]=item.cells[i].split(/ *\| */)}this.tokens.push(item);continue}if(cap=this.rules.lheading.exec(src)){src=src.substring(cap[0].length);this.tokens.push({type:"heading",depth:cap[2]==="="?1:2,text:cap[1]});continue}if(cap=this.rules.hr.exec(src)){src=src.substring(cap[0].length);this.tokens.push({type:"hr"});continue}if(cap=this.rules.blockquote.exec(src)){src=src.substring(cap[0].length);this.tokens.push({type:"blockquote_start"});cap=cap[0].replace(/^ *> ?/gm,"");this.token(cap,top,true);this.tokens.push({type:"blockquote_end"});continue}if(cap=this.rules.list.exec(src)){src=src.substring(cap[0].length);bull=cap[2];this.tokens.push({type:"list_start",ordered:bull.length>1});cap=cap[0].match(this.rules.item);next=false;l=cap.length;i=0;for(;i<l;i++){item=cap[i];space=item.length;item=item.replace(/^ *([*+-]|\d+\.) +/,"");if(~item.indexOf("\n ")){space-=item.length;item=!this.options.pedantic?item.replace(new RegExp("^ {1,"+space+"}","gm"),""):item.replace(/^ {1,4}/gm,"")}if(this.options.smartLists&&i!==l-1){b=block.bullet.exec(cap[i+1])[0];if(bull!==b&&!(bull.length>1&&b.length>1)){src=cap.slice(i+1).join("\n")+src;i=l-1}}loose=next||/\n\n(?!\s*$)/.test(item);if(i!==l-1){next=item.charAt(item.length-1)==="\n";if(!loose)loose=next}this.tokens.push({type:loose?"loose_item_start":"list_item_start"});this.token(item,false,bq);this.tokens.push({type:"list_item_end"})}this.tokens.push({type:"list_end"});continue}if(cap=this.rules.html.exec(src)){src=src.substring(cap[0].length);this.tokens.push({type:this.options.sanitize?"paragraph":"html",pre:!this.options.sanitizer&&(cap[1]==="pre"||cap[1]==="script"||cap[1]==="style"),text:cap[0]});continue}if(!bq&&top&&(cap=this.rules.def.exec(src))){src=src.substring(cap[0].length);this.tokens.links[cap[1].toLowerCase()]={href:cap[2],title:cap[3]};continue}if(top&&(cap=this.rules.table.exec(src))){src=src.substring(cap[0].length);item={type:"table",header:cap[1].replace(/^ *| *\| *$/g,"").split(/ *\| */),align:cap[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:cap[3].replace(/(?: *\| *)?\n$/,"").split("\n")};for(i=0;i<item.align.length;i++){if(/^ *-+: *$/.test(item.align[i])){item.align[i]="right"}else if(/^ *:-+: *$/.test(item.align[i])){item.align[i]="center"}else if(/^ *:-+ *$/.test(item.align[i])){item.align[i]="left"}else{item.align[i]=null}}for(i=0;i<item.cells.length;i++){item.cells[i]=item.cells[i].replace(/^ *\| *| *\| *$/g,"").split(/ *\| */)}this.tokens.push(item);continue}if(top&&(cap=this.rules.paragraph.exec(src))){src=src.substring(cap[0].length);this.tokens.push({type:"paragraph",text:cap[1].charAt(cap[1].length-1)==="\n"?cap[1].slice(0,-1):cap[1]});continue}if(cap=this.rules.text.exec(src)){src=src.substring(cap[0].length);this.tokens.push({type:"text",text:cap[0]});continue}if(src){throw new Error("Infinite loop on byte: "+src.charCodeAt(0))}}return this.tokens};var inline={escape:/^\\([\\`*{}\[\]()#+\-.!_>])/,autolink:/^<([^ >]+(@|:\/)[^ >]+)>/,url:noop,tag:/^<!--[\s\S]*?-->|^<\/?\w+(?:"[^"]*"|'[^']*'|[^'">])*?>/,link:/^!?\[(inside)\]\(href\)/,reflink:/^!?\[(inside)\]\s*\[([^\]]*)\]/,nolink:/^!?\[((?:\[[^\]]*\]|[^\[\]])*)\]/,strong:/^__([\s\S]+?)__(?!_)|^\*\*([\s\S]+?)\*\*(?!\*)/,em:/^\b_((?:[^_]|__)+?)_\b|^\*((?:\*\*|[\s\S])+?)\*(?!\*)/,code:/^(`+)\s*([\s\S]*?[^`])\s*\1(?!`)/,br:/^ {2,}\n(?!\s*$)/,del:noop,text:/^[\s\S]+?(?=[\\<!\[_*`]| {2,}\n|$)/};inline._inside=/(?:\[[^\]]*\]|[^\[\]]|\](?=[^\[]*\]))*/;inline._href=/\s*<?([\s\S]*?)>?(?:\s+['"]([\s\S]*?)['"])?\s*/;inline.link=replace(inline.link)("inside",inline._inside)("href",inline._href)();inline.reflink=replace(inline.reflink)("inside",inline._inside)();inline.normal=merge({},inline);inline.pedantic=merge({},inline.normal,{strong:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,em:/^_(?=\S)([\s\S]*?\S)_(?!_)|^\*(?=\S)([\s\S]*?\S)\*(?!\*)/});inline.gfm=merge({},inline.normal,{escape:replace(inline.escape)("])","~|])")(),url:/^(https?:\/\/[^\s<]+[^<.,:;"')\]\s])/,del:/^~~(?=\S)([\s\S]*?\S)~~/,text:replace(inline.text)("]|","~]|")("|","|https?://|")()});inline.breaks=merge({},inline.gfm,{br:replace(inline.br)("{2,}","*")(),text:replace(inline.gfm.text)("{2,}","*")()});function InlineLexer(links,options){this.options=options||marked.defaults;this.links=links;this.rules=inline.normal;this.renderer=this.options.renderer||new Renderer;this.renderer.options=this.options;if(!this.links){throw new Error("Tokens array requires a `links` property.")}if(this.options.gfm){if(this.options.breaks){this.rules=inline.breaks}else{this.rules=inline.gfm}}else if(this.options.pedantic){this.rules=inline.pedantic}}InlineLexer.rules=inline;InlineLexer.output=function(src,links,options){var inline=new InlineLexer(links,options);return inline.output(src)};InlineLexer.prototype.output=function(src){var out="",link,text,href,cap;while(src){if(cap=this.rules.escape.exec(src)){src=src.substring(cap[0].length);out+=cap[1];continue}if(cap=this.rules.autolink.exec(src)){src=src.substring(cap[0].length);if(cap[2]==="@"){text=cap[1].charAt(6)===":"?this.mangle(cap[1].substring(7)):this.mangle(cap[1]);href=this.mangle("mailto:")+text}else{text=escape(cap[1]);href=text}out+=this.renderer.link(href,null,text);continue}if(!this.inLink&&(cap=this.rules.url.exec(src))){src=src.substring(cap[0].length);text=escape(cap[1]);href=text;out+=this.renderer.link(href,null,text);continue}if(cap=this.rules.tag.exec(src)){if(!this.inLink&&/^<a /i.test(cap[0])){this.inLink=true}else if(this.inLink&&/^<\/a>/i.test(cap[0])){this.inLink=false}src=src.substring(cap[0].length);out+=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(cap[0]):escape(cap[0]):cap[0];continue}if(cap=this.rules.link.exec(src)){src=src.substring(cap[0].length);this.inLink=true;out+=this.outputLink(cap,{href:cap[2],title:cap[3]});this.inLink=false;continue}if((cap=this.rules.reflink.exec(src))||(cap=this.rules.nolink.exec(src))){src=src.substring(cap[0].length);link=(cap[2]||cap[1]).replace(/\s+/g," ");link=this.links[link.toLowerCase()];if(!link||!link.href){out+=cap[0].charAt(0);src=cap[0].substring(1)+src;continue}this.inLink=true;out+=this.outputLink(cap,link);this.inLink=false;continue}if(cap=this.rules.strong.exec(src)){src=src.substring(cap[0].length);out+=this.renderer.strong(this.output(cap[2]||cap[1]));continue}if(cap=this.rules.em.exec(src)){src=src.substring(cap[0].length);out+=this.renderer.em(this.output(cap[2]||cap[1]));continue}if(cap=this.rules.code.exec(src)){src=src.substring(cap[0].length);out+=this.renderer.codespan(escape(cap[2],true));continue}if(cap=this.rules.br.exec(src)){src=src.substring(cap[0].length);out+=this.renderer.br();continue}if(cap=this.rules.del.exec(src)){src=src.substring(cap[0].length);out+=this.renderer.del(this.output(cap[1]));continue}if(cap=this.rules.text.exec(src)){src=src.substring(cap[0].length);out+=this.renderer.text(escape(this.smartypants(cap[0])));continue}if(src){throw new Error("Infinite loop on byte: "+src.charCodeAt(0))}}return out};InlineLexer.prototype.outputLink=function(cap,link){var href=escape(link.href),title=link.title?escape(link.title):null;return cap[0].charAt(0)!=="!"?this.renderer.link(href,title,this.output(cap[1])):this.renderer.image(href,title,escape(cap[1]))};InlineLexer.prototype.smartypants=function(text){if(!this.options.smartypants)return text;return text.replace(/---/g,"—").replace(/--/g,"–").replace(/(^|[-\u2014/(\[{"\s])'/g,"$1‘").replace(/'/g,"’").replace(/(^|[-\u2014/(\[{\u2018\s])"/g,"$1“").replace(/"/g,"”").replace(/\.{3}/g,"…")};InlineLexer.prototype.mangle=function(text){if(!this.options.mangle)return text;var out="",l=text.length,i=0,ch;for(;i<l;i++){ch=text.charCodeAt(i);if(Math.random()>.5){ch="x"+ch.toString(16)}out+="&#"+ch+";"}return out};function Renderer(options){this.options=options||{}}Renderer.prototype.code=function(code,lang,escaped){if(this.options.highlight){var out=this.options.highlight(code,lang);if(out!=null&&out!==code){escaped=true;code=out}}if(!lang){return"<pre><code>"+(escaped?code:escape(code,true))+"\n</code></pre>"}return'<pre><code class="'+this.options.langPrefix+escape(lang,true)+'">'+(escaped?code:escape(code,true))+"\n</code></pre>\n"};Renderer.prototype.blockquote=function(quote){return"<blockquote>\n"+quote+"</blockquote>\n"};Renderer.prototype.html=function(html){return html};Renderer.prototype.heading=function(text,level,raw){return"<h"+level+' id="'+this.options.headerPrefix+raw.toLowerCase().replace(/[^\w]+/g,"-")+'">'+text+"</h"+level+">\n"};Renderer.prototype.hr=function(){return this.options.xhtml?"<hr/>\n":"<hr>\n"};Renderer.prototype.list=function(body,ordered){var type=ordered?"ol":"ul";return"<"+type+">\n"+body+"</"+type+">\n"};Renderer.prototype.listitem=function(text){return"<li>"+text+"</li>\n"};Renderer.prototype.paragraph=function(text){return"<p>"+text+"</p>\n"};Renderer.prototype.table=function(header,body){return"<table>\n"+"<thead>\n"+header+"</thead>\n"+"<tbody>\n"+body+"</tbody>\n"+"</table>\n"};Renderer.prototype.tablerow=function(content){return"<tr>\n"+content+"</tr>\n"};Renderer.prototype.tablecell=function(content,flags){var type=flags.header?"th":"td";var tag=flags.align?"<"+type+' style="text-align:'+flags.align+'">':"<"+type+">";return tag+content+"</"+type+">\n"};Renderer.prototype.strong=function(text){return"<strong>"+text+"</strong>"};Renderer.prototype.em=function(text){return"<em>"+text+"</em>"};Renderer.prototype.codespan=function(text){return"<code>"+text+"</code>"};Renderer.prototype.br=function(){return this.options.xhtml?"<br/>":"<br>"};Renderer.prototype.del=function(text){return"<del>"+text+"</del>"};Renderer.prototype.link=function(href,title,text){if(this.options.sanitize){try{var prot=decodeURIComponent(unescape(href)).replace(/[^\w:]/g,"").toLowerCase()}catch(e){return""}if(prot.indexOf("javascript:")===0||prot.indexOf("vbscript:")===0){return""}}var out='<a href="'+href+'"';if(title){out+=' title="'+title+'"'}out+=">"+text+"</a>";return out};Renderer.prototype.image=function(href,title,text){var out='<img src="'+href+'" alt="'+text+'"';if(title){out+=' title="'+title+'"'}out+=this.options.xhtml?"/>":">";return out};Renderer.prototype.text=function(text){return text};function Parser(options){this.tokens=[];this.token=null;this.options=options||marked.defaults;this.options.renderer=this.options.renderer||new Renderer;this.renderer=this.options.renderer;this.renderer.options=this.options}Parser.parse=function(src,options,renderer){var parser=new Parser(options,renderer);return parser.parse(src)};Parser.prototype.parse=function(src){this.inline=new InlineLexer(src.links,this.options,this.renderer);this.tokens=src.reverse();var out="";while(this.next()){out+=this.tok()}return out};Parser.prototype.next=function(){return this.token=this.tokens.pop()};Parser.prototype.peek=function(){return this.tokens[this.tokens.length-1]||0};Parser.prototype.parseText=function(){var body=this.token.text;while(this.peek().type==="text"){body+="\n"+this.next().text}return this.inline.output(body)};Parser.prototype.tok=function(){switch(this.token.type){case"space":{return""}case"hr":{return this.renderer.hr()}case"heading":{return this.renderer.heading(this.inline.output(this.token.text),this.token.depth,this.token.text)}case"code":{return this.renderer.code(this.token.text,this.token.lang,this.token.escaped)}case"table":{var header="",body="",i,row,cell,flags,j;cell="";for(i=0;i<this.token.header.length;i++){flags={header:true,align:this.token.align[i]};cell+=this.renderer.tablecell(this.inline.output(this.token.header[i]),{header:true,align:this.token.align[i]})}header+=this.renderer.tablerow(cell);for(i=0;i<this.token.cells.length;i++){row=this.token.cells[i];cell="";for(j=0;j<row.length;j++){cell+=this.renderer.tablecell(this.inline.output(row[j]),{header:false,align:this.token.align[j]})}body+=this.renderer.tablerow(cell)}return this.renderer.table(header,body)}case"blockquote_start":{var body="";while(this.next().type!=="blockquote_end"){body+=this.tok()}return this.renderer.blockquote(body)}case"list_start":{var body="",ordered=this.token.ordered;while(this.next().type!=="list_end"){body+=this.tok()}return this.renderer.list(body,ordered)}case"list_item_start":{var body="";while(this.next().type!=="list_item_end"){body+=this.token.type==="text"?this.parseText():this.tok()}return this.renderer.listitem(body)}case"loose_item_start":{var body="";while(this.next().type!=="list_item_end"){body+=this.tok()}return this.renderer.listitem(body)}case"html":{var html=!this.token.pre&&!this.options.pedantic?this.inline.output(this.token.text):this.token.text;return this.renderer.html(html)}case"paragraph":{return this.renderer.paragraph(this.inline.output(this.token.text))}case"text":{return this.renderer.paragraph(this.parseText())}}};function escape(html,encode){return html.replace(!encode?/&(?!#?\w+;)/g:/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;")}function unescape(html){return html.replace(/&([#\w]+);/g,function(_,n){n=n.toLowerCase();if(n==="colon")return":";if(n.charAt(0)==="#"){return n.charAt(1)==="x"?String.fromCharCode(parseInt(n.substring(2),16)):String.fromCharCode(+n.substring(1))}return""})}function replace(regex,opt){regex=regex.source;opt=opt||"";return function self(name,val){if(!name)return new RegExp(regex,opt);val=val.source||val;val=val.replace(/(^|[^\[])\^/g,"$1");regex=regex.replace(name,val);return self}}function noop(){}noop.exec=noop;function merge(obj){var i=1,target,key;for(;i<arguments.length;i++){target=arguments[i];for(key in target){if(Object.prototype.hasOwnProperty.call(target,key)){obj[key]=target[key]}}}return obj}function marked(src,opt,callback){if(callback||typeof opt==="function"){if(!callback){callback=opt;opt=null}opt=merge({},marked.defaults,opt||{});var highlight=opt.highlight,tokens,pending,i=0;try{tokens=Lexer.lex(src,opt)}catch(e){return callback(e)}pending=tokens.length;var done=function(err){if(err){opt.highlight=highlight;return callback(err)}var out;try{out=Parser.parse(tokens,opt)}catch(e){err=e}opt.highlight=highlight;return err?callback(err):callback(null,out)};if(!highlight||highlight.length<3){return done()}delete opt.highlight;if(!pending)return done();for(;i<tokens.length;i++){(function(token){if(token.type!=="code"){return--pending||done()}return highlight(token.text,token.lang,function(err,code){if(err)return done(err);if(code==null||code===token.text){return--pending||done()}token.text=code;token.escaped=true;--pending||done()})})(tokens[i])}return}try{if(opt)opt=merge({},marked.defaults,opt);return Parser.parse(Lexer.lex(src,opt),opt)}catch(e){e.message+="\nPlease report this to https://github.com/chjj/marked.";if((opt||marked.defaults).silent){return"<p>An error occurred:</p><pre>"+escape(e.message+"",true)+"</pre>"}throw e}}marked.options=marked.setOptions=function(opt){merge(marked.defaults,opt);return marked};marked.defaults={gfm:true,tables:true,breaks:false,pedantic:false,sanitize:false,sanitizer:null,mangle:true,smartLists:false,silent:false,highlight:null,langPrefix:"lang-",smartypants:false,headerPrefix:"",renderer:new Renderer,xhtml:false};marked.Parser=Parser;marked.parser=Parser.parse;marked.Renderer=Renderer;marked.Lexer=Lexer;marked.lexer=Lexer.lex;marked.InlineLexer=InlineLexer;marked.inlineLexer=InlineLexer.output;marked.parse=marked;if(typeof module!=="undefined"&&typeof exports==="object"){module.exports=marked}else if(typeof define==="function"&&define.amd){define(function(){return marked})}else{this.marked=marked}}).call(function(){return this||(typeof window!=="undefined"?window:global)}());
</script>

    <script>
    $( document ).ready(function() {
      marked.setOptions({
        renderer: new marked.Renderer(),
        gfm: true,
        tables: true,
        breaks: false,
        pedantic: false,
        sanitize: false,
        smartLists: true,
        smartypants: false
      });

      var textFile = null;

      /// Function to be used to download a text json schema
      function makeTextFile(text) {

        var data = new Blob([text], {type: 'text/plain'});

        // If we are replacing a previously generated file we need to
        // manually revoke the object URL to avoid memory leaks.
        if (textFile !== null) {
          window.URL.revokeObjectURL(textFile);
        }

        textFile = window.URL.createObjectURL(data);

        var a = document.createElement("a");
        document.body.appendChild(a);
        a.style = "display: none";
        a.href = textFile;
        a.download = 'schema.txt';
        a.click();

        return textFile;
      };

      /// TODO: Implement resizing for expanding within iframe
      function callResize() {
        window.parent.postMessage('resize', "*");
      }

      function processMarked() {
        $(".marked").each(function() {
          $(this).html(marked($(this).html()));
        });
      }

      // Bootstrap Scrollspy
      $(this).scrollspy({ target: '#scrollingNav', offset: 18 });

      // Content-Scroll on Navigation click.
      $('.sidenav').find('a').on('click', function(e) {
          e.preventDefault();
          var id = $(this).attr('href');
          if ($(id).length > 0)
              $('html,body').animate({ scrollTop: parseInt($(id).offset().top) }, 400);
          window.location.hash = $(this).attr('href');
      });

      // Quickjump on Pageload to hash position.
      if(window.location.hash) {
          var id = window.location.hash;
          if ($(id).length > 0)
              $('html,body').animate({ scrollTop: parseInt($(id).offset().top) }, 0);
      }


      function initDynamic() {
        // tabs
        $('.nav-tabs-examples a').click(function (e) {
            e.preventDefault();
            $(this).tab('show');
        });


        $('.nav-tabs-examples').find('a:first').tab('show');

        // call scrollspy refresh method
        $(window).scrollspy('refresh');
      }

      initDynamic();

      // Pre- / Code-Format
      prettyPrint();

      //Convert elements with "marked" class to markdown
      processMarked();
    });
  </script>
    <style type="text/css">

/*!
 * Bootstrap v2.3.2
 *
 * Copyright 2013 Twitter, Inc
 * Licensed under the Apache License v2.0
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Designed and built with all the love in the world by @mdo and @fat.
 */.clearfix{*zoom:1}.clearfix:before,.clearfix:after{display:table;line-height:0;content:""}.clearfix:after{clear:both}.hide-text{font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0}.input-block-level{display:block;width:100%;min-height:30px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}article,aside,details,figcaption,figure,footer,header,hgroup,nav,section{display:block}audio,canvas,video{display:inline-block;*display:inline;*zoom:1}audio:not([controls]){display:none}html{font-size:100%;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%}a:focus{outline:thin dotted #333;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}a:hover,a:active{outline:0}sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline}sup{top:-0.5em}sub{bottom:-0.25em}img{width:auto\9;height:auto;max-width:100%;vertical-align:middle;border:0;-ms-interpolation-mode:bicubic}#map_canvas img,.google-maps img{max-width:none}button,input,select,textarea{margin:0;font-size:100%;vertical-align:middle}button,input{*overflow:visible;line-height:normal}button::-moz-focus-inner,input::-moz-focus-inner{padding:0;border:0}button,html input[type="button"],input[type="reset"],input[type="submit"]{cursor:pointer;-webkit-appearance:button}label,select,button,input[type="button"],input[type="reset"],input[type="submit"],input[type="radio"],input[type="checkbox"]{cursor:pointer}input[type="search"]{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;-webkit-appearance:textfield}input[type="search"]::-webkit-search-decoration,input[type="search"]::-webkit-search-cancel-button{-webkit-appearance:none}textarea{overflow:auto;vertical-align:top}@media print{*{color:#000!important;text-shadow:none!important;background:transparent!important;box-shadow:none!important}a,a:visited{text-decoration:underline}a[href]:after{content:" (" attr(href) ")"}abbr[title]:after{content:" (" attr(title) ")"}.ir a:after,a[href^="javascript:"]:after,a[href^="#"]:after{content:""}pre,blockquote{border:1px solid #999;page-break-inside:avoid}thead{display:table-header-group}tr,img{page-break-inside:avoid}img{max-width:100%!important}@page{margin:.5cm}p,h2,h3{orphans:3;widows:3}h2,h3{page-break-after:avoid}}body{margin:0;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:14px;line-height:20px;color:#333;background-color:#fff}a{color:#08c;text-decoration:none}a:hover,a:focus{color:#005580;text-decoration:underline}.img-rounded{-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px}.img-polaroid{padding:4px;background-color:#fff;border:1px solid #ccc;border:1px solid rgba(0,0,0,0.2);-webkit-box-shadow:0 1px 3px rgba(0,0,0,0.1);-moz-box-shadow:0 1px 3px rgba(0,0,0,0.1);box-shadow:0 1px 3px rgba(0,0,0,0.1)}.img-circle{-webkit-border-radius:500px;-moz-border-radius:500px;border-radius:500px}.row{margin-left:-20px;*zoom:1}.row:before,.row:after{display:table;line-height:0;content:""}.row:after{clear:both}[class*="span"]{float:left;min-height:1px;margin-left:20px}.container,.navbar-static-top .container,.navbar-fixed-top .container,.navbar-fixed-bottom .container{width:940px}.span12{width:940px}.span11{width:860px}.span10{width:780px}.span9{width:700px}.span8{width:620px}.span7{width:540px}.span6{width:460px}.span5{width:380px}.span4{width:300px}.span3{width:220px}.span2{width:140px}.span1{width:60px}.offset12{margin-left:980px}.offset11{margin-left:900px}.offset10{margin-left:820px}.offset9{margin-left:740px}.offset8{margin-left:660px}.offset7{margin-left:580px}.offset6{margin-left:500px}.offset5{margin-left:420px}.offset4{margin-left:340px}.offset3{margin-left:260px}.offset2{margin-left:180px}.offset1{margin-left:100px}.row-fluid{width:100%;*zoom:1}.row-fluid:before,.row-fluid:after{display:table;line-height:0;content:""}.row-fluid:after{clear:both}.row-fluid [class*="span"]{display:block;float:left;width:100%;min-height:30px;margin-left:2.127659574468085%;*margin-left:2.074468085106383%;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.row-fluid [class*="span"]:first-child{margin-left:0}.row-fluid .controls-row [class*="span"]+[class*="span"]{margin-left:2.127659574468085%}.row-fluid .span12{width:100%;*width:99.94680851063829%}.row-fluid .span11{width:91.48936170212765%;*width:91.43617021276594%}.row-fluid .span10{width:82.97872340425532%;*width:82.92553191489361%}.row-fluid .span9{width:74.46808510638297%;*width:74.41489361702126%}.row-fluid .span8{width:65.95744680851064%;*width:65.90425531914893%}.row-fluid .span7{width:57.44680851063829%;*width:57.39361702127659%}.row-fluid .span6{width:48.93617021276595%;*width:48.88297872340425%}.row-fluid .span5{width:40.42553191489362%;*width:40.37234042553192%}.row-fluid .span4{width:31.914893617021278%;*width:31.861702127659576%}.row-fluid .span3{width:23.404255319148934%;*width:23.351063829787233%}.row-fluid .span2{width:14.893617021276595%;*width:14.840425531914894%}.row-fluid .span1{width:6.382978723404255%;*width:6.329787234042553%}.row-fluid .offset12{margin-left:104.25531914893617%;*margin-left:104.14893617021275%}.row-fluid .offset12:first-child{margin-left:102.12765957446808%;*margin-left:102.02127659574467%}.row-fluid .offset11{margin-left:95.74468085106382%;*margin-left:95.6382978723404%}.row-fluid .offset11:first-child{margin-left:93.61702127659574%;*margin-left:93.51063829787232%}.row-fluid .offset10{margin-left:87.23404255319149%;*margin-left:87.12765957446807%}.row-fluid .offset10:first-child{margin-left:85.1063829787234%;*margin-left:84.99999999999999%}.row-fluid .offset9{margin-left:78.72340425531914%;*margin-left:78.61702127659572%}.row-fluid .offset9:first-child{margin-left:76.59574468085106%;*margin-left:76.48936170212764%}.row-fluid .offset8{margin-left:70.2127659574468%;*margin-left:70.10638297872339%}.row-fluid .offset8:first-child{margin-left:68.08510638297872%;*margin-left:67.9787234042553%}.row-fluid .offset7{margin-left:61.70212765957446%;*margin-left:61.59574468085106%}.row-fluid .offset7:first-child{margin-left:59.574468085106375%;*margin-left:59.46808510638297%}.row-fluid .offset6{margin-left:53.191489361702125%;*margin-left:53.085106382978715%}.row-fluid .offset6:first-child{margin-left:51.063829787234035%;*margin-left:50.95744680851063%}.row-fluid .offset5{margin-left:44.68085106382979%;*margin-left:44.57446808510638%}.row-fluid .offset5:first-child{margin-left:42.5531914893617%;*margin-left:42.4468085106383%}.row-fluid .offset4{margin-left:36.170212765957444%;*margin-left:36.06382978723405%}.row-fluid .offset4:first-child{margin-left:34.04255319148936%;*margin-left:33.93617021276596%}.row-fluid .offset3{margin-left:27.659574468085104%;*margin-left:27.5531914893617%}.row-fluid .offset3:first-child{margin-left:25.53191489361702%;*margin-left:25.425531914893618%}.row-fluid .offset2{margin-left:19.148936170212764%;*margin-left:19.04255319148936%}.row-fluid .offset2:first-child{margin-left:17.02127659574468%;*margin-left:16.914893617021278%}.row-fluid .offset1{margin-left:10.638297872340425%;*margin-left:10.53191489361702%}.row-fluid .offset1:first-child{margin-left:8.51063829787234%;*margin-left:8.404255319148938%}[class*="span"].hide,.row-fluid [class*="span"].hide{display:none}[class*="span"].pull-right,.row-fluid [class*="span"].pull-right{float:right}.container{margin-right:auto;margin-left:auto;*zoom:1}.container:before,.container:after{display:table;line-height:0;content:""}.container:after{clear:both}.container-fluid{padding-right:20px;padding-left:20px;*zoom:1}.container-fluid:before,.container-fluid:after{display:table;line-height:0;content:""}.container-fluid:after{clear:both}p{margin:0 0 10px}.lead{margin-bottom:20px;font-size:21px;font-weight:200;line-height:30px}small{font-size:85%}strong{font-weight:bold}em{font-style:italic}cite{font-style:normal}.muted{color:#999}a.muted:hover,a.muted:focus{color:#808080}.text-warning{color:#c09853}a.text-warning:hover,a.text-warning:focus{color:#a47e3c}.text-error{color:#b94a48}a.text-error:hover,a.text-error:focus{color:#953b39}.text-info{color:#3a87ad}a.text-info:hover,a.text-info:focus{color:#2d6987}.text-success{color:#468847}a.text-success:hover,a.text-success:focus{color:#356635}.text-left{text-align:left}.text-right{text-align:right}.text-center{text-align:center}h1,h2,h3,h4,h5,h6{margin:10px 0;font-family:inherit;font-weight:bold;line-height:20px;color:inherit;text-rendering:optimizelegibility}h1 small,h2 small,h3 small,h4 small,h5 small,h6 small{font-weight:normal;line-height:1;color:#999}h1,h2,h3{line-height:40px}h1{font-size:38.5px}h2{font-size:31.5px}h3{font-size:24.5px}h4{font-size:17.5px}h5{font-size:14px}h6{font-size:11.9px}h1 small{font-size:24.5px}h2 small{font-size:17.5px}h3 small{font-size:14px}h4 small{font-size:14px}.page-header{padding-bottom:9px;margin:20px 0 30px;border-bottom:1px solid #eee}ul,ol{padding:0;margin:0 0 10px 25px}ul ul,ul ol,ol ol,ol ul{margin-bottom:0}li{line-height:20px}ul.unstyled,ol.unstyled{margin-left:0;list-style:none}ul.inline,ol.inline{margin-left:0;list-style:none}ul.inline>li,ol.inline>li{display:inline-block;*display:inline;padding-right:5px;padding-left:5px;*zoom:1}dl{margin-bottom:20px}dt,dd{line-height:20px}dt{font-weight:bold}dd{margin-left:10px}.dl-horizontal{*zoom:1}.dl-horizontal:before,.dl-horizontal:after{display:table;line-height:0;content:""}.dl-horizontal:after{clear:both}.dl-horizontal dt{float:left;width:160px;overflow:hidden;clear:left;text-align:right;text-overflow:ellipsis;white-space:nowrap}.dl-horizontal dd{margin-left:180px}hr{margin:20px 0;border:0;border-top:1px solid #eee;border-bottom:1px solid #fff}abbr[title],abbr[data-original-title]{cursor:help;border-bottom:1px dotted #999}abbr.initialism{font-size:90%;text-transform:uppercase}blockquote{padding:0 0 0 15px;margin:0 0 20px;border-left:5px solid #eee}blockquote p{margin-bottom:0;font-size:17.5px;font-weight:300;line-height:1.25}blockquote small{display:block;line-height:20px;color:#999}blockquote small:before{content:'\2014 \00A0'}blockquote.pull-right{float:right;padding-right:15px;padding-left:0;border-right:5px solid #eee;border-left:0}blockquote.pull-right p,blockquote.pull-right small{text-align:right}blockquote.pull-right small:before{content:''}blockquote.pull-right small:after{content:'\00A0 \2014'}q:before,q:after,blockquote:before,blockquote:after{content:""}address{display:block;margin-bottom:20px;font-style:normal;line-height:20px}code,pre{padding:0 3px 2px;font-family:Monaco,Menlo,Consolas,"Courier New",monospace;font-size:12px;color:#333;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}code{padding:2px 4px;color:#d14;white-space:nowrap;background-color:#f7f7f9;border:1px solid #e1e1e8}pre{display:block;padding:9.5px;margin:0 0 10px;font-size:13px;line-height:20px;word-break:break-all;word-wrap:break-word;white-space:pre;white-space:pre-wrap;background-color:#f5f5f5;border:1px solid #ccc;border:1px solid rgba(0,0,0,0.15);-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}pre.prettyprint{margin-bottom:20px}pre code{padding:0;color:inherit;white-space:pre;white-space:pre-wrap;background-color:transparent;border:0}.pre-scrollable{max-height:340px;overflow-y:scroll}form{margin:0 0 20px}fieldset{padding:0;margin:0;border:0}legend{display:block;width:100%;padding:0;margin-bottom:20px;font-size:21px;line-height:40px;color:#333;border:0;border-bottom:1px solid #e5e5e5}legend small{font-size:15px;color:#999}label,input,button,select,textarea{font-size:14px;font-weight:normal;line-height:20px}input,button,select,textarea{font-family:"Helvetica Neue",Helvetica,Arial,sans-serif}label{display:block;margin-bottom:5px}select,textarea,input[type="text"],input[type="password"],input[type="datetime"],input[type="datetime-local"],input[type="date"],input[type="month"],input[type="time"],input[type="week"],input[type="number"],input[type="email"],input[type="url"],input[type="search"],input[type="tel"],input[type="color"],.uneditable-input{display:inline-block;height:20px;padding:4px 6px;margin-bottom:10px;font-size:14px;line-height:20px;color:#555;vertical-align:middle;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}input,textarea,.uneditable-input{width:206px}textarea{height:auto}textarea,input[type="text"],input[type="password"],input[type="datetime"],input[type="datetime-local"],input[type="date"],input[type="month"],input[type="time"],input[type="week"],input[type="number"],input[type="email"],input[type="url"],input[type="search"],input[type="tel"],input[type="color"],.uneditable-input{background-color:#fff;border:1px solid #ccc;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);-webkit-transition:border linear .2s,box-shadow linear .2s;-moz-transition:border linear .2s,box-shadow linear .2s;-o-transition:border linear .2s,box-shadow linear .2s;transition:border linear .2s,box-shadow linear .2s}textarea:focus,input[type="text"]:focus,input[type="password"]:focus,input[type="datetime"]:focus,input[type="datetime-local"]:focus,input[type="date"]:focus,input[type="month"]:focus,input[type="time"]:focus,input[type="week"]:focus,input[type="number"]:focus,input[type="email"]:focus,input[type="url"]:focus,input[type="search"]:focus,input[type="tel"]:focus,input[type="color"]:focus,.uneditable-input:focus{border-color:rgba(82,168,236,0.8);outline:0;outline:thin dotted \9;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 8px rgba(82,168,236,0.6);-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 8px rgba(82,168,236,0.6);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 8px rgba(82,168,236,0.6)}input[type="radio"],input[type="checkbox"]{margin:4px 0 0;margin-top:1px \9;*margin-top:0;line-height:normal}input[type="file"],input[type="image"],input[type="submit"],input[type="reset"],input[type="button"],input[type="radio"],input[type="checkbox"]{width:auto}select,input[type="file"]{height:30px;*margin-top:4px;line-height:30px}select{width:220px;background-color:#fff;border:1px solid #ccc}select[multiple],select[size]{height:auto}select:focus,input[type="file"]:focus,input[type="radio"]:focus,input[type="checkbox"]:focus{outline:thin dotted #333;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}.uneditable-input,.uneditable-textarea{color:#999;cursor:not-allowed;background-color:#fcfcfc;border-color:#ccc;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,0.025);-moz-box-shadow:inset 0 1px 2px rgba(0,0,0,0.025);box-shadow:inset 0 1px 2px rgba(0,0,0,0.025)}.uneditable-input{overflow:hidden;white-space:nowrap}.uneditable-textarea{width:auto;height:auto}input:-moz-placeholder,textarea:-moz-placeholder{color:#999}input:-ms-input-placeholder,textarea:-ms-input-placeholder{color:#999}input::-webkit-input-placeholder,textarea::-webkit-input-placeholder{color:#999}.radio,.checkbox{min-height:20px;padding-left:20px}.radio input[type="radio"],.checkbox input[type="checkbox"]{float:left;margin-left:-20px}.controls>.radio:first-child,.controls>.checkbox:first-child{padding-top:5px}.radio.inline,.checkbox.inline{display:inline-block;padding-top:5px;margin-bottom:0;vertical-align:middle}.radio.inline+.radio.inline,.checkbox.inline+.checkbox.inline{margin-left:10px}.input-mini{width:60px}.input-small{width:90px}.input-medium{width:150px}.input-large{width:210px}.input-xlarge{width:270px}.input-xxlarge{width:530px}input[class*="span"],select[class*="span"],textarea[class*="span"],.uneditable-input[class*="span"],.row-fluid input[class*="span"],.row-fluid select[class*="span"],.row-fluid textarea[class*="span"],.row-fluid .uneditable-input[class*="span"]{float:none;margin-left:0}.input-append input[class*="span"],.input-append .uneditable-input[class*="span"],.input-prepend input[class*="span"],.input-prepend .uneditable-input[class*="span"],.row-fluid input[class*="span"],.row-fluid select[class*="span"],.row-fluid textarea[class*="span"],.row-fluid .uneditable-input[class*="span"],.row-fluid .input-prepend [class*="span"],.row-fluid .input-append [class*="span"]{display:inline-block}input,textarea,.uneditable-input{margin-left:0}.controls-row [class*="span"]+[class*="span"]{margin-left:20px}input.span12,textarea.span12,.uneditable-input.span12{width:926px}input.span11,textarea.span11,.uneditable-input.span11{width:846px}input.span10,textarea.span10,.uneditable-input.span10{width:766px}input.span9,textarea.span9,.uneditable-input.span9{width:686px}input.span8,textarea.span8,.uneditable-input.span8{width:606px}input.span7,textarea.span7,.uneditable-input.span7{width:526px}input.span6,textarea.span6,.uneditable-input.span6{width:446px}input.span5,textarea.span5,.uneditable-input.span5{width:366px}input.span4,textarea.span4,.uneditable-input.span4{width:286px}input.span3,textarea.span3,.uneditable-input.span3{width:206px}input.span2,textarea.span2,.uneditable-input.span2{width:126px}input.span1,textarea.span1,.uneditable-input.span1{width:46px}.controls-row{*zoom:1}.controls-row:before,.controls-row:after{display:table;line-height:0;content:""}.controls-row:after{clear:both}.controls-row [class*="span"],.row-fluid .controls-row [class*="span"]{float:left}.controls-row .checkbox[class*="span"],.controls-row .radio[class*="span"]{padding-top:5px}input[disabled],select[disabled],textarea[disabled],input[readonly],select[readonly],textarea[readonly]{cursor:not-allowed;background-color:#eee}input[type="radio"][disabled],input[type="checkbox"][disabled],input[type="radio"][readonly],input[type="checkbox"][readonly]{background-color:transparent}.control-group.warning .control-label,.control-group.warning .help-block,.control-group.warning .help-inline{color:#c09853}.control-group.warning .checkbox,.control-group.warning .radio,.control-group.warning input,.control-group.warning select,.control-group.warning textarea{color:#c09853}.control-group.warning input,.control-group.warning select,.control-group.warning textarea{border-color:#c09853;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075)}.control-group.warning input:focus,.control-group.warning select:focus,.control-group.warning textarea:focus{border-color:#a47e3c;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #dbc59e;-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #dbc59e;box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #dbc59e}.control-group.warning .input-prepend .add-on,.control-group.warning .input-append .add-on{color:#c09853;background-color:#fcf8e3;border-color:#c09853}.control-group.error .control-label,.control-group.error .help-block,.control-group.error .help-inline{color:#b94a48}.control-group.error .checkbox,.control-group.error .radio,.control-group.error input,.control-group.error select,.control-group.error textarea{color:#b94a48}.control-group.error input,.control-group.error select,.control-group.error textarea{border-color:#b94a48;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075)}.control-group.error input:focus,.control-group.error select:focus,.control-group.error textarea:focus{border-color:#953b39;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #d59392;-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #d59392;box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #d59392}.control-group.error .input-prepend .add-on,.control-group.error .input-append .add-on{color:#b94a48;background-color:#f2dede;border-color:#b94a48}.control-group.success .control-label,.control-group.success .help-block,.control-group.success .help-inline{color:#468847}.control-group.success .checkbox,.control-group.success .radio,.control-group.success input,.control-group.success select,.control-group.success textarea{color:#468847}.control-group.success input,.control-group.success select,.control-group.success textarea{border-color:#468847;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075)}.control-group.success input:focus,.control-group.success select:focus,.control-group.success textarea:focus{border-color:#356635;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #7aba7b;-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #7aba7b;box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #7aba7b}.control-group.success .input-prepend .add-on,.control-group.success .input-append .add-on{color:#468847;background-color:#dff0d8;border-color:#468847}.control-group.info .control-label,.control-group.info .help-block,.control-group.info .help-inline{color:#3a87ad}.control-group.info .checkbox,.control-group.info .radio,.control-group.info input,.control-group.info select,.control-group.info textarea{color:#3a87ad}.control-group.info input,.control-group.info select,.control-group.info textarea{border-color:#3a87ad;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075)}.control-group.info input:focus,.control-group.info select:focus,.control-group.info textarea:focus{border-color:#2d6987;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #7ab5d3;-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #7ab5d3;box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #7ab5d3}.control-group.info .input-prepend .add-on,.control-group.info .input-append .add-on{color:#3a87ad;background-color:#d9edf7;border-color:#3a87ad}input:focus:invalid,textarea:focus:invalid,select:focus:invalid{color:#b94a48;border-color:#ee5f5b}input:focus:invalid:focus,textarea:focus:invalid:focus,select:focus:invalid:focus{border-color:#e9322d;-webkit-box-shadow:0 0 6px #f8b9b7;-moz-box-shadow:0 0 6px #f8b9b7;box-shadow:0 0 6px #f8b9b7}.form-actions{padding:19px 20px 20px;margin-top:20px;margin-bottom:20px;background-color:#f5f5f5;border-top:1px solid #e5e5e5;*zoom:1}.form-actions:before,.form-actions:after{display:table;line-height:0;content:""}.form-actions:after{clear:both}.help-block,.help-inline{color:#595959}.help-block{display:block;margin-bottom:10px}.help-inline{display:inline-block;*display:inline;padding-left:5px;vertical-align:middle;*zoom:1}.input-append,.input-prepend{display:inline-block;margin-bottom:10px;font-size:0;white-space:nowrap;vertical-align:middle}.input-append input,.input-prepend input,.input-append select,.input-prepend select,.input-append .uneditable-input,.input-prepend .uneditable-input,.input-append .dropdown-menu,.input-prepend .dropdown-menu,.input-append .popover,.input-prepend .popover{font-size:14px}.input-append input,.input-prepend input,.input-append select,.input-prepend select,.input-append .uneditable-input,.input-prepend .uneditable-input{position:relative;margin-bottom:0;*margin-left:0;vertical-align:top;-webkit-border-radius:0 4px 4px 0;-moz-border-radius:0 4px 4px 0;border-radius:0 4px 4px 0}.input-append input:focus,.input-prepend input:focus,.input-append select:focus,.input-prepend select:focus,.input-append .uneditable-input:focus,.input-prepend .uneditable-input:focus{z-index:2}.input-append .add-on,.input-prepend .add-on{display:inline-block;width:auto;height:20px;min-width:16px;padding:4px 5px;font-size:14px;font-weight:normal;line-height:20px;text-align:center;text-shadow:0 1px 0 #fff;background-color:#eee;border:1px solid #ccc}.input-append .add-on,.input-prepend .add-on,.input-append .btn,.input-prepend .btn,.input-append .btn-group>.dropdown-toggle,.input-prepend .btn-group>.dropdown-toggle{vertical-align:top;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.input-append .active,.input-prepend .active{background-color:#a9dba9;border-color:#46a546}.input-prepend .add-on,.input-prepend .btn{margin-right:-1px}.input-prepend .add-on:first-child,.input-prepend .btn:first-child{-webkit-border-radius:4px 0 0 4px;-moz-border-radius:4px 0 0 4px;border-radius:4px 0 0 4px}.input-append input,.input-append select,.input-append .uneditable-input{-webkit-border-radius:4px 0 0 4px;-moz-border-radius:4px 0 0 4px;border-radius:4px 0 0 4px}.input-append input+.btn-group .btn:last-child,.input-append select+.btn-group .btn:last-child,.input-append .uneditable-input+.btn-group .btn:last-child{-webkit-border-radius:0 4px 4px 0;-moz-border-radius:0 4px 4px 0;border-radius:0 4px 4px 0}.input-append .add-on,.input-append .btn,.input-append .btn-group{margin-left:-1px}.input-append .add-on:last-child,.input-append .btn:last-child,.input-append .btn-group:last-child>.dropdown-toggle{-webkit-border-radius:0 4px 4px 0;-moz-border-radius:0 4px 4px 0;border-radius:0 4px 4px 0}.input-prepend.input-append input,.input-prepend.input-append select,.input-prepend.input-append .uneditable-input{-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.input-prepend.input-append input+.btn-group .btn,.input-prepend.input-append select+.btn-group .btn,.input-prepend.input-append .uneditable-input+.btn-group .btn{-webkit-border-radius:0 4px 4px 0;-moz-border-radius:0 4px 4px 0;border-radius:0 4px 4px 0}.input-prepend.input-append .add-on:first-child,.input-prepend.input-append .btn:first-child{margin-right:-1px;-webkit-border-radius:4px 0 0 4px;-moz-border-radius:4px 0 0 4px;border-radius:4px 0 0 4px}.input-prepend.input-append .add-on:last-child,.input-prepend.input-append .btn:last-child{margin-left:-1px;-webkit-border-radius:0 4px 4px 0;-moz-border-radius:0 4px 4px 0;border-radius:0 4px 4px 0}.input-prepend.input-append .btn-group:first-child{margin-left:0}input.search-query{padding-right:14px;padding-right:4px \9;padding-left:14px;padding-left:4px \9;margin-bottom:0;-webkit-border-radius:15px;-moz-border-radius:15px;border-radius:15px}.form-search .input-append .search-query,.form-search .input-prepend .search-query{-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.form-search .input-append .search-query{-webkit-border-radius:14px 0 0 14px;-moz-border-radius:14px 0 0 14px;border-radius:14px 0 0 14px}.form-search .input-append .btn{-webkit-border-radius:0 14px 14px 0;-moz-border-radius:0 14px 14px 0;border-radius:0 14px 14px 0}.form-search .input-prepend .search-query{-webkit-border-radius:0 14px 14px 0;-moz-border-radius:0 14px 14px 0;border-radius:0 14px 14px 0}.form-search .input-prepend .btn{-webkit-border-radius:14px 0 0 14px;-moz-border-radius:14px 0 0 14px;border-radius:14px 0 0 14px}.form-search input,.form-inline input,.form-horizontal input,.form-search textarea,.form-inline textarea,.form-horizontal textarea,.form-search select,.form-inline select,.form-horizontal select,.form-search .help-inline,.form-inline .help-inline,.form-horizontal .help-inline,.form-search .uneditable-input,.form-inline .uneditable-input,.form-horizontal .uneditable-input,.form-search .input-prepend,.form-inline .input-prepend,.form-horizontal .input-prepend,.form-search .input-append,.form-inline .input-append,.form-horizontal .input-append{display:inline-block;*display:inline;margin-bottom:0;vertical-align:middle;*zoom:1}.form-search .hide,.form-inline .hide,.form-horizontal .hide{display:none}.form-search label,.form-inline label,.form-search .btn-group,.form-inline .btn-group{display:inline-block}.form-search .input-append,.form-inline .input-append,.form-search .input-prepend,.form-inline .input-prepend{margin-bottom:0}.form-search .radio,.form-search .checkbox,.form-inline .radio,.form-inline .checkbox{padding-left:0;margin-bottom:0;vertical-align:middle}.form-search .radio input[type="radio"],.form-search .checkbox input[type="checkbox"],.form-inline .radio input[type="radio"],.form-inline .checkbox input[type="checkbox"]{float:left;margin-right:3px;margin-left:0}.control-group{margin-bottom:10px}legend+.control-group{margin-top:20px;-webkit-margin-top-collapse:separate}.form-horizontal .control-group{margin-bottom:20px;*zoom:1}.form-horizontal .control-group:before,.form-horizontal .control-group:after{display:table;line-height:0;content:""}.form-horizontal .control-group:after{clear:both}.form-horizontal .control-label{float:left;width:160px;padding-top:5px;text-align:right}.form-horizontal .controls{*display:inline-block;*padding-left:20px;margin-left:180px;*margin-left:0}.form-horizontal .controls:first-child{*padding-left:180px}.form-horizontal .help-block{margin-bottom:0}.form-horizontal input+.help-block,.form-horizontal select+.help-block,.form-horizontal textarea+.help-block,.form-horizontal .uneditable-input+.help-block,.form-horizontal .input-prepend+.help-block,.form-horizontal .input-append+.help-block{margin-top:10px}.form-horizontal .form-actions{padding-left:180px}table{max-width:100%;background-color:transparent;border-collapse:collapse;border-spacing:0}.table{width:100%;margin-bottom:20px}.table th,.table td{padding:8px;line-height:20px;text-align:left;vertical-align:top;border-top:1px solid #ddd}.table th{font-weight:bold}.table thead th{vertical-align:bottom}.table caption+thead tr:first-child th,.table caption+thead tr:first-child td,.table colgroup+thead tr:first-child th,.table colgroup+thead tr:first-child td,.table thead:first-child tr:first-child th,.table thead:first-child tr:first-child td{border-top:0}.table tbody+tbody{border-top:2px solid #ddd}.table .table{background-color:#fff}.table-condensed th,.table-condensed td{padding:4px 5px}.table-bordered{border:1px solid #ddd;border-collapse:separate;*border-collapse:collapse;border-left:0;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.table-bordered th,.table-bordered td{border-left:1px solid #ddd}.table-bordered caption+thead tr:first-child th,.table-bordered caption+tbody tr:first-child th,.table-bordered caption+tbody tr:first-child td,.table-bordered colgroup+thead tr:first-child th,.table-bordered colgroup+tbody tr:first-child th,.table-bordered colgroup+tbody tr:first-child td,.table-bordered thead:first-child tr:first-child th,.table-bordered tbody:first-child tr:first-child th,.table-bordered tbody:first-child tr:first-child td{border-top:0}.table-bordered thead:first-child tr:first-child>th:first-child,.table-bordered tbody:first-child tr:first-child>td:first-child,.table-bordered tbody:first-child tr:first-child>th:first-child{-webkit-border-top-left-radius:4px;border-top-left-radius:4px;-moz-border-radius-topleft:4px}.table-bordered thead:first-child tr:first-child>th:last-child,.table-bordered tbody:first-child tr:first-child>td:last-child,.table-bordered tbody:first-child tr:first-child>th:last-child{-webkit-border-top-right-radius:4px;border-top-right-radius:4px;-moz-border-radius-topright:4px}.table-bordered thead:last-child tr:last-child>th:first-child,.table-bordered tbody:last-child tr:last-child>td:first-child,.table-bordered tbody:last-child tr:last-child>th:first-child,.table-bordered tfoot:last-child tr:last-child>td:first-child,.table-bordered tfoot:last-child tr:last-child>th:first-child{-webkit-border-bottom-left-radius:4px;border-bottom-left-radius:4px;-moz-border-radius-bottomleft:4px}.table-bordered thead:last-child tr:last-child>th:last-child,.table-bordered tbody:last-child tr:last-child>td:last-child,.table-bordered tbody:last-child tr:last-child>th:last-child,.table-bordered tfoot:last-child tr:last-child>td:last-child,.table-bordered tfoot:last-child tr:last-child>th:last-child{-webkit-border-bottom-right-radius:4px;border-bottom-right-radius:4px;-moz-border-radius-bottomright:4px}.table-bordered tfoot+tbody:last-child tr:last-child td:first-child{-webkit-border-bottom-left-radius:0;border-bottom-left-radius:0;-moz-border-radius-bottomleft:0}.table-bordered tfoot+tbody:last-child tr:last-child td:last-child{-webkit-border-bottom-right-radius:0;border-bottom-right-radius:0;-moz-border-radius-bottomright:0}.table-bordered caption+thead tr:first-child th:first-child,.table-bordered caption+tbody tr:first-child td:first-child,.table-bordered colgroup+thead tr:first-child th:first-child,.table-bordered colgroup+tbody tr:first-child td:first-child{-webkit-border-top-left-radius:4px;border-top-left-radius:4px;-moz-border-radius-topleft:4px}.table-bordered caption+thead tr:first-child th:last-child,.table-bordered caption+tbody tr:first-child td:last-child,.table-bordered colgroup+thead tr:first-child th:last-child,.table-bordered colgroup+tbody tr:first-child td:last-child{-webkit-border-top-right-radius:4px;border-top-right-radius:4px;-moz-border-radius-topright:4px}.table-striped tbody>tr:nth-child(odd)>td,.table-striped tbody>tr:nth-child(odd)>th{background-color:#f9f9f9}.table-hover tbody tr:hover>td,.table-hover tbody tr:hover>th{background-color:#f5f5f5}table td[class*="span"],table th[class*="span"],.row-fluid table td[class*="span"],.row-fluid table th[class*="span"]{display:table-cell;float:none;margin-left:0}.table td.span1,.table th.span1{float:none;width:44px;margin-left:0}.table td.span2,.table th.span2{float:none;width:124px;margin-left:0}.table td.span3,.table th.span3{float:none;width:204px;margin-left:0}.table td.span4,.table th.span4{float:none;width:284px;margin-left:0}.table td.span5,.table th.span5{float:none;width:364px;margin-left:0}.table td.span6,.table th.span6{float:none;width:444px;margin-left:0}.table td.span7,.table th.span7{float:none;width:524px;margin-left:0}.table td.span8,.table th.span8{float:none;width:604px;margin-left:0}.table td.span9,.table th.span9{float:none;width:684px;margin-left:0}.table td.span10,.table th.span10{float:none;width:764px;margin-left:0}.table td.span11,.table th.span11{float:none;width:844px;margin-left:0}.table td.span12,.table th.span12{float:none;width:924px;margin-left:0}.table tbody tr.success>td{background-color:#dff0d8}.table tbody tr.error>td{background-color:#f2dede}.table tbody tr.warning>td{background-color:#fcf8e3}.table tbody tr.info>td{background-color:#d9edf7}.table-hover tbody tr.success:hover>td{background-color:#d0e9c6}.table-hover tbody tr.error:hover>td{background-color:#ebcccc}.table-hover tbody tr.warning:hover>td{background-color:#faf2cc}.table-hover tbody tr.info:hover>td{background-color:#c4e3f3}[class^="icon-"],[class*=" icon-"]{display:inline-block;width:14px;height:14px;margin-top:1px;*margin-right:.3em;line-height:14px;vertical-align:text-top;background-image:url("../img/glyphicons-halflings.png");background-position:14px 14px;background-repeat:no-repeat}.icon-white,.nav-pills>.active>a>[class^="icon-"],.nav-pills>.active>a>[class*=" icon-"],.nav-list>.active>a>[class^="icon-"],.nav-list>.active>a>[class*=" icon-"],.navbar-inverse .nav>.active>a>[class^="icon-"],.navbar-inverse .nav>.active>a>[class*=" icon-"],.dropdown-menu>li>a:hover>[class^="icon-"],.dropdown-menu>li>a:focus>[class^="icon-"],.dropdown-menu>li>a:hover>[class*=" icon-"],.dropdown-menu>li>a:focus>[class*=" icon-"],.dropdown-menu>.active>a>[class^="icon-"],.dropdown-menu>.active>a>[class*=" icon-"],.dropdown-submenu:hover>a>[class^="icon-"],.dropdown-submenu:focus>a>[class^="icon-"],.dropdown-submenu:hover>a>[class*=" icon-"],.dropdown-submenu:focus>a>[class*=" icon-"]{background-image:url("../img/glyphicons-halflings-white.png")}.icon-glass{background-position:0 0}.icon-music{background-position:-24px 0}.icon-search{background-position:-48px 0}.icon-envelope{background-position:-72px 0}.icon-heart{background-position:-96px 0}.icon-star{background-position:-120px 0}.icon-star-empty{background-position:-144px 0}.icon-user{background-position:-168px 0}.icon-film{background-position:-192px 0}.icon-th-large{background-position:-216px 0}.icon-th{background-position:-240px 0}.icon-th-list{background-position:-264px 0}.icon-ok{background-position:-288px 0}.icon-remove{background-position:-312px 0}.icon-zoom-in{background-position:-336px 0}.icon-zoom-out{background-position:-360px 0}.icon-off{background-position:-384px 0}.icon-signal{background-position:-408px 0}.icon-cog{background-position:-432px 0}.icon-trash{background-position:-456px 0}.icon-home{background-position:0 -24px}.icon-file{background-position:-24px -24px}.icon-time{background-position:-48px -24px}.icon-road{background-position:-72px -24px}.icon-download-alt{background-position:-96px -24px}.icon-download{background-position:-120px -24px}.icon-upload{background-position:-144px -24px}.icon-inbox{background-position:-168px -24px}.icon-play-circle{background-position:-192px -24px}.icon-repeat{background-position:-216px -24px}.icon-refresh{background-position:-240px -24px}.icon-list-alt{background-position:-264px -24px}.icon-lock{background-position:-287px -24px}.icon-flag{background-position:-312px -24px}.icon-headphones{background-position:-336px -24px}.icon-volume-off{background-position:-360px -24px}.icon-volume-down{background-position:-384px -24px}.icon-volume-up{background-position:-408px -24px}.icon-qrcode{background-position:-432px -24px}.icon-barcode{background-position:-456px -24px}.icon-tag{background-position:0 -48px}.icon-tags{background-position:-25px -48px}.icon-book{background-position:-48px -48px}.icon-bookmark{background-position:-72px -48px}.icon-print{background-position:-96px -48px}.icon-camera{background-position:-120px -48px}.icon-font{background-position:-144px -48px}.icon-bold{background-position:-167px -48px}.icon-italic{background-position:-192px -48px}.icon-text-height{background-position:-216px -48px}.icon-text-width{background-position:-240px -48px}.icon-align-left{background-position:-264px -48px}.icon-align-center{background-position:-288px -48px}.icon-align-right{background-position:-312px -48px}.icon-align-justify{background-position:-336px -48px}.icon-list{background-position:-360px -48px}.icon-indent-left{background-position:-384px -48px}.icon-indent-right{background-position:-408px -48px}.icon-facetime-video{background-position:-432px -48px}.icon-picture{background-position:-456px -48px}.icon-pencil{background-position:0 -72px}.icon-map-marker{background-position:-24px -72px}.icon-adjust{background-position:-48px -72px}.icon-tint{background-position:-72px -72px}.icon-edit{background-position:-96px -72px}.icon-share{background-position:-120px -72px}.icon-check{background-position:-144px -72px}.icon-move{background-position:-168px -72px}.icon-step-backward{background-position:-192px -72px}.icon-fast-backward{background-position:-216px -72px}.icon-backward{background-position:-240px -72px}.icon-play{background-position:-264px -72px}.icon-pause{background-position:-288px -72px}.icon-stop{background-position:-312px -72px}.icon-forward{background-position:-336px -72px}.icon-fast-forward{background-position:-360px -72px}.icon-step-forward{background-position:-384px -72px}.icon-eject{background-position:-408px -72px}.icon-chevron-left{background-position:-432px -72px}.icon-chevron-right{background-position:-456px -72px}.icon-plus-sign{background-position:0 -96px}.icon-minus-sign{background-position:-24px -96px}.icon-remove-sign{background-position:-48px -96px}.icon-ok-sign{background-position:-72px -96px}.icon-question-sign{background-position:-96px -96px}.icon-info-sign{background-position:-120px -96px}.icon-screenshot{background-position:-144px -96px}.icon-remove-circle{background-position:-168px -96px}.icon-ok-circle{background-position:-192px -96px}.icon-ban-circle{background-position:-216px -96px}.icon-arrow-left{background-position:-240px -96px}.icon-arrow-right{background-position:-264px -96px}.icon-arrow-up{background-position:-289px -96px}.icon-arrow-down{background-position:-312px -96px}.icon-share-alt{background-position:-336px -96px}.icon-resize-full{background-position:-360px -96px}.icon-resize-small{background-position:-384px -96px}.icon-plus{background-position:-408px -96px}.icon-minus{background-position:-433px -96px}.icon-asterisk{background-position:-456px -96px}.icon-exclamation-sign{background-position:0 -120px}.icon-gift{background-position:-24px -120px}.icon-leaf{background-position:-48px -120px}.icon-fire{background-position:-72px -120px}.icon-eye-open{background-position:-96px -120px}.icon-eye-close{background-position:-120px -120px}.icon-warning-sign{background-position:-144px -120px}.icon-plane{background-position:-168px -120px}.icon-calendar{background-position:-192px -120px}.icon-random{width:16px;background-position:-216px -120px}.icon-comment{background-position:-240px -120px}.icon-magnet{background-position:-264px -120px}.icon-chevron-up{background-position:-288px -120px}.icon-chevron-down{background-position:-313px -119px}.icon-retweet{background-position:-336px -120px}.icon-shopping-cart{background-position:-360px -120px}.icon-folder-close{width:16px;background-position:-384px -120px}.icon-folder-open{width:16px;background-position:-408px -120px}.icon-resize-vertical{background-position:-432px -119px}.icon-resize-horizontal{background-position:-456px -118px}.icon-hdd{background-position:0 -144px}.icon-bullhorn{background-position:-24px -144px}.icon-bell{background-position:-48px -144px}.icon-certificate{background-position:-72px -144px}.icon-thumbs-up{background-position:-96px -144px}.icon-thumbs-down{background-position:-120px -144px}.icon-hand-right{background-position:-144px -144px}.icon-hand-left{background-position:-168px -144px}.icon-hand-up{background-position:-192px -144px}.icon-hand-down{background-position:-216px -144px}.icon-circle-arrow-right{background-position:-240px -144px}.icon-circle-arrow-left{background-position:-264px -144px}.icon-circle-arrow-up{background-position:-288px -144px}.icon-circle-arrow-down{background-position:-312px -144px}.icon-globe{background-position:-336px -144px}.icon-wrench{background-position:-360px -144px}.icon-tasks{background-position:-384px -144px}.icon-filter{background-position:-408px -144px}.icon-briefcase{background-position:-432px -144px}.icon-fullscreen{background-position:-456px -144px}.dropup,.dropdown{position:relative}.dropdown-toggle{*margin-bottom:-3px}.dropdown-toggle:active,.open .dropdown-toggle{outline:0}.caret{display:inline-block;width:0;height:0;vertical-align:top;border-top:4px solid #000;border-right:4px solid transparent;border-left:4px solid transparent;content:""}.dropdown .caret{margin-top:8px;margin-left:2px}.dropdown-menu{position:absolute;top:100%;left:0;z-index:1000;display:none;float:left;min-width:160px;padding:5px 0;margin:2px 0 0;list-style:none;background-color:#fff;border:1px solid #ccc;border:1px solid rgba(0,0,0,0.2);*border-right-width:2px;*border-bottom-width:2px;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;-webkit-box-shadow:0 5px 10px rgba(0,0,0,0.2);-moz-box-shadow:0 5px 10px rgba(0,0,0,0.2);box-shadow:0 5px 10px rgba(0,0,0,0.2);-webkit-background-clip:padding-box;-moz-background-clip:padding;background-clip:padding-box}.dropdown-menu.pull-right{right:0;left:auto}.dropdown-menu .divider{*width:100%;height:1px;margin:9px 1px;*margin:-5px 0 5px;overflow:hidden;background-color:#e5e5e5;border-bottom:1px solid #fff}.dropdown-menu>li>a{display:block;padding:3px 20px;clear:both;font-weight:normal;line-height:20px;color:#333;white-space:nowrap}.dropdown-menu>li>a:hover,.dropdown-menu>li>a:focus,.dropdown-submenu:hover>a,.dropdown-submenu:focus>a{color:#fff;text-decoration:none;background-color:#0081c2;background-image:-moz-linear-gradient(top,#08c,#0077b3);background-image:-webkit-gradient(linear,0 0,0 100%,from(#08c),to(#0077b3));background-image:-webkit-linear-gradient(top,#08c,#0077b3);background-image:-o-linear-gradient(top,#08c,#0077b3);background-image:linear-gradient(to bottom,#08c,#0077b3);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0088cc',endColorstr='#ff0077b3',GradientType=0)}.dropdown-menu>.active>a,.dropdown-menu>.active>a:hover,.dropdown-menu>.active>a:focus{color:#fff;text-decoration:none;background-color:#0081c2;background-image:-moz-linear-gradient(top,#08c,#0077b3);background-image:-webkit-gradient(linear,0 0,0 100%,from(#08c),to(#0077b3));background-image:-webkit-linear-gradient(top,#08c,#0077b3);background-image:-o-linear-gradient(top,#08c,#0077b3);background-image:linear-gradient(to bottom,#08c,#0077b3);background-repeat:repeat-x;outline:0;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0088cc',endColorstr='#ff0077b3',GradientType=0)}.dropdown-menu>.disabled>a,.dropdown-menu>.disabled>a:hover,.dropdown-menu>.disabled>a:focus{color:#999}.dropdown-menu>.disabled>a:hover,.dropdown-menu>.disabled>a:focus{text-decoration:none;cursor:default;background-color:transparent;background-image:none;filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.open{*z-index:1000}.open>.dropdown-menu{display:block}.dropdown-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:990}.pull-right>.dropdown-menu{right:0;left:auto}.dropup .caret,.navbar-fixed-bottom .dropdown .caret{border-top:0;border-bottom:4px solid #000;content:""}.dropup .dropdown-menu,.navbar-fixed-bottom .dropdown .dropdown-menu{top:auto;bottom:100%;margin-bottom:1px}.dropdown-submenu{position:relative}.dropdown-submenu>.dropdown-menu{top:0;left:100%;margin-top:-6px;margin-left:-1px;-webkit-border-radius:0 6px 6px 6px;-moz-border-radius:0 6px 6px 6px;border-radius:0 6px 6px 6px}.dropdown-submenu:hover>.dropdown-menu{display:block}.dropup .dropdown-submenu>.dropdown-menu{top:auto;bottom:0;margin-top:0;margin-bottom:-2px;-webkit-border-radius:5px 5px 5px 0;-moz-border-radius:5px 5px 5px 0;border-radius:5px 5px 5px 0}.dropdown-submenu>a:after{display:block;float:right;width:0;height:0;margin-top:5px;margin-right:-10px;border-color:transparent;border-left-color:#ccc;border-style:solid;border-width:5px 0 5px 5px;content:" "}.dropdown-submenu:hover>a:after{border-left-color:#fff}.dropdown-submenu.pull-left{float:none}.dropdown-submenu.pull-left>.dropdown-menu{left:-100%;margin-left:10px;-webkit-border-radius:6px 0 6px 6px;-moz-border-radius:6px 0 6px 6px;border-radius:6px 0 6px 6px}.dropdown .dropdown-menu .nav-header{padding-right:20px;padding-left:20px}.typeahead{z-index:1051;margin-top:2px;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.well{min-height:20px;padding:19px;margin-bottom:20px;background-color:#f5f5f5;border:1px solid #e3e3e3;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.05);-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.05);box-shadow:inset 0 1px 1px rgba(0,0,0,0.05)}.well blockquote{border-color:#ddd;border-color:rgba(0,0,0,0.15)}.well-large{padding:24px;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px}.well-small{padding:9px;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.fade{opacity:0;-webkit-transition:opacity .15s linear;-moz-transition:opacity .15s linear;-o-transition:opacity .15s linear;transition:opacity .15s linear}.fade.in{opacity:1}.collapse{position:relative;height:0;overflow:hidden;-webkit-transition:height .35s ease;-moz-transition:height .35s ease;-o-transition:height .35s ease;transition:height .35s ease}.collapse.in{height:auto}.close{float:right;font-size:20px;font-weight:bold;line-height:20px;color:#000;text-shadow:0 1px 0 #fff;opacity:.2;filter:alpha(opacity=20)}.close:hover,.close:focus{color:#000;text-decoration:none;cursor:pointer;opacity:.4;filter:alpha(opacity=40)}button.close{padding:0;cursor:pointer;background:transparent;border:0;-webkit-appearance:none}.btn{display:inline-block;*display:inline;padding:4px 12px;margin-bottom:0;*margin-left:.3em;font-size:14px;line-height:20px;color:#333;text-align:center;text-shadow:0 1px 1px rgba(255,255,255,0.75);vertical-align:middle;cursor:pointer;background-color:#f5f5f5;*background-color:#e6e6e6;background-image:-moz-linear-gradient(top,#fff,#e6e6e6);background-image:-webkit-gradient(linear,0 0,0 100%,from(#fff),to(#e6e6e6));background-image:-webkit-linear-gradient(top,#fff,#e6e6e6);background-image:-o-linear-gradient(top,#fff,#e6e6e6);background-image:linear-gradient(to bottom,#fff,#e6e6e6);background-repeat:repeat-x;border:1px solid #ccc;*border:0;border-color:#e6e6e6 #e6e6e6 #bfbfbf;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);border-bottom-color:#b3b3b3;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff',endColorstr='#ffe6e6e6',GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);*zoom:1;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,0.2),0 1px 2px rgba(0,0,0,0.05);-moz-box-shadow:inset 0 1px 0 rgba(255,255,255,0.2),0 1px 2px rgba(0,0,0,0.05);box-shadow:inset 0 1px 0 rgba(255,255,255,0.2),0 1px 2px rgba(0,0,0,0.05)}.btn:hover,.btn:focus,.btn:active,.btn.active,.btn.disabled,.btn[disabled]{color:#333;background-color:#e6e6e6;*background-color:#d9d9d9}.btn:active,.btn.active{background-color:#ccc \9}.btn:first-child{*margin-left:0}.btn:hover,.btn:focus{color:#333;text-decoration:none;background-position:0 -15px;-webkit-transition:background-position .1s linear;-moz-transition:background-position .1s linear;-o-transition:background-position .1s linear;transition:background-position .1s linear}.btn:focus{outline:thin dotted #333;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}.btn.active,.btn:active{background-image:none;outline:0;-webkit-box-shadow:inset 0 2px 4px rgba(0,0,0,0.15),0 1px 2px rgba(0,0,0,0.05);-moz-box-shadow:inset 0 2px 4px rgba(0,0,0,0.15),0 1px 2px rgba(0,0,0,0.05);box-shadow:inset 0 2px 4px rgba(0,0,0,0.15),0 1px 2px rgba(0,0,0,0.05)}.btn.disabled,.btn[disabled]{cursor:default;background-image:none;opacity:.65;filter:alpha(opacity=65);-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}.btn-large{padding:11px 19px;font-size:17.5px;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px}.btn-large [class^="icon-"],.btn-large [class*=" icon-"]{margin-top:4px}.btn-small{padding:2px 10px;font-size:11.9px;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.btn-small [class^="icon-"],.btn-small [class*=" icon-"]{margin-top:0}.btn-mini [class^="icon-"],.btn-mini [class*=" icon-"]{margin-top:-1px}.btn-mini{padding:0 6px;font-size:10.5px;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.btn-block{display:block;width:100%;padding-right:0;padding-left:0;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.btn-block+.btn-block{margin-top:5px}input[type="submit"].btn-block,input[type="reset"].btn-block,input[type="button"].btn-block{width:100%}.btn-primary.active,.btn-warning.active,.btn-danger.active,.btn-success.active,.btn-info.active,.btn-inverse.active{color:rgba(255,255,255,0.75)}.btn-primary{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,0.25);background-color:#006dcc;*background-color:#04c;background-image:-moz-linear-gradient(top,#08c,#04c);background-image:-webkit-gradient(linear,0 0,0 100%,from(#08c),to(#04c));background-image:-webkit-linear-gradient(top,#08c,#04c);background-image:-o-linear-gradient(top,#08c,#04c);background-image:linear-gradient(to bottom,#08c,#04c);background-repeat:repeat-x;border-color:#04c #04c #002a80;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0088cc',endColorstr='#ff0044cc',GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.btn-primary:hover,.btn-primary:focus,.btn-primary:active,.btn-primary.active,.btn-primary.disabled,.btn-primary[disabled]{color:#fff;background-color:#04c;*background-color:#003bb3}.btn-primary:active,.btn-primary.active{background-color:#039 \9}.btn-warning{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,0.25);background-color:#faa732;*background-color:#f89406;background-image:-moz-linear-gradient(top,#fbb450,#f89406);background-image:-webkit-gradient(linear,0 0,0 100%,from(#fbb450),to(#f89406));background-image:-webkit-linear-gradient(top,#fbb450,#f89406);background-image:-o-linear-gradient(top,#fbb450,#f89406);background-image:linear-gradient(to bottom,#fbb450,#f89406);background-repeat:repeat-x;border-color:#f89406 #f89406 #ad6704;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffbb450',endColorstr='#fff89406',GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.btn-warning:hover,.btn-warning:focus,.btn-warning:active,.btn-warning.active,.btn-warning.disabled,.btn-warning[disabled]{color:#fff;background-color:#f89406;*background-color:#df8505}.btn-warning:active,.btn-warning.active{background-color:#c67605 \9}.btn-danger{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,0.25);background-color:#da4f49;*background-color:#bd362f;background-image:-moz-linear-gradient(top,#ee5f5b,#bd362f);background-image:-webkit-gradient(linear,0 0,0 100%,from(#ee5f5b),to(#bd362f));background-image:-webkit-linear-gradient(top,#ee5f5b,#bd362f);background-image:-o-linear-gradient(top,#ee5f5b,#bd362f);background-image:linear-gradient(to bottom,#ee5f5b,#bd362f);background-repeat:repeat-x;border-color:#bd362f #bd362f #802420;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffee5f5b',endColorstr='#ffbd362f',GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.btn-danger:hover,.btn-danger:focus,.btn-danger:active,.btn-danger.active,.btn-danger.disabled,.btn-danger[disabled]{color:#fff;background-color:#bd362f;*background-color:#a9302a}.btn-danger:active,.btn-danger.active{background-color:#942a25 \9}.btn-success{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,0.25);background-color:#5bb75b;*background-color:#51a351;background-image:-moz-linear-gradient(top,#62c462,#51a351);background-image:-webkit-gradient(linear,0 0,0 100%,from(#62c462),to(#51a351));background-image:-webkit-linear-gradient(top,#62c462,#51a351);background-image:-o-linear-gradient(top,#62c462,#51a351);background-image:linear-gradient(to bottom,#62c462,#51a351);background-repeat:repeat-x;border-color:#51a351 #51a351 #387038;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff62c462',endColorstr='#ff51a351',GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.btn-success:hover,.btn-success:focus,.btn-success:active,.btn-success.active,.btn-success.disabled,.btn-success[disabled]{color:#fff;background-color:#51a351;*background-color:#499249}.btn-success:active,.btn-success.active{background-color:#408140 \9}.btn-info{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,0.25);background-color:#49afcd;*background-color:#2f96b4;background-image:-moz-linear-gradient(top,#5bc0de,#2f96b4);background-image:-webkit-gradient(linear,0 0,0 100%,from(#5bc0de),to(#2f96b4));background-image:-webkit-linear-gradient(top,#5bc0de,#2f96b4);background-image:-o-linear-gradient(top,#5bc0de,#2f96b4);background-image:linear-gradient(to bottom,#5bc0de,#2f96b4);background-repeat:repeat-x;border-color:#2f96b4 #2f96b4 #1f6377;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de',endColorstr='#ff2f96b4',GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.btn-info:hover,.btn-info:focus,.btn-info:active,.btn-info.active,.btn-info.disabled,.btn-info[disabled]{color:#fff;background-color:#2f96b4;*background-color:#2a85a0}.btn-info:active,.btn-info.active{background-color:#24748c \9}.btn-inverse{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,0.25);background-color:#363636;*background-color:#222;background-image:-moz-linear-gradient(top,#444,#222);background-image:-webkit-gradient(linear,0 0,0 100%,from(#444),to(#222));background-image:-webkit-linear-gradient(top,#444,#222);background-image:-o-linear-gradient(top,#444,#222);background-image:linear-gradient(to bottom,#444,#222);background-repeat:repeat-x;border-color:#222 #222 #000;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff444444',endColorstr='#ff222222',GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.btn-inverse:hover,.btn-inverse:focus,.btn-inverse:active,.btn-inverse.active,.btn-inverse.disabled,.btn-inverse[disabled]{color:#fff;background-color:#222;*background-color:#151515}.btn-inverse:active,.btn-inverse.active{background-color:#080808 \9}button.btn,input[type="submit"].btn{*padding-top:3px;*padding-bottom:3px}button.btn::-moz-focus-inner,input[type="submit"].btn::-moz-focus-inner{padding:0;border:0}button.btn.btn-large,input[type="submit"].btn.btn-large{*padding-top:7px;*padding-bottom:7px}button.btn.btn-small,input[type="submit"].btn.btn-small{*padding-top:3px;*padding-bottom:3px}button.btn.btn-mini,input[type="submit"].btn.btn-mini{*padding-top:1px;*padding-bottom:1px}.btn-link,.btn-link:active,.btn-link[disabled]{background-color:transparent;background-image:none;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}.btn-link{color:#08c;cursor:pointer;border-color:transparent;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.btn-link:hover,.btn-link:focus{color:#005580;text-decoration:underline;background-color:transparent}.btn-link[disabled]:hover,.btn-link[disabled]:focus{color:#333;text-decoration:none}.btn-group{position:relative;display:inline-block;*display:inline;*margin-left:.3em;font-size:0;white-space:nowrap;vertical-align:middle;*zoom:1}.btn-group:first-child{*margin-left:0}.btn-group+.btn-group{margin-left:5px}.btn-toolbar{margin-top:10px;margin-bottom:10px;font-size:0}.btn-toolbar>.btn+.btn,.btn-toolbar>.btn-group+.btn,.btn-toolbar>.btn+.btn-group{margin-left:5px}.btn-group>.btn{position:relative;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.btn-group>.btn+.btn{margin-left:-1px}.btn-group>.btn,.btn-group>.dropdown-menu,.btn-group>.popover{font-size:14px}.btn-group>.btn-mini{font-size:10.5px}.btn-group>.btn-small{font-size:11.9px}.btn-group>.btn-large{font-size:17.5px}.btn-group>.btn:first-child{margin-left:0;-webkit-border-bottom-left-radius:4px;border-bottom-left-radius:4px;-webkit-border-top-left-radius:4px;border-top-left-radius:4px;-moz-border-radius-bottomleft:4px;-moz-border-radius-topleft:4px}.btn-group>.btn:last-child,.btn-group>.dropdown-toggle{-webkit-border-top-right-radius:4px;border-top-right-radius:4px;-webkit-border-bottom-right-radius:4px;border-bottom-right-radius:4px;-moz-border-radius-topright:4px;-moz-border-radius-bottomright:4px}.btn-group>.btn.large:first-child{margin-left:0;-webkit-border-bottom-left-radius:6px;border-bottom-left-radius:6px;-webkit-border-top-left-radius:6px;border-top-left-radius:6px;-moz-border-radius-bottomleft:6px;-moz-border-radius-topleft:6px}.btn-group>.btn.large:last-child,.btn-group>.large.dropdown-toggle{-webkit-border-top-right-radius:6px;border-top-right-radius:6px;-webkit-border-bottom-right-radius:6px;border-bottom-right-radius:6px;-moz-border-radius-topright:6px;-moz-border-radius-bottomright:6px}.btn-group>.btn:hover,.btn-group>.btn:focus,.btn-group>.btn:active,.btn-group>.btn.active{z-index:2}.btn-group .dropdown-toggle:active,.btn-group.open .dropdown-toggle{outline:0}.btn-group>.btn+.dropdown-toggle{*padding-top:5px;padding-right:8px;*padding-bottom:5px;padding-left:8px;-webkit-box-shadow:inset 1px 0 0 rgba(255,255,255,0.125),inset 0 1px 0 rgba(255,255,255,0.2),0 1px 2px rgba(0,0,0,0.05);-moz-box-shadow:inset 1px 0 0 rgba(255,255,255,0.125),inset 0 1px 0 rgba(255,255,255,0.2),0 1px 2px rgba(0,0,0,0.05);box-shadow:inset 1px 0 0 rgba(255,255,255,0.125),inset 0 1px 0 rgba(255,255,255,0.2),0 1px 2px rgba(0,0,0,0.05)}.btn-group>.btn-mini+.dropdown-toggle{*padding-top:2px;padding-right:5px;*padding-bottom:2px;padding-left:5px}.btn-group>.btn-small+.dropdown-toggle{*padding-top:5px;*padding-bottom:4px}.btn-group>.btn-large+.dropdown-toggle{*padding-top:7px;padding-right:12px;*padding-bottom:7px;padding-left:12px}.btn-group.open .dropdown-toggle{background-image:none;-webkit-box-shadow:inset 0 2px 4px rgba(0,0,0,0.15),0 1px 2px rgba(0,0,0,0.05);-moz-box-shadow:inset 0 2px 4px rgba(0,0,0,0.15),0 1px 2px rgba(0,0,0,0.05);box-shadow:inset 0 2px 4px rgba(0,0,0,0.15),0 1px 2px rgba(0,0,0,0.05)}.btn-group.open .btn.dropdown-toggle{background-color:#e6e6e6}.btn-group.open .btn-primary.dropdown-toggle{background-color:#04c}.btn-group.open .btn-warning.dropdown-toggle{background-color:#f89406}.btn-group.open .btn-danger.dropdown-toggle{background-color:#bd362f}.btn-group.open .btn-success.dropdown-toggle{background-color:#51a351}.btn-group.open .btn-info.dropdown-toggle{background-color:#2f96b4}.btn-group.open .btn-inverse.dropdown-toggle{background-color:#222}.btn .caret{margin-top:8px;margin-left:0}.btn-large .caret{margin-top:6px}.btn-large .caret{border-top-width:5px;border-right-width:5px;border-left-width:5px}.btn-mini .caret,.btn-small .caret{margin-top:8px}.dropup .btn-large .caret{border-bottom-width:5px}.btn-primary .caret,.btn-warning .caret,.btn-danger .caret,.btn-info .caret,.btn-success .caret,.btn-inverse .caret{border-top-color:#fff;border-bottom-color:#fff}.btn-group-vertical{display:inline-block;*display:inline;*zoom:1}.btn-group-vertical>.btn{display:block;float:none;max-width:100%;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.btn-group-vertical>.btn+.btn{margin-top:-1px;margin-left:0}.btn-group-vertical>.btn:first-child{-webkit-border-radius:4px 4px 0 0;-moz-border-radius:4px 4px 0 0;border-radius:4px 4px 0 0}.btn-group-vertical>.btn:last-child{-webkit-border-radius:0 0 4px 4px;-moz-border-radius:0 0 4px 4px;border-radius:0 0 4px 4px}.btn-group-vertical>.btn-large:first-child{-webkit-border-radius:6px 6px 0 0;-moz-border-radius:6px 6px 0 0;border-radius:6px 6px 0 0}.btn-group-vertical>.btn-large:last-child{-webkit-border-radius:0 0 6px 6px;-moz-border-radius:0 0 6px 6px;border-radius:0 0 6px 6px}.alert{padding:8px 35px 8px 14px;margin-bottom:20px;text-shadow:0 1px 0 rgba(255,255,255,0.5);background-color:#fcf8e3;border:1px solid #fbeed5;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.alert,.alert h4{color:#c09853}.alert h4{margin:0}.alert .close{position:relative;top:-2px;right:-21px;line-height:20px}.alert-success{color:#468847;background-color:#dff0d8;border-color:#d6e9c6}.alert-success h4{color:#468847}.alert-danger,.alert-error{color:#b94a48;background-color:#f2dede;border-color:#eed3d7}.alert-danger h4,.alert-error h4{color:#b94a48}.alert-info{color:#3a87ad;background-color:#d9edf7;border-color:#bce8f1}.alert-info h4{color:#3a87ad}.alert-block{padding-top:14px;padding-bottom:14px}.alert-block>p,.alert-block>ul{margin-bottom:0}.alert-block p+p{margin-top:5px}.nav{margin-bottom:20px;margin-left:0;list-style:none}.nav>li>a{display:block}.nav>li>a:hover,.nav>li>a:focus{text-decoration:none;background-color:#eee}.nav>li>a>img{max-width:none}.nav>.pull-right{float:right}.nav-header{display:block;padding:3px 15px;font-size:11px;font-weight:bold;line-height:20px;color:#999;text-shadow:0 1px 0 rgba(255,255,255,0.5);text-transform:uppercase}.nav li+.nav-header{margin-top:9px}.nav-list{padding-right:15px;padding-left:15px;margin-bottom:0}.nav-list>li>a,.nav-list .nav-header{margin-right:-15px;margin-left:-15px;text-shadow:0 1px 0 rgba(255,255,255,0.5)}.nav-list>li>a{padding:3px 15px}.nav-list>.active>a,.nav-list>.active>a:hover,.nav-list>.active>a:focus{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,0.2);background-color:#08c}.nav-list [class^="icon-"],.nav-list [class*=" icon-"]{margin-right:2px}.nav-list .divider{*width:100%;height:1px;margin:9px 1px;*margin:-5px 0 5px;overflow:hidden;background-color:#e5e5e5;border-bottom:1px solid #fff}.nav-tabs,.nav-pills{*zoom:1}.nav-tabs:before,.nav-pills:before,.nav-tabs:after,.nav-pills:after{display:table;line-height:0;content:""}.nav-tabs:after,.nav-pills:after{clear:both}.nav-tabs>li,.nav-pills>li{float:left}.nav-tabs>li>a,.nav-pills>li>a{padding-right:12px;padding-left:12px;margin-right:2px;line-height:14px}.nav-tabs{border-bottom:1px solid #ddd}.nav-tabs>li{margin-bottom:-1px}.nav-tabs>li>a{padding-top:8px;padding-bottom:8px;line-height:20px;border:1px solid transparent;-webkit-border-radius:4px 4px 0 0;-moz-border-radius:4px 4px 0 0;border-radius:4px 4px 0 0}.nav-tabs>li>a:hover,.nav-tabs>li>a:focus{border-color:#eee #eee #ddd}.nav-tabs>.active>a,.nav-tabs>.active>a:hover,.nav-tabs>.active>a:focus{color:#555;cursor:default;background-color:#fff;border:1px solid #ddd;border-bottom-color:transparent}.nav-pills>li>a{padding-top:8px;padding-bottom:8px;margin-top:2px;margin-bottom:2px;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px}.nav-pills>.active>a,.nav-pills>.active>a:hover,.nav-pills>.active>a:focus{color:#fff;background-color:#08c}.nav-stacked>li{float:none}.nav-stacked>li>a{margin-right:0}.nav-tabs.nav-stacked{border-bottom:0}.nav-tabs.nav-stacked>li>a{border:1px solid #ddd;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.nav-tabs.nav-stacked>li:first-child>a{-webkit-border-top-right-radius:4px;border-top-right-radius:4px;-webkit-border-top-left-radius:4px;border-top-left-radius:4px;-moz-border-radius-topright:4px;-moz-border-radius-topleft:4px}.nav-tabs.nav-stacked>li:last-child>a{-webkit-border-bottom-right-radius:4px;border-bottom-right-radius:4px;-webkit-border-bottom-left-radius:4px;border-bottom-left-radius:4px;-moz-border-radius-bottomright:4px;-moz-border-radius-bottomleft:4px}.nav-tabs.nav-stacked>li>a:hover,.nav-tabs.nav-stacked>li>a:focus{z-index:2;border-color:#ddd}.nav-pills.nav-stacked>li>a{margin-bottom:3px}.nav-pills.nav-stacked>li:last-child>a{margin-bottom:1px}.nav-tabs .dropdown-menu{-webkit-border-radius:0 0 6px 6px;-moz-border-radius:0 0 6px 6px;border-radius:0 0 6px 6px}.nav-pills .dropdown-menu{-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px}.nav .dropdown-toggle .caret{margin-top:6px;border-top-color:#08c;border-bottom-color:#08c}.nav .dropdown-toggle:hover .caret,.nav .dropdown-toggle:focus .caret{border-top-color:#005580;border-bottom-color:#005580}.nav-tabs .dropdown-toggle .caret{margin-top:8px}.nav .active .dropdown-toggle .caret{border-top-color:#fff;border-bottom-color:#fff}.nav-tabs .active .dropdown-toggle .caret{border-top-color:#555;border-bottom-color:#555}.nav>.dropdown.active>a:hover,.nav>.dropdown.active>a:focus{cursor:pointer}.nav-tabs .open .dropdown-toggle,.nav-pills .open .dropdown-toggle,.nav>li.dropdown.open.active>a:hover,.nav>li.dropdown.open.active>a:focus{color:#fff;background-color:#999;border-color:#999}.nav li.dropdown.open .caret,.nav li.dropdown.open.active .caret,.nav li.dropdown.open a:hover .caret,.nav li.dropdown.open a:focus .caret{border-top-color:#fff;border-bottom-color:#fff;opacity:1;filter:alpha(opacity=100)}.tabs-stacked .open>a:hover,.tabs-stacked .open>a:focus{border-color:#999}.tabbable{*zoom:1}.tabbable:before,.tabbable:after{display:table;line-height:0;content:""}.tabbable:after{clear:both}.tab-content{overflow:auto}.tabs-below>.nav-tabs,.tabs-right>.nav-tabs,.tabs-left>.nav-tabs{border-bottom:0}.tab-content>.tab-pane,.pill-content>.pill-pane{display:none}.tab-content>.active,.pill-content>.active{display:block}.tabs-below>.nav-tabs{border-top:1px solid #ddd}.tabs-below>.nav-tabs>li{margin-top:-1px;margin-bottom:0}.tabs-below>.nav-tabs>li>a{-webkit-border-radius:0 0 4px 4px;-moz-border-radius:0 0 4px 4px;border-radius:0 0 4px 4px}.tabs-below>.nav-tabs>li>a:hover,.tabs-below>.nav-tabs>li>a:focus{border-top-color:#ddd;border-bottom-color:transparent}.tabs-below>.nav-tabs>.active>a,.tabs-below>.nav-tabs>.active>a:hover,.tabs-below>.nav-tabs>.active>a:focus{border-color:transparent #ddd #ddd #ddd}.tabs-left>.nav-tabs>li,.tabs-right>.nav-tabs>li{float:none}.tabs-left>.nav-tabs>li>a,.tabs-right>.nav-tabs>li>a{min-width:74px;margin-right:0;margin-bottom:3px}.tabs-left>.nav-tabs{float:left;margin-right:19px;border-right:1px solid #ddd}.tabs-left>.nav-tabs>li>a{margin-right:-1px;-webkit-border-radius:4px 0 0 4px;-moz-border-radius:4px 0 0 4px;border-radius:4px 0 0 4px}.tabs-left>.nav-tabs>li>a:hover,.tabs-left>.nav-tabs>li>a:focus{border-color:#eee #ddd #eee #eee}.tabs-left>.nav-tabs .active>a,.tabs-left>.nav-tabs .active>a:hover,.tabs-left>.nav-tabs .active>a:focus{border-color:#ddd transparent #ddd #ddd;*border-right-color:#fff}.tabs-right>.nav-tabs{float:right;margin-left:19px;border-left:1px solid #ddd}.tabs-right>.nav-tabs>li>a{margin-left:-1px;-webkit-border-radius:0 4px 4px 0;-moz-border-radius:0 4px 4px 0;border-radius:0 4px 4px 0}.tabs-right>.nav-tabs>li>a:hover,.tabs-right>.nav-tabs>li>a:focus{border-color:#eee #eee #eee #ddd}.tabs-right>.nav-tabs .active>a,.tabs-right>.nav-tabs .active>a:hover,.tabs-right>.nav-tabs .active>a:focus{border-color:#ddd #ddd #ddd transparent;*border-left-color:#fff}.nav>.disabled>a{color:#999}.nav>.disabled>a:hover,.nav>.disabled>a:focus{text-decoration:none;cursor:default;background-color:transparent}.navbar{*position:relative;*z-index:2;margin-bottom:20px;overflow:visible}.navbar-inner{min-height:40px;padding-right:20px;padding-left:20px;background-color:#fafafa;background-image:-moz-linear-gradient(top,#fff,#f2f2f2);background-image:-webkit-gradient(linear,0 0,0 100%,from(#fff),to(#f2f2f2));background-image:-webkit-linear-gradient(top,#fff,#f2f2f2);background-image:-o-linear-gradient(top,#fff,#f2f2f2);background-image:linear-gradient(to bottom,#fff,#f2f2f2);background-repeat:repeat-x;border:1px solid #d4d4d4;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff',endColorstr='#fff2f2f2',GradientType=0);*zoom:1;-webkit-box-shadow:0 1px 4px rgba(0,0,0,0.065);-moz-box-shadow:0 1px 4px rgba(0,0,0,0.065);box-shadow:0 1px 4px rgba(0,0,0,0.065)}.navbar-inner:before,.navbar-inner:after{display:table;line-height:0;content:""}.navbar-inner:after{clear:both}.navbar .container{width:auto}.nav-collapse.collapse{height:auto;overflow:visible}.navbar .brand{display:block;float:left;padding:10px 20px 10px;margin-left:-20px;font-size:20px;font-weight:200;color:#777;text-shadow:0 1px 0 #fff}.navbar .brand:hover,.navbar .brand:focus{text-decoration:none}.navbar-text{margin-bottom:0;line-height:40px;color:#777}.navbar-link{color:#777}.navbar-link:hover,.navbar-link:focus{color:#333}.navbar .divider-vertical{height:40px;margin:0 9px;border-right:1px solid #fff;border-left:1px solid #f2f2f2}.navbar .btn,.navbar .btn-group{margin-top:5px}.navbar .btn-group .btn,.navbar .input-prepend .btn,.navbar .input-append .btn,.navbar .input-prepend .btn-group,.navbar .input-append .btn-group{margin-top:0}.navbar-form{margin-bottom:0;*zoom:1}.navbar-form:before,.navbar-form:after{display:table;line-height:0;content:""}.navbar-form:after{clear:both}.navbar-form input,.navbar-form select,.navbar-form .radio,.navbar-form .checkbox{margin-top:5px}.navbar-form input,.navbar-form select,.navbar-form .btn{display:inline-block;margin-bottom:0}.navbar-form input[type="image"],.navbar-form input[type="checkbox"],.navbar-form input[type="radio"]{margin-top:3px}.navbar-form .input-append,.navbar-form .input-prepend{margin-top:5px;white-space:nowrap}.navbar-form .input-append input,.navbar-form .input-prepend input{margin-top:0}.navbar-search{position:relative;float:left;margin-top:5px;margin-bottom:0}.navbar-search .search-query{padding:4px 14px;margin-bottom:0;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:13px;font-weight:normal;line-height:1;-webkit-border-radius:15px;-moz-border-radius:15px;border-radius:15px}.navbar-static-top{position:static;margin-bottom:0}.navbar-static-top .navbar-inner{-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.navbar-fixed-top,.navbar-fixed-bottom{position:fixed;right:0;left:0;z-index:1030;margin-bottom:0}.navbar-fixed-top .navbar-inner,.navbar-static-top .navbar-inner{border-width:0 0 1px}.navbar-fixed-bottom .navbar-inner{border-width:1px 0 0}.navbar-fixed-top .navbar-inner,.navbar-fixed-bottom .navbar-inner{padding-right:0;padding-left:0;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.navbar-static-top .container,.navbar-fixed-top .container,.navbar-fixed-bottom .container{width:940px}.navbar-fixed-top{top:0}.navbar-fixed-top .navbar-inner,.navbar-static-top .navbar-inner{-webkit-box-shadow:0 1px 10px rgba(0,0,0,0.1);-moz-box-shadow:0 1px 10px rgba(0,0,0,0.1);box-shadow:0 1px 10px rgba(0,0,0,0.1)}.navbar-fixed-bottom{bottom:0}.navbar-fixed-bottom .navbar-inner{-webkit-box-shadow:0 -1px 10px rgba(0,0,0,0.1);-moz-box-shadow:0 -1px 10px rgba(0,0,0,0.1);box-shadow:0 -1px 10px rgba(0,0,0,0.1)}.navbar .nav{position:relative;left:0;display:block;float:left;margin:0 10px 0 0}.navbar .nav.pull-right{float:right;margin-right:0}.navbar .nav>li{float:left}.navbar .nav>li>a{float:none;padding:10px 15px 10px;color:#777;text-decoration:none;text-shadow:0 1px 0 #fff}.navbar .nav .dropdown-toggle .caret{margin-top:8px}.navbar .nav>li>a:focus,.navbar .nav>li>a:hover{color:#333;text-decoration:none;background-color:transparent}.navbar .nav>.active>a,.navbar .nav>.active>a:hover,.navbar .nav>.active>a:focus{color:#555;text-decoration:none;background-color:#e5e5e5;-webkit-box-shadow:inset 0 3px 8px rgba(0,0,0,0.125);-moz-box-shadow:inset 0 3px 8px rgba(0,0,0,0.125);box-shadow:inset 0 3px 8px rgba(0,0,0,0.125)}.navbar .btn-navbar{display:none;float:right;padding:7px 10px;margin-right:5px;margin-left:5px;color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,0.25);background-color:#ededed;*background-color:#e5e5e5;background-image:-moz-linear-gradient(top,#f2f2f2,#e5e5e5);background-image:-webkit-gradient(linear,0 0,0 100%,from(#f2f2f2),to(#e5e5e5));background-image:-webkit-linear-gradient(top,#f2f2f2,#e5e5e5);background-image:-o-linear-gradient(top,#f2f2f2,#e5e5e5);background-image:linear-gradient(to bottom,#f2f2f2,#e5e5e5);background-repeat:repeat-x;border-color:#e5e5e5 #e5e5e5 #bfbfbf;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2f2f2',endColorstr='#ffe5e5e5',GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,0.1),0 1px 0 rgba(255,255,255,0.075);-moz-box-shadow:inset 0 1px 0 rgba(255,255,255,0.1),0 1px 0 rgba(255,255,255,0.075);box-shadow:inset 0 1px 0 rgba(255,255,255,0.1),0 1px 0 rgba(255,255,255,0.075)}.navbar .btn-navbar:hover,.navbar .btn-navbar:focus,.navbar .btn-navbar:active,.navbar .btn-navbar.active,.navbar .btn-navbar.disabled,.navbar .btn-navbar[disabled]{color:#fff;background-color:#e5e5e5;*background-color:#d9d9d9}.navbar .btn-navbar:active,.navbar .btn-navbar.active{background-color:#ccc \9}.navbar .btn-navbar .icon-bar{display:block;width:18px;height:2px;background-color:#f5f5f5;-webkit-border-radius:1px;-moz-border-radius:1px;border-radius:1px;-webkit-box-shadow:0 1px 0 rgba(0,0,0,0.25);-moz-box-shadow:0 1px 0 rgba(0,0,0,0.25);box-shadow:0 1px 0 rgba(0,0,0,0.25)}.btn-navbar .icon-bar+.icon-bar{margin-top:3px}.navbar .nav>li>.dropdown-menu:before{position:absolute;top:-7px;left:9px;display:inline-block;border-right:7px solid transparent;border-bottom:7px solid #ccc;border-left:7px solid transparent;border-bottom-color:rgba(0,0,0,0.2);content:''}.navbar .nav>li>.dropdown-menu:after{position:absolute;top:-6px;left:10px;display:inline-block;border-right:6px solid transparent;border-bottom:6px solid #fff;border-left:6px solid transparent;content:''}.navbar-fixed-bottom .nav>li>.dropdown-menu:before{top:auto;bottom:-7px;border-top:7px solid #ccc;border-bottom:0;border-top-color:rgba(0,0,0,0.2)}.navbar-fixed-bottom .nav>li>.dropdown-menu:after{top:auto;bottom:-6px;border-top:6px solid #fff;border-bottom:0}.navbar .nav li.dropdown>a:hover .caret,.navbar .nav li.dropdown>a:focus .caret{border-top-color:#333;border-bottom-color:#333}.navbar .nav li.dropdown.open>.dropdown-toggle,.navbar .nav li.dropdown.active>.dropdown-toggle,.navbar .nav li.dropdown.open.active>.dropdown-toggle{color:#555;background-color:#e5e5e5}.navbar .nav li.dropdown>.dropdown-toggle .caret{border-top-color:#777;border-bottom-color:#777}.navbar .nav li.dropdown.open>.dropdown-toggle .caret,.navbar .nav li.dropdown.active>.dropdown-toggle .caret,.navbar .nav li.dropdown.open.active>.dropdown-toggle .caret{border-top-color:#555;border-bottom-color:#555}.navbar .pull-right>li>.dropdown-menu,.navbar .nav>li>.dropdown-menu.pull-right{right:0;left:auto}.navbar .pull-right>li>.dropdown-menu:before,.navbar .nav>li>.dropdown-menu.pull-right:before{right:12px;left:auto}.navbar .pull-right>li>.dropdown-menu:after,.navbar .nav>li>.dropdown-menu.pull-right:after{right:13px;left:auto}.navbar .pull-right>li>.dropdown-menu .dropdown-menu,.navbar .nav>li>.dropdown-menu.pull-right .dropdown-menu{right:100%;left:auto;margin-right:-1px;margin-left:0;-webkit-border-radius:6px 0 6px 6px;-moz-border-radius:6px 0 6px 6px;border-radius:6px 0 6px 6px}.navbar-inverse .navbar-inner{background-color:#1b1b1b;background-image:-moz-linear-gradient(top,#222,#111);background-image:-webkit-gradient(linear,0 0,0 100%,from(#222),to(#111));background-image:-webkit-linear-gradient(top,#222,#111);background-image:-o-linear-gradient(top,#222,#111);background-image:linear-gradient(to bottom,#222,#111);background-repeat:repeat-x;border-color:#252525;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff222222',endColorstr='#ff111111',GradientType=0)}.navbar-inverse .brand,.navbar-inverse .nav>li>a{color:#999;text-shadow:0 -1px 0 rgba(0,0,0,0.25)}.navbar-inverse .brand:hover,.navbar-inverse .nav>li>a:hover,.navbar-inverse .brand:focus,.navbar-inverse .nav>li>a:focus{color:#fff}.navbar-inverse .brand{color:#999}.navbar-inverse .navbar-text{color:#999}.navbar-inverse .nav>li>a:focus,.navbar-inverse .nav>li>a:hover{color:#fff;background-color:transparent}.navbar-inverse .nav .active>a,.navbar-inverse .nav .active>a:hover,.navbar-inverse .nav .active>a:focus{color:#fff;background-color:#111}.navbar-inverse .navbar-link{color:#999}.navbar-inverse .navbar-link:hover,.navbar-inverse .navbar-link:focus{color:#fff}.navbar-inverse .divider-vertical{border-right-color:#222;border-left-color:#111}.navbar-inverse .nav li.dropdown.open>.dropdown-toggle,.navbar-inverse .nav li.dropdown.active>.dropdown-toggle,.navbar-inverse .nav li.dropdown.open.active>.dropdown-toggle{color:#fff;background-color:#111}.navbar-inverse .nav li.dropdown>a:hover .caret,.navbar-inverse .nav li.dropdown>a:focus .caret{border-top-color:#fff;border-bottom-color:#fff}.navbar-inverse .nav li.dropdown>.dropdown-toggle .caret{border-top-color:#999;border-bottom-color:#999}.navbar-inverse .nav li.dropdown.open>.dropdown-toggle .caret,.navbar-inverse .nav li.dropdown.active>.dropdown-toggle .caret,.navbar-inverse .nav li.dropdown.open.active>.dropdown-toggle .caret{border-top-color:#fff;border-bottom-color:#fff}.navbar-inverse .navbar-search .search-query{color:#fff;background-color:#515151;border-color:#111;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,0.1),0 1px 0 rgba(255,255,255,0.15);-moz-box-shadow:inset 0 1px 2px rgba(0,0,0,0.1),0 1px 0 rgba(255,255,255,0.15);box-shadow:inset 0 1px 2px rgba(0,0,0,0.1),0 1px 0 rgba(255,255,255,0.15);-webkit-transition:none;-moz-transition:none;-o-transition:none;transition:none}.navbar-inverse .navbar-search .search-query:-moz-placeholder{color:#ccc}.navbar-inverse .navbar-search .search-query:-ms-input-placeholder{color:#ccc}.navbar-inverse .navbar-search .search-query::-webkit-input-placeholder{color:#ccc}.navbar-inverse .navbar-search .search-query:focus,.navbar-inverse .navbar-search .search-query.focused{padding:5px 15px;color:#333;text-shadow:0 1px 0 #fff;background-color:#fff;border:0;outline:0;-webkit-box-shadow:0 0 3px rgba(0,0,0,0.15);-moz-box-shadow:0 0 3px rgba(0,0,0,0.15);box-shadow:0 0 3px rgba(0,0,0,0.15)}.navbar-inverse .btn-navbar{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,0.25);background-color:#0e0e0e;*background-color:#040404;background-image:-moz-linear-gradient(top,#151515,#040404);background-image:-webkit-gradient(linear,0 0,0 100%,from(#151515),to(#040404));background-image:-webkit-linear-gradient(top,#151515,#040404);background-image:-o-linear-gradient(top,#151515,#040404);background-image:linear-gradient(to bottom,#151515,#040404);background-repeat:repeat-x;border-color:#040404 #040404 #000;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff151515',endColorstr='#ff040404',GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.navbar-inverse .btn-navbar:hover,.navbar-inverse .btn-navbar:focus,.navbar-inverse .btn-navbar:active,.navbar-inverse .btn-navbar.active,.navbar-inverse .btn-navbar.disabled,.navbar-inverse .btn-navbar[disabled]{color:#fff;background-color:#040404;*background-color:#000}.navbar-inverse .btn-navbar:active,.navbar-inverse .btn-navbar.active{background-color:#000 \9}.breadcrumb{padding:8px 15px;margin:0 0 20px;list-style:none;background-color:#f5f5f5;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.breadcrumb>li{display:inline-block;*display:inline;text-shadow:0 1px 0 #fff;*zoom:1}.breadcrumb>li>.divider{padding:0 5px;color:#ccc}.breadcrumb>.active{color:#999}.pagination{margin:20px 0}.pagination ul{display:inline-block;*display:inline;margin-bottom:0;margin-left:0;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;*zoom:1;-webkit-box-shadow:0 1px 2px rgba(0,0,0,0.05);-moz-box-shadow:0 1px 2px rgba(0,0,0,0.05);box-shadow:0 1px 2px rgba(0,0,0,0.05)}.pagination ul>li{display:inline}.pagination ul>li>a,.pagination ul>li>span{float:left;padding:4px 12px;line-height:20px;text-decoration:none;background-color:#fff;border:1px solid #ddd;border-left-width:0}.pagination ul>li>a:hover,.pagination ul>li>a:focus,.pagination ul>.active>a,.pagination ul>.active>span{background-color:#f5f5f5}.pagination ul>.active>a,.pagination ul>.active>span{color:#999;cursor:default}.pagination ul>.disabled>span,.pagination ul>.disabled>a,.pagination ul>.disabled>a:hover,.pagination ul>.disabled>a:focus{color:#999;cursor:default;background-color:transparent}.pagination ul>li:first-child>a,.pagination ul>li:first-child>span{border-left-width:1px;-webkit-border-bottom-left-radius:4px;border-bottom-left-radius:4px;-webkit-border-top-left-radius:4px;border-top-left-radius:4px;-moz-border-radius-bottomleft:4px;-moz-border-radius-topleft:4px}.pagination ul>li:last-child>a,.pagination ul>li:last-child>span{-webkit-border-top-right-radius:4px;border-top-right-radius:4px;-webkit-border-bottom-right-radius:4px;border-bottom-right-radius:4px;-moz-border-radius-topright:4px;-moz-border-radius-bottomright:4px}.pagination-centered{text-align:center}.pagination-right{text-align:right}.pagination-large ul>li>a,.pagination-large ul>li>span{padding:11px 19px;font-size:17.5px}.pagination-large ul>li:first-child>a,.pagination-large ul>li:first-child>span{-webkit-border-bottom-left-radius:6px;border-bottom-left-radius:6px;-webkit-border-top-left-radius:6px;border-top-left-radius:6px;-moz-border-radius-bottomleft:6px;-moz-border-radius-topleft:6px}.pagination-large ul>li:last-child>a,.pagination-large ul>li:last-child>span{-webkit-border-top-right-radius:6px;border-top-right-radius:6px;-webkit-border-bottom-right-radius:6px;border-bottom-right-radius:6px;-moz-border-radius-topright:6px;-moz-border-radius-bottomright:6px}.pagination-mini ul>li:first-child>a,.pagination-small ul>li:first-child>a,.pagination-mini ul>li:first-child>span,.pagination-small ul>li:first-child>span{-webkit-border-bottom-left-radius:3px;border-bottom-left-radius:3px;-webkit-border-top-left-radius:3px;border-top-left-radius:3px;-moz-border-radius-bottomleft:3px;-moz-border-radius-topleft:3px}.pagination-mini ul>li:last-child>a,.pagination-small ul>li:last-child>a,.pagination-mini ul>li:last-child>span,.pagination-small ul>li:last-child>span{-webkit-border-top-right-radius:3px;border-top-right-radius:3px;-webkit-border-bottom-right-radius:3px;border-bottom-right-radius:3px;-moz-border-radius-topright:3px;-moz-border-radius-bottomright:3px}.pagination-small ul>li>a,.pagination-small ul>li>span{padding:2px 10px;font-size:11.9px}.pagination-mini ul>li>a,.pagination-mini ul>li>span{padding:0 6px;font-size:10.5px}.pager{margin:20px 0;text-align:center;list-style:none;*zoom:1}.pager:before,.pager:after{display:table;line-height:0;content:""}.pager:after{clear:both}.pager li{display:inline}.pager li>a,.pager li>span{display:inline-block;padding:5px 14px;background-color:#fff;border:1px solid #ddd;-webkit-border-radius:15px;-moz-border-radius:15px;border-radius:15px}.pager li>a:hover,.pager li>a:focus{text-decoration:none;background-color:#f5f5f5}.pager .next>a,.pager .next>span{float:right}.pager .previous>a,.pager .previous>span{float:left}.pager .disabled>a,.pager .disabled>a:hover,.pager .disabled>a:focus,.pager .disabled>span{color:#999;cursor:default;background-color:#fff}.modal-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1040;background-color:#000}.modal-backdrop.fade{opacity:0}.modal-backdrop,.modal-backdrop.fade.in{opacity:.8;filter:alpha(opacity=80)}.modal{position:fixed;top:10%;left:50%;z-index:1050;width:560px;margin-left:-280px;background-color:#fff;border:1px solid #999;border:1px solid rgba(0,0,0,0.3);*border:1px solid #999;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;outline:0;-webkit-box-shadow:0 3px 7px rgba(0,0,0,0.3);-moz-box-shadow:0 3px 7px rgba(0,0,0,0.3);box-shadow:0 3px 7px rgba(0,0,0,0.3);-webkit-background-clip:padding-box;-moz-background-clip:padding-box;background-clip:padding-box}.modal.fade{top:-25%;-webkit-transition:opacity .3s linear,top .3s ease-out;-moz-transition:opacity .3s linear,top .3s ease-out;-o-transition:opacity .3s linear,top .3s ease-out;transition:opacity .3s linear,top .3s ease-out}.modal.fade.in{top:10%}.modal-header{padding:9px 15px;border-bottom:1px solid #eee}.modal-header .close{margin-top:2px}.modal-header h3{margin:0;line-height:30px}.modal-body{position:relative;max-height:400px;padding:15px;overflow-y:auto}.modal-form{margin-bottom:0}.modal-footer{padding:14px 15px 15px;margin-bottom:0;text-align:right;background-color:#f5f5f5;border-top:1px solid #ddd;-webkit-border-radius:0 0 6px 6px;-moz-border-radius:0 0 6px 6px;border-radius:0 0 6px 6px;*zoom:1;-webkit-box-shadow:inset 0 1px 0 #fff;-moz-box-shadow:inset 0 1px 0 #fff;box-shadow:inset 0 1px 0 #fff}.modal-footer:before,.modal-footer:after{display:table;line-height:0;content:""}.modal-footer:after{clear:both}.modal-footer .btn+.btn{margin-bottom:0;margin-left:5px}.modal-footer .btn-group .btn+.btn{margin-left:-1px}.modal-footer .btn-block+.btn-block{margin-left:0}.tooltip{position:absolute;z-index:1030;display:block;font-size:11px;line-height:1.4;opacity:0;filter:alpha(opacity=0);visibility:visible}.tooltip.in{opacity:.8;filter:alpha(opacity=80)}.tooltip.top{padding:5px 0;margin-top:-3px}.tooltip.right{padding:0 5px;margin-left:3px}.tooltip.bottom{padding:5px 0;margin-top:3px}.tooltip.left{padding:0 5px;margin-left:-3px}.tooltip-inner{max-width:200px;padding:8px;color:#fff;text-align:center;text-decoration:none;background-color:#000;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.tooltip-arrow{position:absolute;width:0;height:0;border-color:transparent;border-style:solid}.tooltip.top .tooltip-arrow{bottom:0;left:50%;margin-left:-5px;border-top-color:#000;border-width:5px 5px 0}.tooltip.right .tooltip-arrow{top:50%;left:0;margin-top:-5px;border-right-color:#000;border-width:5px 5px 5px 0}.tooltip.left .tooltip-arrow{top:50%;right:0;margin-top:-5px;border-left-color:#000;border-width:5px 0 5px 5px}.tooltip.bottom .tooltip-arrow{top:0;left:50%;margin-left:-5px;border-bottom-color:#000;border-width:0 5px 5px}.popover{position:absolute;top:0;left:0;z-index:1010;display:none;max-width:276px;padding:1px;text-align:left;white-space:normal;background-color:#fff;border:1px solid #ccc;border:1px solid rgba(0,0,0,0.2);-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;-webkit-box-shadow:0 5px 10px rgba(0,0,0,0.2);-moz-box-shadow:0 5px 10px rgba(0,0,0,0.2);box-shadow:0 5px 10px rgba(0,0,0,0.2);-webkit-background-clip:padding-box;-moz-background-clip:padding;background-clip:padding-box}.popover.top{margin-top:-10px}.popover.right{margin-left:10px}.popover.bottom{margin-top:10px}.popover.left{margin-left:-10px}.popover-title{padding:8px 14px;margin:0;font-size:14px;font-weight:normal;line-height:18px;background-color:#f7f7f7;border-bottom:1px solid #ebebeb;-webkit-border-radius:5px 5px 0 0;-moz-border-radius:5px 5px 0 0;border-radius:5px 5px 0 0}.popover-title:empty{display:none}.popover-content{padding:9px 14px}.popover .arrow,.popover .arrow:after{position:absolute;display:block;width:0;height:0;border-color:transparent;border-style:solid}.popover .arrow{border-width:11px}.popover .arrow:after{border-width:10px;content:""}.popover.top .arrow{bottom:-11px;left:50%;margin-left:-11px;border-top-color:#999;border-top-color:rgba(0,0,0,0.25);border-bottom-width:0}.popover.top .arrow:after{bottom:1px;margin-left:-10px;border-top-color:#fff;border-bottom-width:0}.popover.right .arrow{top:50%;left:-11px;margin-top:-11px;border-right-color:#999;border-right-color:rgba(0,0,0,0.25);border-left-width:0}.popover.right .arrow:after{bottom:-10px;left:1px;border-right-color:#fff;border-left-width:0}.popover.bottom .arrow{top:-11px;left:50%;margin-left:-11px;border-bottom-color:#999;border-bottom-color:rgba(0,0,0,0.25);border-top-width:0}.popover.bottom .arrow:after{top:1px;margin-left:-10px;border-bottom-color:#fff;border-top-width:0}.popover.left .arrow{top:50%;right:-11px;margin-top:-11px;border-left-color:#999;border-left-color:rgba(0,0,0,0.25);border-right-width:0}.popover.left .arrow:after{right:1px;bottom:-10px;border-left-color:#fff;border-right-width:0}.thumbnails{margin-left:-20px;list-style:none;*zoom:1}.thumbnails:before,.thumbnails:after{display:table;line-height:0;content:""}.thumbnails:after{clear:both}.row-fluid .thumbnails{margin-left:0}.thumbnails>li{float:left;margin-bottom:20px;margin-left:20px}.thumbnail{display:block;padding:4px;line-height:20px;border:1px solid #ddd;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;-webkit-box-shadow:0 1px 3px rgba(0,0,0,0.055);-moz-box-shadow:0 1px 3px rgba(0,0,0,0.055);box-shadow:0 1px 3px rgba(0,0,0,0.055);-webkit-transition:all .2s ease-in-out;-moz-transition:all .2s ease-in-out;-o-transition:all .2s ease-in-out;transition:all .2s ease-in-out}a.thumbnail:hover,a.thumbnail:focus{border-color:#08c;-webkit-box-shadow:0 1px 4px rgba(0,105,214,0.25);-moz-box-shadow:0 1px 4px rgba(0,105,214,0.25);box-shadow:0 1px 4px rgba(0,105,214,0.25)}.thumbnail>img{display:block;max-width:100%;margin-right:auto;margin-left:auto}.thumbnail .caption{padding:9px;color:#555}.media,.media-body{overflow:hidden;*overflow:visible;zoom:1}.media,.media .media{margin-top:15px}.media:first-child{margin-top:0}.media-object{display:block}.media-heading{margin:0 0 5px}.media>.pull-left{margin-right:10px}.media>.pull-right{margin-left:10px}.media-list{margin-left:0;list-style:none}.label,.badge{display:inline-block;padding:2px 4px;font-size:11.844px;font-weight:bold;line-height:14px;color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,0.25);white-space:nowrap;vertical-align:baseline;background-color:#999}.label{-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.badge{padding-right:9px;padding-left:9px;-webkit-border-radius:9px;-moz-border-radius:9px;border-radius:9px}.label:empty,.badge:empty{display:none}a.label:hover,a.label:focus,a.badge:hover,a.badge:focus{color:#fff;text-decoration:none;cursor:pointer}.label-important,.badge-important{background-color:#b94a48}.label-important[href],.badge-important[href]{background-color:#953b39}.label-warning,.badge-warning{background-color:#f89406}.label-warning[href],.badge-warning[href]{background-color:#c67605}.label-success,.badge-success{background-color:#468847}.label-success[href],.badge-success[href]{background-color:#356635}.label-info,.badge-info{background-color:#3a87ad}.label-info[href],.badge-info[href]{background-color:#2d6987}.label-inverse,.badge-inverse{background-color:#333}.label-inverse[href],.badge-inverse[href]{background-color:#1a1a1a}.btn .label,.btn .badge{position:relative;top:-1px}.btn-mini .label,.btn-mini .badge{top:0}@-webkit-keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}@-moz-keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}@-ms-keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}@-o-keyframes progress-bar-stripes{from{background-position:0 0}to{background-position:40px 0}}@keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}.progress{height:20px;margin-bottom:20px;overflow:hidden;background-color:#f7f7f7;background-image:-moz-linear-gradient(top,#f5f5f5,#f9f9f9);background-image:-webkit-gradient(linear,0 0,0 100%,from(#f5f5f5),to(#f9f9f9));background-image:-webkit-linear-gradient(top,#f5f5f5,#f9f9f9);background-image:-o-linear-gradient(top,#f5f5f5,#f9f9f9);background-image:linear-gradient(to bottom,#f5f5f5,#f9f9f9);background-repeat:repeat-x;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5',endColorstr='#fff9f9f9',GradientType=0);-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,0.1);-moz-box-shadow:inset 0 1px 2px rgba(0,0,0,0.1);box-shadow:inset 0 1px 2px rgba(0,0,0,0.1)}.progress .bar{float:left;width:0;height:100%;font-size:12px;color:#fff;text-align:center;text-shadow:0 -1px 0 rgba(0,0,0,0.25);background-color:#0e90d2;background-image:-moz-linear-gradient(top,#149bdf,#0480be);background-image:-webkit-gradient(linear,0 0,0 100%,from(#149bdf),to(#0480be));background-image:-webkit-linear-gradient(top,#149bdf,#0480be);background-image:-o-linear-gradient(top,#149bdf,#0480be);background-image:linear-gradient(to bottom,#149bdf,#0480be);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff149bdf',endColorstr='#ff0480be',GradientType=0);-webkit-box-shadow:inset 0 -1px 0 rgba(0,0,0,0.15);-moz-box-shadow:inset 0 -1px 0 rgba(0,0,0,0.15);box-shadow:inset 0 -1px 0 rgba(0,0,0,0.15);-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;-webkit-transition:width .6s ease;-moz-transition:width .6s ease;-o-transition:width .6s ease;transition:width .6s ease}.progress .bar+.bar{-webkit-box-shadow:inset 1px 0 0 rgba(0,0,0,0.15),inset 0 -1px 0 rgba(0,0,0,0.15);-moz-box-shadow:inset 1px 0 0 rgba(0,0,0,0.15),inset 0 -1px 0 rgba(0,0,0,0.15);box-shadow:inset 1px 0 0 rgba(0,0,0,0.15),inset 0 -1px 0 rgba(0,0,0,0.15)}.progress-striped .bar{background-color:#149bdf;background-image:-webkit-gradient(linear,0 100%,100% 0,color-stop(0.25,rgba(255,255,255,0.15)),color-stop(0.25,transparent),color-stop(0.5,transparent),color-stop(0.5,rgba(255,255,255,0.15)),color-stop(0.75,rgba(255,255,255,0.15)),color-stop(0.75,transparent),to(transparent));background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:-moz-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);-webkit-background-size:40px 40px;-moz-background-size:40px 40px;-o-background-size:40px 40px;background-size:40px 40px}.progress.active .bar{-webkit-animation:progress-bar-stripes 2s linear infinite;-moz-animation:progress-bar-stripes 2s linear infinite;-ms-animation:progress-bar-stripes 2s linear infinite;-o-animation:progress-bar-stripes 2s linear infinite;animation:progress-bar-stripes 2s linear infinite}.progress-danger .bar,.progress .bar-danger{background-color:#dd514c;background-image:-moz-linear-gradient(top,#ee5f5b,#c43c35);background-image:-webkit-gradient(linear,0 0,0 100%,from(#ee5f5b),to(#c43c35));background-image:-webkit-linear-gradient(top,#ee5f5b,#c43c35);background-image:-o-linear-gradient(top,#ee5f5b,#c43c35);background-image:linear-gradient(to bottom,#ee5f5b,#c43c35);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffee5f5b',endColorstr='#ffc43c35',GradientType=0)}.progress-danger.progress-striped .bar,.progress-striped .bar-danger{background-color:#ee5f5b;background-image:-webkit-gradient(linear,0 100%,100% 0,color-stop(0.25,rgba(255,255,255,0.15)),color-stop(0.25,transparent),color-stop(0.5,transparent),color-stop(0.5,rgba(255,255,255,0.15)),color-stop(0.75,rgba(255,255,255,0.15)),color-stop(0.75,transparent),to(transparent));background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:-moz-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent)}.progress-success .bar,.progress .bar-success{background-color:#5eb95e;background-image:-moz-linear-gradient(top,#62c462,#57a957);background-image:-webkit-gradient(linear,0 0,0 100%,from(#62c462),to(#57a957));background-image:-webkit-linear-gradient(top,#62c462,#57a957);background-image:-o-linear-gradient(top,#62c462,#57a957);background-image:linear-gradient(to bottom,#62c462,#57a957);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff62c462',endColorstr='#ff57a957',GradientType=0)}.progress-success.progress-striped .bar,.progress-striped .bar-success{background-color:#62c462;background-image:-webkit-gradient(linear,0 100%,100% 0,color-stop(0.25,rgba(255,255,255,0.15)),color-stop(0.25,transparent),color-stop(0.5,transparent),color-stop(0.5,rgba(255,255,255,0.15)),color-stop(0.75,rgba(255,255,255,0.15)),color-stop(0.75,transparent),to(transparent));background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:-moz-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent)}.progress-info .bar,.progress .bar-info{background-color:#4bb1cf;background-image:-moz-linear-gradient(top,#5bc0de,#339bb9);background-image:-webkit-gradient(linear,0 0,0 100%,from(#5bc0de),to(#339bb9));background-image:-webkit-linear-gradient(top,#5bc0de,#339bb9);background-image:-o-linear-gradient(top,#5bc0de,#339bb9);background-image:linear-gradient(to bottom,#5bc0de,#339bb9);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de',endColorstr='#ff339bb9',GradientType=0)}.progress-info.progress-striped .bar,.progress-striped .bar-info{background-color:#5bc0de;background-image:-webkit-gradient(linear,0 100%,100% 0,color-stop(0.25,rgba(255,255,255,0.15)),color-stop(0.25,transparent),color-stop(0.5,transparent),color-stop(0.5,rgba(255,255,255,0.15)),color-stop(0.75,rgba(255,255,255,0.15)),color-stop(0.75,transparent),to(transparent));background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:-moz-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent)}.progress-warning .bar,.progress .bar-warning{background-color:#faa732;background-image:-moz-linear-gradient(top,#fbb450,#f89406);background-image:-webkit-gradient(linear,0 0,0 100%,from(#fbb450),to(#f89406));background-image:-webkit-linear-gradient(top,#fbb450,#f89406);background-image:-o-linear-gradient(top,#fbb450,#f89406);background-image:linear-gradient(to bottom,#fbb450,#f89406);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffbb450',endColorstr='#fff89406',GradientType=0)}.progress-warning.progress-striped .bar,.progress-striped .bar-warning{background-color:#fbb450;background-image:-webkit-gradient(linear,0 100%,100% 0,color-stop(0.25,rgba(255,255,255,0.15)),color-stop(0.25,transparent),color-stop(0.5,transparent),color-stop(0.5,rgba(255,255,255,0.15)),color-stop(0.75,rgba(255,255,255,0.15)),color-stop(0.75,transparent),to(transparent));background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:-moz-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent)}.accordion{margin-bottom:20px}.accordion-group{margin-bottom:2px;border:1px solid #e5e5e5;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.accordion-heading{border-bottom:0}.accordion-heading .accordion-toggle{display:block;padding:8px 15px}.accordion-toggle{cursor:pointer}.accordion-inner{padding:9px 15px;border-top:1px solid #e5e5e5}.carousel{position:relative;margin-bottom:20px;line-height:1}.carousel-inner{position:relative;width:100%;overflow:hidden}.carousel-inner>.item{position:relative;display:none;-webkit-transition:.6s ease-in-out left;-moz-transition:.6s ease-in-out left;-o-transition:.6s ease-in-out left;transition:.6s ease-in-out left}.carousel-inner>.item>img,.carousel-inner>.item>a>img{display:block;line-height:1}.carousel-inner>.active,.carousel-inner>.next,.carousel-inner>.prev{display:block}.carousel-inner>.active{left:0}.carousel-inner>.next,.carousel-inner>.prev{position:absolute;top:0;width:100%}.carousel-inner>.next{left:100%}.carousel-inner>.prev{left:-100%}.carousel-inner>.next.left,.carousel-inner>.prev.right{left:0}.carousel-inner>.active.left{left:-100%}.carousel-inner>.active.right{left:100%}.carousel-control{position:absolute;top:40%;left:15px;width:40px;height:40px;margin-top:-20px;font-size:60px;font-weight:100;line-height:30px;color:#fff;text-align:center;background:#222;border:3px solid #fff;-webkit-border-radius:23px;-moz-border-radius:23px;border-radius:23px;opacity:.5;filter:alpha(opacity=50)}.carousel-control.right{right:15px;left:auto}.carousel-control:hover,.carousel-control:focus{color:#fff;text-decoration:none;opacity:.9;filter:alpha(opacity=90)}.carousel-indicators{position:absolute;top:15px;right:15px;z-index:5;margin:0;list-style:none}.carousel-indicators li{display:block;float:left;width:10px;height:10px;margin-left:5px;text-indent:-999px;background-color:#ccc;background-color:rgba(255,255,255,0.25);border-radius:5px}.carousel-indicators .active{background-color:#fff}.carousel-caption{position:absolute;right:0;bottom:0;left:0;padding:15px;background:#333;background:rgba(0,0,0,0.75)}.carousel-caption h4,.carousel-caption p{line-height:20px;color:#fff}.carousel-caption h4{margin:0 0 5px}.carousel-caption p{margin-bottom:0}.hero-unit{padding:60px;margin-bottom:30px;font-size:18px;font-weight:200;line-height:30px;color:inherit;background-color:#eee;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px}.hero-unit h1{margin-bottom:0;font-size:60px;line-height:1;letter-spacing:-1px;color:inherit}.hero-unit li{line-height:30px}.pull-right{float:right}.pull-left{float:left}.hide{display:none}.show{display:block}.invisible{visibility:hidden}.affix{position:fixed}

  /* Pretty printing styles. Used with prettify.js. */
/* Vim sunburst theme by David Leibovic */
pre .str {
  color: #65B042;
}
/* string  - green */
pre .kwd {
  color: #E28964;
}
/* keyword - dark pink */
pre .com {
  color: #AEAEAE;
  font-style: italic;
}
/* comment - gray */
pre .typ {
  color: #89bdff;
}
/* type - light blue */
pre .lit {
  color: #3387CC;
}
/* literal - blue */
pre .pun {
  color: #fff;
}
/* punctuation - white */
pre .pln {
  color: #fff;
}
/* plaintext - white */
pre .tag {
  color: #89bdff;
}
/* html/xml tag    - light blue */
pre .atn {
  color: #bdb76b;
}
/* html/xml attribute name  - khaki */
pre .atv {
  color: #65B042;
}
/* html/xml attribute value - green */
pre .dec {
  color: #3387CC;
}
/* decimal - blue */
/* Specify class=linenums on a pre to get line numbering */
ol.linenums {
  margin-top: 0;
  margin-bottom: 0;
  color: #AEAEAE;
}
/* IE indents via margin-left */
li.L0,
li.L1,
li.L2,
li.L3,
li.L5,
li.L6,
li.L7,
li.L8 {
  list-style-type: none;
}
/* Alternate shading for lines */
@media print {
  pre .str {
    color: #060;
  }
  pre .kwd {
    color: #006;
    font-weight: bold;
  }
  pre .com {
    color: #600;
    font-style: italic;
  }
  pre .typ {
    color: #404;
    font-weight: bold;
  }
  pre .lit {
    color: #044;
  }
  pre .pun {
    color: #440;
  }
  pre .pln {
    color: #000;
  }
  pre .tag {
    color: #006;
    font-weight: bold;
  }
  pre .atn {
    color: #404;
  }
  pre .atv {
    color: #060;
  }
}
  /* ------------------------------------------------------------------------------------------
 * Content
 * ------------------------------------------------------------------------------------------ */

@import url('https://fonts.googleapis.com/css?family=Source+Code+Pro');
* {
  font-family: 'Source Code Pro', sans-serif;
}
body {
  min-width: 980px;
}

body, p, a, div, th, td {
  font-family: "Source Sans Pro", sans-serif;
  font-weight: 400;
  font-size: 16px;
  text-shadow: none !important;
}

td.code {
  font-size: 14px;
  font-family: "Source Code Pro", monospace;
  font-style: normal;
  font-weight: 400;
}

#content {
  padding-top: 16px;
  z-Index: -1;
  margin-left: 270px;
}

p {
  color: #808080;
}

h1 {
  font-family: "Source Sans Pro Semibold", sans-serif;
  font-weight: normal;
  font-size: 44px;
  line-height: 50px;
  margin: 0 0 10px 0;
  padding: 0;
}

h2 {
  font-family: "Source Sans Pro", sans-serif;
  font-weight: normal;
  font-size: 24px;
  line-height: 40px;
  margin: 0 0 20px 0;
  padding: 0;
}

section {
  border-top: 1px solid #ebebeb;
  padding: 30px 0;
}

section h1 {
  font-family: "Source Sans Pro", sans-serif;
  font-weight: 700;
  font-size: 32px;
  line-height: 40px;
  padding-bottom: 14px;
  margin: 0 0 20px 0;
  padding: 0;
}

article {
  padding: 14px 0 30px 0;
}

article h1 {
  font-family: "Source Sans Pro Bold", sans-serif;
  font-weight: 600;
  font-size: 24px;
  line-height: 26px;
}

article h2 {
  font-family: "Source Sans Pro", sans-serif;
  font-weight: 600;
  font-size: 18px;
  line-height: 24px;
  margin: 0 0 10px 0;
}

article h3 {
  font-family: "Source Sans Pro", sans-serif;
  font-weight: 600;
  font-size: 16px;
  line-height: 18px;
  margin: 0 0 10px 0;
}

article h4 {
  font-family: "Source Sans Pro", sans-serif;
  font-weight: 600;
  font-size: 14px;
  line-height: 16px;
  margin: 0 0 8px 0;
}

table {
  border-collapse: collapse;
  width: 100%;
  margin: 0 0 20px 0;
}

th {
  background-color: #f5f5f5;
  text-align: left;
  font-family: "Source Sans Pro", sans-serif;
  font-weight: 700;
  padding: 4px 8px;
  border: #e0e0e0 1px solid;
}

td {
  vertical-align: top;
  padding: 2px 8px;
  border: #e0e0e0 1px solid;
}

#generator .content {
  color: #b0b0b0;
  border-top: 1px solid #ebebeb;
  padding: 10px 0;
}

.label-optional {
  float: right;
}

.open-left {
  right: 0;
  left: auto;
}

/* ------------------------------------------------------------------------------------------
 * apidoc - intro
 * ------------------------------------------------------------------------------------------ */

#apidoc .apidoc {
  border-top: 1px solid #ebebeb;
  padding: 30px 0;
}

#apidoc h1 {
  font-family: "Source Sans Pro", sans-serif;
  font-weight: 700;
  font-size: 32px;
  line-height: 40px;
  padding-bottom: 14px;
  margin: 0 0 20px 0;
  padding: 0;
}

#apidoc h2 {
  font-family: "Source Sans Pro Bold", sans-serif;
  font-weight: 600;
  font-size: 22px;
  line-height: 26px;
  padding-top: 14px;
}

/* ------------------------------------------------------------------------------------------
 * pre / code
 * ------------------------------------------------------------------------------------------ */
pre {
  background-color: #292b36;
  color: #ffffff;
  padding: 10px;
  border-radius: 6px;
  position: relative;
  margin: 10px 0 20px 0;
}

code.language-text {
  word-wrap: break-word;
}

pre.language-json {
  overflow: auto;
}

pre.language-html {
  margin: 40px 0 20px 0;
}

pre.language-html:before {
  content: attr(data-type);
  position: absolute;
  top: -30px;
  left: 0;
  font-family: "Source Sans Pro", sans-serif;
  font-weight: 600;
  font-size: 15px;
  display: inline-block;
  padding: 2px 5px;
  border-radius: 6px;
  text-transform: uppercase;
  background-color: #3387CC;
  color: #ffffff;
}

pre.language-html[data-type="get"]:before {
  background-color: green;
}

pre.language-html[data-type="put"]:before {
  background-color: #e5c500;
}

pre.language-html[data-type="post"]:before {
  background-color: #4070ec;
}

pre.language-html[data-type="delete"]:before {
  background-color: #ed0039;
}

pre.language-api .str {
  color: #ffffff;
}

pre.language-api .pln,
pre.language-api .pun {
  color: #65B042;
}

pre code {
  display: block;
  font-size: 14px;
  font-family: "Source Code Pro", monospace;
  font-style: normal;
  font-weight: 400;
}

pre code.sample-request-response-json {
  white-space: pre-wrap;
  max-height: 500px;
  overflow: auto;
}

/* ------------------------------------------------------------------------------------------
 * Sidenav
 * ------------------------------------------------------------------------------------------ */
.sidenav {
  width: 228px;
  margin: 0;
  padding: 20px;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  overflow-x: hidden;
  overflow-y: auto;
  background-color: #f5f5f5;
  z-index: 10;
}

.sidenav > li > a {
  display: block;
  width: 192px;
  margin: 0;
  padding: 2px 11px;
  border: 0;
  border-left: transparent 4px solid;
  border-right: transparent 4px solid;
  font-family: "Source Sans Pro", sans-serif;
  font-weight: 400;
  font-size: 14px;
}

.sidenav > li.nav-header > a {
  padding: 5px 15px;
  border: 1px solid #e5e5e5;
  width: 190px;
  font-family: "Source Sans Pro", sans-serif;
  font-weight: 700;
  font-size: 16px;
  background-color: #4c8eca;
  color: #fff;
}

.sidenav > li.nav-header.active > a {
  background-color: #4c8eca;
  color: #fff;
}


00427D

.sidenav > .active > a {
  position: relative;
  z-index: 2;
}

.sidenav > li > a:hover {
  background-color: #ffffff;
}

.sidenav > li.has-modifications a {
  border-right: #60d060 4px solid;
}

.sidenav > li.is-new a {
  border-left: #e5e5e5 4px solid;
}



/* ------------------------------------------------------------------------------------------
 * Tabs
 * ------------------------------------------------------------------------------------------ */
ul.nav-tabs {
  margin: 0;
}

/* ------------------------------------------------------------------------------------------
 * Print
 * ------------------------------------------------------------------------------------------ */

@media print {

  #sidenav,
  #version,
  #versions,
  section .version,
  section .versions {
    display: none;
  }

  #content {
    margin-left: 0;
  }

  a {
    text-decoration: none;
    color: inherit;
  }

  a:after {
    content: " [" attr(href) "] ";
  }

  p {
    color: #000000
  }

  pre {
    background-color: #ffffff;
    color: #000000;
    padding: 10px;
    border: #808080 1px solid;
    border-radius: 6px;
    position: relative;
    margin: 10px 0 20px 0;
  }

} /* /@media print */


.doc-chapter
{
display:none;
background-color: #eee;
border-radius: 1px;
padding: 10px;
margin-bottom: 20px;
}































/*!
 * json-schema-view-js
 * https://github.com/mohsen1/json-schema-view-js#readme
 * Version: 0.4.1 - 2015-11-12T17:19:27.615Z
 * License: MIT
 */.json-schema-view .toggle-handle:after,.json-schema-view.json-schema-view-dark .toggle-handle:after,json-schema-view .toggle-handle:after,json-schema-view[json-schema-view-dark] .toggle-handle:after{content:"\25BC"}.json-schema-view .title,.json-schema-view.json-schema-view-dark .title,json-schema-view .title,json-schema-view[json-schema-view-dark] .title{font-weight:700;cursor:pointer}.json-schema-view,json-schema-view{font-family:monospace;font-size:0;display:table-cell}.json-schema-view>*,json-schema-view>*{font-size:14px}.json-schema-view .toggle-handle,json-schema-view .toggle-handle{cursor:pointer;margin:auto .3em;font-size:10px;display:inline-block;transform-origin:50% 40%;transition:transform 150ms ease-in}.json-schema-view .toggle-handle,.json-schema-view .toggle-handle:hover,json-schema-view .toggle-handle,json-schema-view .toggle-handle:hover{text-decoration:none;color:#333}.json-schema-view .description,json-schema-view .description{color:gray;font-style:italic}
   .pattern {
    color: blue;
  }
  .default {
    color: black;
  }
  .required {
    color:black;
  }
  .json-schema-view .title,.json-schema-view .title:hover,json-schema-view .title,json-schema-view .title:hover{text-decoration:none;color:#333}.json-schema-view .brace,.json-schema-view .bracket,.json-schema-view .title,json-schema-view .brace,json-schema-view .bracket,json-schema-view .title{color:#333}.json-schema-view .property,json-schema-view .property{font-size:0;display:table-row}.json-schema-view .property>*,json-schema-view .property>*{font-size:14px;padding:.2em}.json-schema-view .name,json-schema-view .name{color:#00f;display:table-cell;vertical-align:top}.json-schema-view .type,json-schema-view .type{color:green}.json-schema-view .type-any,json-schema-view .type-any{color:#33f}.json-schema-view .required,json-schema-view .required{color:red}.json-schema-view .inner,json-schema-view .inner{padding-left:18px}.json-schema-view.collapsed .description,.json-schema-view.collapsed .property,json-schema-view.collapsed .description,json-schema-view.collapsed .property{display:none}.json-schema-view.collapsed .closeing.brace,json-schema-view.collapsed .closeing.brace{display:inline-block}.json-schema-view.collapsed .toggle-handle,json-schema-view.collapsed .toggle-handle{transform:rotate(-90deg)}.json-schema-view.json-schema-view-dark,json-schema-view[json-schema-view-dark]{font-family:monospace;font-size:0;display:table-cell}.json-schema-view.json-schema-view-dark>*,json-schema-view[json-schema-view-dark]>*{font-size:14px}.json-schema-view.json-schema-view-dark .toggle-handle,json-schema-view[json-schema-view-dark] .toggle-handle{cursor:pointer;margin:auto .3em;font-size:10px;display:inline-block;transform-origin:50% 40%;transition:transform 150ms ease-in}.json-schema-view.json-schema-view-dark .toggle-handle,.json-schema-view.json-schema-view-dark .toggle-handle:hover,json-schema-view[json-schema-view-dark] .toggle-handle,json-schema-view[json-schema-view-dark] .toggle-handle:hover{text-decoration:none;color:#eee}.json-schema-view.json-schema-view-dark .description,json-schema-view[json-schema-view-dark] .description{color:gray;font-style:italic}.json-schema-view.json-schema-view-dark .title,.json-schema-view.json-schema-view-dark .title:hover,json-schema-view[json-schema-view-dark] .title,json-schema-view[json-schema-view-dark] .title:hover{text-decoration:none;color:#eee}.json-schema-view.json-schema-view-dark .brace,.json-schema-view.json-schema-view-dark .bracket,.json-schema-view.json-schema-view-dark .title,json-schema-view[json-schema-view-dark] .brace,json-schema-view[json-schema-view-dark] .bracket,json-schema-view[json-schema-view-dark] .title{color:#eee}.json-schema-view.json-schema-view-dark .property,json-schema-view[json-schema-view-dark] .property{font-size:0;display:table-row}.json-schema-view.json-schema-view-dark .property>*,json-schema-view[json-schema-view-dark] .property>*{font-size:14px;padding:.2em}.json-schema-view.json-schema-view-dark .name,json-schema-view[json-schema-view-dark] .name{color:#add8e6;display:table-cell;vertical-align:top}.json-schema-view.json-schema-view-dark .type,json-schema-view[json-schema-view-dark] .type{color:#90ee90}.json-schema-view.json-schema-view-dark .type-any,json-schema-view[json-schema-view-dark] .type-any{color:#d4ebf2}.json-schema-view.json-schema-view-dark .required,json-schema-view[json-schema-view-dark] .required{color:#fe0000}.json-schema-view.json-schema-view-dark .inner,json-schema-view[json-schema-view-dark] .inner{padding-left:18px}.json-schema-view.json-schema-view-dark.collapsed .description,.json-schema-view.json-schema-view-dark.collapsed .property,json-schema-view[json-schema-view-dark].collapsed .description,json-schema-view[json-schema-view-dark].collapsed .property{display:none}.json-schema-view.json-schema-view-dark.collapsed .closeing.brace,json-schema-view[json-schema-view-dark].collapsed .closeing.brace{display:inline-block}.json-schema-view.json-schema-view-dark.collapsed .toggle-handle,json-schema-view[json-schema-view-dark].collapsed .toggle-handle{transform:rotate(-90deg)}

  </style>
</head>
<body>
<script>
    // Script section to load models into a JS Var
    var defs = {}
        defs["3gppServiceActivation"] = {
  "type" : "object",
  "properties" : {
    "serviceInstanceID" : {
      "type" : "string",
      "description" : "ID of the service to be activated/deactivated"
    },
    "globalSubscriberId" : {
      "type" : "string"
    },
    "subscriptionServiceType" : {
      "type" : "string",
      "description" : "Service type for the subscription. For E.G :5G"
    },
    "networkType" : {
      "type" : "string",
      "description" : "Network type. For E.G :AN/CN/TN"
    },
    "additionalProperties" : {
      "type" : "object",
      "description" : "Map of additional properties required for service activation/deactivation",
      "properties" : { }
    }
  },
  "description" : "This describes the request body for 3gpp service activation/deactivation"
};
        defs["3gppServiceResponse"] = {
  "type" : "object",
  "properties" : {
    "jobId" : {
      "type" : "string",
      "description" : "Job ID to be used to identify the status of the job"
    },
    "status" : {
      "type" : "string",
      "description" : "status of the job"
    },
    "statusDescription" : {
      "type" : "object",
      "description" : "Description on status in case of erroneous response",
      "properties" : { }
    }
  },
  "description" : "This describes the response for 3gpp services"
};
        defs["Allocate3gppService"] = {
  "type" : "object",
  "properties" : {
    "name" : {
      "type" : "string",
      "description" : "Name of the service to allocate"
    },
    "modelInvariantUuid" : {
      "type" : "string",
      "description" : "Model Invariant UUID corresponding to the service. For E.g :  NSST Model invariant uuid in case of NSSI creation"
    },
    "modelUuid" : {
      "type" : "string",
      "description" : "Model UUID corresponding to the service. For E.g :  NSST Model uuid in case of NSSI creation"
    },
    "globalSubscriberId" : {
      "type" : "string"
    },
    "subscriptionServiceType" : {
      "type" : "string",
      "description" : "Service type for the subscription. For E.G :5G"
    },
    "networkType" : {
      "type" : "string",
      "description" : "Network type. For E.G :AN/CN/TN"
    },
    "additionalProperties" : {
      "type" : "object",
      "description" : "Map of additional properties required for service allocation",
      "properties" : { }
    }
  },
  "description" : "This describes the request body for 3gpp service allocation"
};
        defs["DeAllocate3gppService"] = {
  "type" : "object",
  "properties" : {
    "serviceInstanceID" : {
      "type" : "string",
      "description" : "ID of the service to terminate"
    },
    "globalSubscriberId" : {
      "type" : "string"
    },
    "subscriptionServiceType" : {
      "type" : "string",
      "description" : "Service type for the subscription. For E.G :5G"
    },
    "networkType" : {
      "type" : "string",
      "description" : "Network type. For E.G :AN/CN/TN"
    },
    "additionalProperties" : {
      "type" : "object",
      "description" : "Map of additional properties required for service deallocation",
      "properties" : { }
    }
  },
  "description" : "This describes the request body for 3gpp service Termination/Deallocation"
};
        defs["Modify3gppService"] = {
  "type" : "object",
  "properties" : {
    "name" : {
      "type" : "string",
      "description" : "Name of the service to modify"
    },
    "serviceInstanceID" : {
      "type" : "string",
      "description" : "ID of the service to modify"
    },
    "globalSubscriberId" : {
      "type" : "string"
    },
    "subscriptionServiceType" : {
      "type" : "string",
      "description" : "Service type for the subscription. For E.G :5G"
    },
    "networkType" : {
      "type" : "string",
      "description" : "Network type. For E.G :AN/CN/TN"
    },
    "additionalProperties" : {
      "type" : "object",
      "description" : "Map of additional properties required for service modification",
      "properties" : { }
    }
  },
  "description" : "This describes the request body for 3gpp service modification"
};
        defs["PNFCustomWorkflowExecution"] = {
  "type" : "object",
  "properties" : {
    "requestInfo" : {
      "$ref" : "#/definitions/ServiceLevelWorkflowExecution_requestInfo"
    },
    "modelInfo" : {
      "$ref" : "#/definitions/ServiceLevelWorkflowExecution_modelInfo"
    },
    "requestParameters" : {
      "$ref" : "#/definitions/ServiceLevelWorkflowExecution_requestParameters"
    },
    "subscriberInfo" : {
      "$ref" : "#/definitions/ServiceLevelWorkflowExecution_subscriberInfo"
    },
    "project" : {
      "$ref" : "#/definitions/ServiceLevelWorkflowExecution_project"
    },
    "owningEntity" : {
      "$ref" : "#/definitions/ServiceLevelWorkflowExecution_owningEntity"
    }
  },
  "description" : "This describes the request body of PNF custom workflow execution"
};
        defs["QuerySubnetCapability"] = {
  "type" : "object",
  "properties" : {
    "subnetTypes" : {
      "type" : "array",
      "items" : {
        "$ref" : "#/definitions/SubnetTypes"
      }
    }
  },
  "description" : "This describes the subnet capabilities that can be queried"
};
        defs["RetrievingWorkflowResponse"] = {
  "type" : "object",
  "properties" : {
    "workflowSpecificationList" : {
      "type" : "array",
      "description" : "List of Workflow specification data",
      "items" : {
        "$ref" : "#/definitions/WorkflowSpecification"
      }
    }
  },
  "description" : "Response body of fetching workflows using resource target"
};
        defs["ServiceLevelWorkflowExecution"] = {
  "type" : "object",
  "properties" : {
    "requestInfo" : {
      "$ref" : "#/definitions/ServiceLevelWorkflowExecution_requestInfo"
    },
    "modelInfo" : {
      "$ref" : "#/definitions/ServiceLevelWorkflowExecution_modelInfo"
    },
    "requestParameters" : {
      "$ref" : "#/definitions/ServiceLevelWorkflowExecution_requestParameters"
    },
    "subscriberInfo" : {
      "$ref" : "#/definitions/ServiceLevelWorkflowExecution_subscriberInfo"
    },
    "project" : {
      "$ref" : "#/definitions/ServiceLevelWorkflowExecution_project"
    },
    "owningEntity" : {
      "$ref" : "#/definitions/ServiceLevelWorkflowExecution_owningEntity"
    }
  },
  "description" : "This describes the request body of service level custom workflow execution"
};
        defs["ServiceLevelWorkflowExecution_modelInfo"] = {
  "type" : "object",
  "properties" : {
    "modelType" : {
      "type" : "string",
      "description" : "Type of the model to be executed"
    },
    "modelInvariantUuid" : {
      "type" : "string",
      "description" : "Model invariant id corresponding to the service"
    },
    "modelUuid" : {
      "type" : "string",
      "description" : "Model uuid corresponding to the service"
    },
    "modelVersionId" : {
      "type" : "string",
      "description" : "Model version of the service instance"
    },
    "modelName" : {
      "type" : "string",
      "description" : "Name of the service"
    },
    "modelVersion" : {
      "type" : "string",
      "description" : "Version of the service instance"
    }
  },
  "description" : "Parameters related to the service model"
};
        defs["ServiceLevelWorkflowExecution_owningEntity"] = {
  "type" : "object",
  "properties" : {
    "owningEntityId" : {
      "type" : "string",
      "description" : "Id of the owning Entity"
    },
    "owningEntityName" : {
      "type" : "string",
      "description" : "Name of the owning Entity"
    }
  },
  "description" : "Object describes the entity details"
};
        defs["ServiceLevelWorkflowExecution_project"] = {
  "type" : "object",
  "properties" : {
    "projectName" : {
      "type" : "string",
      "description" : "Name of the target project"
    }
  },
  "description" : "Information about the target project name"
};
        defs["ServiceLevelWorkflowExecution_requestInfo"] = {
  "type" : "object",
  "properties" : {
    "source" : {
      "type" : "string",
      "description" : "Name of the sender"
    },
    "suppressRollback" : {
      "type" : "boolean",
      "description" : "Enable/disable rollback suppression"
    },
    "requestorId" : {
      "type" : "string",
      "description" : "Id of the sender"
    }
  },
  "description" : "Request object contains source information"
};
        defs["ServiceLevelWorkflowExecution_requestParameters"] = {
  "type" : "object",
  "properties" : {
    "subscriptionServiceType" : {
      "type" : "string",
      "description" : "Type of service subscription"
    }
  },
  "description" : "User parameter object"
};
        defs["ServiceLevelWorkflowExecution_subscriberInfo"] = {
  "type" : "object",
  "properties" : {
    "globalSubscriberId" : {
      "type" : "string",
      "description" : "Id of the subscriber sending the request"
    }
  },
  "description" : "Subscriber id information"
};
        defs["SubnetTypes"] = {
  "type" : "string",
  "description" : "This describes allowed subnet types",
  "enum" : [ "AN", "AN_NF", "CN", "TN_FH", "TN_MH", "TN_BH" ]
};
        defs["WorkflowSpecification"] = {
  "type" : "object",
  "properties" : {
    "artifactInfo" : {
      "$ref" : "#/definitions/WorkflowSpecification_artifactInfo"
    }
  },
  "description" : "This describes workflow specification object"
};
        defs["WorkflowSpecification_artifactInfo"] = {
  "type" : "object",
  "properties" : {
    "artifactType" : {
      "type" : "string",
      "description" : "Type of the artifact to be queried"
    },
    "artifactUuid" : {
      "type" : "string",
      "description" : "UUID of the artifact"
    },
    "artifactName" : {
      "type" : "string",
      "description" : "Name of the artifact"
    },
    "artifactVersion" : {
      "type" : "string",
      "description" : "Artifact's Version"
    },
    "artifactDescription" : {
      "type" : "string",
      "description" : ""
    },
    "workflowName" : {
      "type" : "string",
      "description" : "Name of the workflow fetched for the resource type"
    },
    "operationName" : {
      "type" : "string",
      "description" : "Mapped operation name of the corresponding workflow"
    },
    "workflowSource" : {
      "type" : "string",
      "description" : ""
    },
    "workflowResourceTarget" : {
      "type" : "string",
      "description" : "Type of Resource mapped against the workflow"
    }
  },
  "description" : "Attributes related to artifact information "
};
  </script>

<div class="container-fluid">
    <div class="row-fluid">
        <div id="sidenav" class="span2">
            <nav id="scrollingNav">
                <ul class="sidenav nav nav-list">
                    <!-- Logo Area -->
                    <!--<div style="width: 80%; background-color: #4c8eca; color: white; padding: 20px; text-align: center; margin-bottom: 20px; ">

              API Docs 2

              </div>
            -->
                    <li class="nav-fixed nav-header active" data-group="_"><a href="#api-_">API Summary</a></li>

                    <li class="nav-header" data-group="E2eServiceInstances"><a href="#api-E2eServiceInstances">API Methods - E2eServiceInstances</a></li>
                    <li data-group="E2eServiceInstances" data-name="activateE2EServiceInstances" class="">
                        <a href="#api-E2eServiceInstances-activateE2EServiceInstances">activateE2EServiceInstances</a>
                    </li>
                    <li data-group="E2eServiceInstances" data-name="compareModelwithTargetVersion" class="">
                        <a href="#api-E2eServiceInstances-compareModelwithTargetVersion">compareModelwithTargetVersion</a>
                    </li>
                    <li data-group="E2eServiceInstances" data-name="createE2EServiceInstance" class="">
                        <a href="#api-E2eServiceInstances-createE2EServiceInstance">createE2EServiceInstance</a>
                    </li>
                    <li data-group="E2eServiceInstances" data-name="deleteE2EServiceInstance" class="">
                        <a href="#api-E2eServiceInstances-deleteE2EServiceInstance">deleteE2EServiceInstance</a>
                    </li>
                    <li data-group="E2eServiceInstances" data-name="getE2EServiceInstances" class="">
                        <a href="#api-E2eServiceInstances-getE2EServiceInstances">getE2EServiceInstances</a>
                    </li>
                    <li data-group="E2eServiceInstances" data-name="scaleE2EServiceInstance" class="">
                        <a href="#api-E2eServiceInstances-scaleE2EServiceInstance">scaleE2EServiceInstance</a>
                    </li>
                    <li data-group="E2eServiceInstances" data-name="updateE2EServiceInstance" class="">
                        <a href="#api-E2eServiceInstances-updateE2EServiceInstance">updateE2EServiceInstance</a>
                    </li>
                    <li class="nav-header" data-group="Globalhealthcheck"><a href="#api-Globalhealthcheck">API Methods - Globalhealthcheck</a></li>
                    <li data-group="Globalhealthcheck" data-name="globalHealthcheck" class="">
                        <a href="#api-Globalhealthcheck-globalHealthcheck">globalHealthcheck</a>
                    </li>
                    <li class="nav-header" data-group="Nodehealthcheck"><a href="#api-Nodehealthcheck">API Methods - Nodehealthcheck</a></li>
                    <li data-group="Nodehealthcheck" data-name="nodeHealthcheck" class="">
                        <a href="#api-Nodehealthcheck-nodeHealthcheck">nodeHealthcheck</a>
                    </li>
                    <li class="nav-header" data-group="Onap3gppServiceInstances"><a href="#api-Onap3gppServiceInstances">API Methods - Onap3gppServiceInstances</a></li>
                    <li data-group="Onap3gppServiceInstances" data-name="activate3gppService" class="">
                        <a href="#api-Onap3gppServiceInstances-activate3gppService">activate3gppService</a>
                    </li>
                    <li data-group="Onap3gppServiceInstances" data-name="allocate3gppService" class="">
                        <a href="#api-Onap3gppServiceInstances-allocate3gppService">allocate3gppService</a>
                    </li>
                    <li data-group="Onap3gppServiceInstances" data-name="deactivate3gppService" class="">
                        <a href="#api-Onap3gppServiceInstances-deactivate3gppService">deactivate3gppService</a>
                    </li>
                    <li data-group="Onap3gppServiceInstances" data-name="deallocate3gppService" class="">
                        <a href="#api-Onap3gppServiceInstances-deallocate3gppService">deallocate3gppService</a>
                    </li>
                    <li data-group="Onap3gppServiceInstances" data-name="modify3gppService" class="">
                        <a href="#api-Onap3gppServiceInstances-modify3gppService">modify3gppService</a>
                    </li>
                    <li data-group="Onap3gppServiceInstances" data-name="querySubnetCapability" class="">
                        <a href="#api-Onap3gppServiceInstances-querySubnetCapability">querySubnetCapability</a>
                    </li>
                    <li class="nav-header" data-group="OnapsoinfracloudResources"><a href="#api-OnapsoinfracloudResources">API Methods - OnapsoinfracloudResources</a></li>
                    <li data-group="OnapsoinfracloudResources" data-name="activateOperationEnvironment" class="">
                        <a href="#api-OnapsoinfracloudResources-activateOperationEnvironment">activateOperationEnvironment</a>
                    </li>
                    <li data-group="OnapsoinfracloudResources" data-name="createOperationEnvironment" class="">
                        <a href="#api-OnapsoinfracloudResources-createOperationEnvironment">createOperationEnvironment</a>
                    </li>
                    <li data-group="OnapsoinfracloudResources" data-name="deactivateOperationEnvironment" class="">
                        <a href="#api-OnapsoinfracloudResources-deactivateOperationEnvironment">deactivateOperationEnvironment</a>
                    </li>
                    <li class="nav-header" data-group="OnapsoinfracloudResourcesRequests"><a href="#api-OnapsoinfracloudResourcesRequests">API Methods - OnapsoinfracloudResourcesRequests</a></li>
                    <li data-group="OnapsoinfracloudResourcesRequests" data-name="getOperationEnvironmentStatusFilter" class="">
                        <a href="#api-OnapsoinfracloudResourcesRequests-getOperationEnvironmentStatusFilter">getOperationEnvironmentStatusFilter</a>
                    </li>
                    <li data-group="OnapsoinfracloudResourcesRequests" data-name="unlockOrchestrationRequestForReqId" class="">
                        <a href="#api-OnapsoinfracloudResourcesRequests-unlockOrchestrationRequestForReqId">unlockOrchestrationRequestForReqId</a>
                    </li>
                    <li class="nav-header" data-group="OnapsoinfrainstanceManagement"><a href="#api-OnapsoinfrainstanceManagement">API Methods - OnapsoinfrainstanceManagement</a></li>
                    <li data-group="OnapsoinfrainstanceManagement" data-name="executePNFCustomWorkflow" class="">
                        <a href="#api-OnapsoinfrainstanceManagement-executePNFCustomWorkflow">executePNFCustomWorkflow</a>
                    </li>
                    <li data-group="OnapsoinfrainstanceManagement" data-name="executeServiceLevelCustomWorkflow" class="">
                        <a href="#api-OnapsoinfrainstanceManagement-executeServiceLevelCustomWorkflow">executeServiceLevelCustomWorkflow</a>
                    </li>
                    <li class="nav-header" data-group="OnapsoinframodelDistributions"><a href="#api-OnapsoinframodelDistributions">API Methods - OnapsoinframodelDistributions</a></li>
                    <li data-group="OnapsoinframodelDistributions" data-name="updateModelDistributionStatus" class="">
                        <a href="#api-OnapsoinframodelDistributions-updateModelDistributionStatus">updateModelDistributionStatus</a>
                    </li>
                    <li class="nav-header" data-group="OnapsoinfraorchestrationRequests"><a href="#api-OnapsoinfraorchestrationRequests">API Methods - OnapsoinfraorchestrationRequests</a></li>
                    <li data-group="OnapsoinfraorchestrationRequests" data-name="getOrchestrationRequest" class="">
                        <a href="#api-OnapsoinfraorchestrationRequests-getOrchestrationRequest">getOrchestrationRequest</a>
                    </li>
                    <li data-group="OnapsoinfraorchestrationRequests" data-name="getOrchestrationRequestForReqId" class="">
                        <a href="#api-OnapsoinfraorchestrationRequests-getOrchestrationRequestForReqId">getOrchestrationRequestForReqId</a>
                    </li>
                    <li data-group="OnapsoinfraorchestrationRequests" data-name="unlockOrchestrationRequest" class="">
                        <a href="#api-OnapsoinfraorchestrationRequests-unlockOrchestrationRequest">unlockOrchestrationRequest</a>
                    </li>
                    <li class="nav-header" data-group="OnapsoinfraorchestrationTasks"><a href="#api-OnapsoinfraorchestrationTasks">API Methods - OnapsoinfraorchestrationTasks</a></li>
                    <li data-group="OnapsoinfraorchestrationTasks" data-name="abortOrchestrationTask" class="">
                        <a href="#api-OnapsoinfraorchestrationTasks-abortOrchestrationTask">abortOrchestrationTask</a>
                    </li>
                    <li data-group="OnapsoinfraorchestrationTasks" data-name="commitOrchestrationTask" class="">
                        <a href="#api-OnapsoinfraorchestrationTasks-commitOrchestrationTask">commitOrchestrationTask</a>
                    </li>
                    <li data-group="OnapsoinfraorchestrationTasks" data-name="createOrchestrationTask" class="">
                        <a href="#api-OnapsoinfraorchestrationTasks-createOrchestrationTask">createOrchestrationTask</a>
                    </li>
                    <li data-group="OnapsoinfraorchestrationTasks" data-name="deleteOrchestrationTask" class="">
                        <a href="#api-OnapsoinfraorchestrationTasks-deleteOrchestrationTask">deleteOrchestrationTask</a>
                    </li>
                    <li data-group="OnapsoinfraorchestrationTasks" data-name="getAllOrchestrationTasks" class="">
                        <a href="#api-OnapsoinfraorchestrationTasks-getAllOrchestrationTasks">getAllOrchestrationTasks</a>
                    </li>
                    <li data-group="OnapsoinfraorchestrationTasks" data-name="getOrchestrationTask" class="">
                        <a href="#api-OnapsoinfraorchestrationTasks-getOrchestrationTask">getOrchestrationTask</a>
                    </li>
                    <li data-group="OnapsoinfraorchestrationTasks" data-name="updateOrchestrationTask" class="">
                        <a href="#api-OnapsoinfraorchestrationTasks-updateOrchestrationTask">updateOrchestrationTask</a>
                    </li>
                    <li class="nav-header" data-group="OnapsoinfraserviceInstantiation"><a href="#api-OnapsoinfraserviceInstantiation">API Methods - OnapsoinfraserviceInstantiation</a></li>
                    <li data-group="OnapsoinfraserviceInstantiation" data-name="activatePort" class="">
                        <a href="#api-OnapsoinfraserviceInstantiation-activatePort">activatePort</a>
                    </li>
                    <li data-group="OnapsoinfraserviceInstantiation" data-name="activateServiceInstance" class="">
                        <a href="#api-OnapsoinfraserviceInstantiation-activateServiceInstance">activateServiceInstance</a>
                    </li>
                    <li data-group="OnapsoinfraserviceInstantiation" data-name="addRelationships" class="">
                        <a href="#api-OnapsoinfraserviceInstantiation-addRelationships">addRelationships</a>
                    </li>
                    <li data-group="OnapsoinfraserviceInstantiation" data-name="applyUpdatedConfig" class="">
                        <a href="#api-OnapsoinfraserviceInstantiation-applyUpdatedConfig">applyUpdatedConfig</a>
                    </li>
                    <li data-group="OnapsoinfraserviceInstantiation" data-name="assignServiceInstance" class="">
                        <a href="#api-OnapsoinfraserviceInstantiation-assignServiceInstance">assignServiceInstance</a>
                    </li>
                    <li data-group="OnapsoinfraserviceInstantiation" data-name="createNetworkInstance" class="">
                        <a href="#api-OnapsoinfraserviceInstantiation-createNetworkInstance">createNetworkInstance</a>
                    </li>
                    <li data-group="OnapsoinfraserviceInstantiation" data-name="createPortConfiguration" class="">
                        <a href="#api-OnapsoinfraserviceInstantiation-createPortConfiguration">createPortConfiguration</a>
                    </li>
                    <li data-group="OnapsoinfraserviceInstantiation" data-name="createServiceInstance" class="">
                        <a href="#api-OnapsoinfraserviceInstantiation-createServiceInstance">createServiceInstance</a>
                    </li>
                    <li data-group="OnapsoinfraserviceInstantiation" data-name="createVfModuleInstance" class="">
                        <a href="#api-OnapsoinfraserviceInstantiation-createVfModuleInstance">createVfModuleInstance</a>
                    </li>
                    <li data-group="OnapsoinfraserviceInstantiation" data-name="createVnfInstance" class="">
                        <a href="#api-OnapsoinfraserviceInstantiation-createVnfInstance">createVnfInstance</a>
                    </li>
                    <li data-group="OnapsoinfraserviceInstantiation" data-name="createVolumeGroupInstance" class="">
                        <a href="#api-OnapsoinfraserviceInstantiation-createVolumeGroupInstance">createVolumeGroupInstance</a>
                    </li>
                    <li data-group="OnapsoinfraserviceInstantiation" data-name="deactivateAndCloudDeleteVfModuleInstance" class="">
                        <a href="#api-OnapsoinfraserviceInstantiation-deactivateAndCloudDeleteVfModuleInstance">deactivateAndCloudDeleteVfModuleInstance</a>
                    </li>
                    <li data-group="OnapsoinfraserviceInstantiation" data-name="deactivatePort" class="">
                        <a href="#api-OnapsoinfraserviceInstantiation-deactivatePort">deactivatePort</a>
                    </li>
                    <li data-group="OnapsoinfraserviceInstantiation" data-name="deactivateServiceInstance" class="">
                        <a href="#api-OnapsoinfraserviceInstantiation-deactivateServiceInstance">deactivateServiceInstance</a>
                    </li>
                    <li data-group="OnapsoinfraserviceInstantiation" data-name="deleteNetworkInstance" class="">
                        <a href="#api-OnapsoinfraserviceInstantiation-deleteNetworkInstance">deleteNetworkInstance</a>
                    </li>
                    <li data-group="OnapsoinfraserviceInstantiation" data-name="deletePortConfiguration" class="">
                        <a href="#api-OnapsoinfraserviceInstantiation-deletePortConfiguration">deletePortConfiguration</a>
                    </li>
                    <li data-group="OnapsoinfraserviceInstantiation" data-name="deleteServiceInstance" class="">
                        <a href="#api-OnapsoinfraserviceInstantiation-deleteServiceInstance">deleteServiceInstance</a>
                    </li>
                    <li data-group="OnapsoinfraserviceInstantiation" data-name="deleteVfModuleInstance" class="">
                        <a href="#api-OnapsoinfraserviceInstantiation-deleteVfModuleInstance">deleteVfModuleInstance</a>
                    </li>
                    <li data-group="OnapsoinfraserviceInstantiation" data-name="deleteVnfInstance" class="">
                        <a href="#api-OnapsoinfraserviceInstantiation-deleteVnfInstance">deleteVnfInstance</a>
                    </li>
                    <li data-group="OnapsoinfraserviceInstantiation" data-name="deleteVolumeGroupInstance" class="">
                        <a href="#api-OnapsoinfraserviceInstantiation-deleteVolumeGroupInstance">deleteVolumeGroupInstance</a>
                    </li>
                    <li data-group="OnapsoinfraserviceInstantiation" data-name="disablePort" class="">
                        <a href="#api-OnapsoinfraserviceInstantiation-disablePort">disablePort</a>
                    </li>
                    <li data-group="OnapsoinfraserviceInstantiation" data-name="enablePort" class="">
                        <a href="#api-OnapsoinfraserviceInstantiation-enablePort">enablePort</a>
                    </li>
                    <li data-group="OnapsoinfraserviceInstantiation" data-name="inPlaceSoftwareUpdate" class="">
                        <a href="#api-OnapsoinfraserviceInstantiation-inPlaceSoftwareUpdate">inPlaceSoftwareUpdate</a>
                    </li>
                    <li data-group="OnapsoinfraserviceInstantiation" data-name="removeRelationships" class="">
                        <a href="#api-OnapsoinfraserviceInstantiation-removeRelationships">removeRelationships</a>
                    </li>
                    <li data-group="OnapsoinfraserviceInstantiation" data-name="replaceVfModuleInstance" class="">
                        <a href="#api-OnapsoinfraserviceInstantiation-replaceVfModuleInstance">replaceVfModuleInstance</a>
                    </li>
                    <li data-group="OnapsoinfraserviceInstantiation" data-name="replaceVnfInstance" class="">
                        <a href="#api-OnapsoinfraserviceInstantiation-replaceVnfInstance">replaceVnfInstance</a>
                    </li>
                    <li data-group="OnapsoinfraserviceInstantiation" data-name="scaleOutVfModule" class="">
                        <a href="#api-OnapsoinfraserviceInstantiation-scaleOutVfModule">scaleOutVfModule</a>
                    </li>
                    <li data-group="OnapsoinfraserviceInstantiation" data-name="unassignServiceInstance" class="">
                        <a href="#api-OnapsoinfraserviceInstantiation-unassignServiceInstance">unassignServiceInstance</a>
                    </li>
                    <li data-group="OnapsoinfraserviceInstantiation" data-name="updateNetworkInstance" class="">
                        <a href="#api-OnapsoinfraserviceInstantiation-updateNetworkInstance">updateNetworkInstance</a>
                    </li>
                    <li data-group="OnapsoinfraserviceInstantiation" data-name="updateVfModuleInstance" class="">
                        <a href="#api-OnapsoinfraserviceInstantiation-updateVfModuleInstance">updateVfModuleInstance</a>
                    </li>
                    <li data-group="OnapsoinfraserviceInstantiation" data-name="updateVnfInstance" class="">
                        <a href="#api-OnapsoinfraserviceInstantiation-updateVnfInstance">updateVnfInstance</a>
                    </li>
                    <li data-group="OnapsoinfraserviceInstantiation" data-name="updateVolumeGroupInstance" class="">
                        <a href="#api-OnapsoinfraserviceInstantiation-updateVolumeGroupInstance">updateVolumeGroupInstance</a>
                    </li>
                    <li class="nav-header" data-group="Onapsoinfratasks"><a href="#api-Onapsoinfratasks">API Methods - Onapsoinfratasks</a></li>
                    <li data-group="Onapsoinfratasks" data-name="queryFilters" class="">
                        <a href="#api-Onapsoinfratasks-queryFilters">queryFilters</a>
                    </li>
                    <li class="nav-header" data-group="OnapsoinfraworkflowSpecifications"><a href="#api-OnapsoinfraworkflowSpecifications">API Methods - OnapsoinfraworkflowSpecifications</a></li>
                    <li data-group="OnapsoinfraworkflowSpecifications" data-name="queryWorkflowSpecifications" class="">
                        <a href="#api-OnapsoinfraworkflowSpecifications-queryWorkflowSpecifications">queryWorkflowSpecifications</a>
                    </li>
                </ul>
            </nav>
        </div>
        <div id="content">
            <div id="project">
                <div class="pull-left">
                    <h1>SO Guilin APIs</h1>
                </div>
                <div class="clearfix"></div>
            </div>
            <div id="header">
                <div id="api-_">
                    <h2 id="welcome-to-apidoc">API and SDK Documentation</h2>
                    <div class="app-desc">Version: 3.1.2</div>
                    <hr>
                    <div>No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)</div>
                </div>
            </div>
            <div id="sections">
                <section id="api-E2eServiceInstances">
                    <h1>E2eServiceInstances</h1>
                    <div id="api-E2eServiceInstances-activateE2EServiceInstances">
                        <article id="api-E2eServiceInstances-activateE2EServiceInstances-0" data-group="User" data-name="activateE2EServiceInstances" data-version="0">
                            <div class="pull-left">
                                <h1>activateE2EServiceInstances</h1>
                                <p>Activate/Deactivate 5G slice Service on a specified version and serviceId</p>
                            </div>
                            <div class="pull-right"></div>
                            <div class="clearfix"></div>
                            <p></p>
                            <p class="marked"></p>
                            <p></p>
                            <br />
                            <pre class="prettyprint language-html prettyprinted" data-type="post"><code><span class="pln">/onap/so/infra/e2eServiceInstances/{version}/{serviceId}/{operationType}</span></code></pre>
                            <p>
                            <h3>Usage and SDK Samples</h3>
                            </p>
                            <ul class="nav nav-tabs nav-tabs-examples">
                                <li class="active"><a href="#examples-E2eServiceInstances-activateE2EServiceInstances-0-curl">Curl</a></li>
                                <li class=""><a href="#examples-E2eServiceInstances-activateE2EServiceInstances-0-java">Java</a></li>
                                <li class=""><a href="#examples-E2eServiceInstances-activateE2EServiceInstances-0-android">Android</a></li>
                                <!--<li class=""><a href="#examples-E2eServiceInstances-activateE2EServiceInstances-0-groovy">Groovy</a></li>-->
                                <li class=""><a href="#examples-E2eServiceInstances-activateE2EServiceInstances-0-objc">Obj-C</a></li>
                                <li class=""><a href="#examples-E2eServiceInstances-activateE2EServiceInstances-0-javascript">JavaScript</a></li>
                                <!--<li class=""><a href="#examples-E2eServiceInstances-activateE2EServiceInstances-0-angular">Angular</a></li>-->
                                <li class=""><a href="#examples-E2eServiceInstances-activateE2EServiceInstances-0-csharp">C#</a></li>
                                <li class=""><a href="#examples-E2eServiceInstances-activateE2EServiceInstances-0-php">PHP</a></li>
                                <li class=""><a href="#examples-E2eServiceInstances-activateE2EServiceInstances-0-perl">Perl</a></li>
                                <li class=""><a href="#examples-E2eServiceInstances-activateE2EServiceInstances-0-python">Python</a></li>
                            </ul>

                            <div class="tab-content">
                                <div class="tab-pane active" id="examples-E2eServiceInstances-activateE2EServiceInstances-0-curl">
                                    <pre class="prettyprint"><code class="language-bsh">curl -X POST "http://localhost/onap/so/infra/e2eServiceInstances/{version}/{serviceId}/{operationType}"</code></pre>
                                </div>
                                <div class="tab-pane" id="examples-E2eServiceInstances-activateE2EServiceInstances-0-java">
                            <pre class="prettyprint"><code class="language-java">import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.E2eServiceInstancesApi;

import java.io.File;
import java.util.*;

public class E2eServiceInstancesApiExample {

    public static void main(String[] args) {

        E2eServiceInstancesApi apiInstance = new E2eServiceInstancesApi();
        String version = version_example; // String |
        String serviceId = serviceId_example; // String |
        String operationType = operationType_example; // String |
        String body = body_example; // String |
        try {
            apiInstance.activateE2EServiceInstances(version, serviceId, operationType, body);
        } catch (ApiException e) {
            System.err.println("Exception when calling E2eServiceInstancesApi#activateE2EServiceInstances");
            e.printStackTrace();
        }
    }
}</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-E2eServiceInstances-activateE2EServiceInstances-0-android">
                            <pre class="prettyprint"><code class="language-java">import io.swagger.client.api.E2eServiceInstancesApi;

public class E2eServiceInstancesApiExample {

    public static void main(String[] args) {
        E2eServiceInstancesApi apiInstance = new E2eServiceInstancesApi();
        String version = version_example; // String |
        String serviceId = serviceId_example; // String |
        String operationType = operationType_example; // String |
        String body = body_example; // String |
        try {
            apiInstance.activateE2EServiceInstances(version, serviceId, operationType, body);
        } catch (ApiException e) {
            System.err.println("Exception when calling E2eServiceInstancesApi#activateE2EServiceInstances");
            e.printStackTrace();
        }
    }
}</code></pre>
                                </div>
                                <!--
  <div class="tab-pane" id="examples-E2eServiceInstances-activateE2EServiceInstances-0-groovy">
  <pre class="prettyprint language-json prettyprinted" data-type="json"><code>Coming Soon!</code></pre>
  </div> -->
                                <div class="tab-pane" id="examples-E2eServiceInstances-activateE2EServiceInstances-0-objc">
                              <pre class="prettyprint"><code class="language-cpp">String *version = version_example; //
String *serviceId = serviceId_example; //
String *operationType = operationType_example; //
String *body = body_example; //  (optional)

E2eServiceInstancesApi *apiInstance = [[E2eServiceInstancesApi alloc] init];

// Activate/Deactivate 5G slice Service on a specified version and serviceId
[apiInstance activateE2EServiceInstancesWith:version
    serviceId:serviceId
    operationType:operationType
    body:body
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-E2eServiceInstances-activateE2EServiceInstances-0-javascript">
                              <pre class="prettyprint"><code class="language-js">var SoGuilinApIs = require('so_guilin_ap_is');

var api = new SoGuilinApIs.E2eServiceInstancesApi()

var version = version_example; // {String}

var serviceId = serviceId_example; // {String}

var operationType = operationType_example; // {String}

var opts = {
  'body': body_example // {String}
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.activateE2EServiceInstances(version, serviceId, operationType, opts, callback);
</code></pre>
                                </div>

                                <!--<div class="tab-pane" id="examples-E2eServiceInstances-activateE2EServiceInstances-0-angular">
              <pre class="prettyprint language-json prettyprinted" data-type="json"><code>Coming Soon!</code></pre>
            </div>-->
                                <div class="tab-pane" id="examples-E2eServiceInstances-activateE2EServiceInstances-0-csharp">
                              <pre class="prettyprint"><code class="language-cs">using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class activateE2EServiceInstancesExample
    {
        public void main()
        {

            var apiInstance = new E2eServiceInstancesApi();
            var version = version_example;  // String |
            var serviceId = serviceId_example;  // String |
            var operationType = operationType_example;  // String |
            var body = body_example;  // String |  (optional)

            try
            {
                // Activate/Deactivate 5G slice Service on a specified version and serviceId
                apiInstance.activateE2EServiceInstances(version, serviceId, operationType, body);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling E2eServiceInstancesApi.activateE2EServiceInstances: " + e.Message );
            }
        }
    }
}
</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-E2eServiceInstances-activateE2EServiceInstances-0-php">
                              <pre class="prettyprint"><code class="language-php"><&#63;php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\E2eServiceInstancesApi();
$version = version_example; // String |
$serviceId = serviceId_example; // String |
$operationType = operationType_example; // String |
$body = body_example; // String |

try {
    $api_instance->activateE2EServiceInstances($version, $serviceId, $operationType, $body);
} catch (Exception $e) {
    echo 'Exception when calling E2eServiceInstancesApi->activateE2EServiceInstances: ', $e->getMessage(), PHP_EOL;
}
?></code></pre>
                                </div>

                                <div class="tab-pane" id="examples-E2eServiceInstances-activateE2EServiceInstances-0-perl">
                              <pre class="prettyprint"><code class="language-perl">use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::E2eServiceInstancesApi;

my $api_instance = WWW::SwaggerClient::E2eServiceInstancesApi->new();
my $version = version_example; # String |
my $serviceId = serviceId_example; # String |
my $operationType = operationType_example; # String |
my $body = WWW::SwaggerClient::Object::String->new(); # String |

eval {
    $api_instance->activateE2EServiceInstances(version => $version, serviceId => $serviceId, operationType => $operationType, body => $body);
};
if ($@) {
    warn "Exception when calling E2eServiceInstancesApi->activateE2EServiceInstances: $@\n";
}</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-E2eServiceInstances-activateE2EServiceInstances-0-python">
                              <pre class="prettyprint"><code class="language-python">from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.E2eServiceInstancesApi()
version = version_example # String |
serviceId = serviceId_example # String |
operationType = operationType_example # String |
body = body_example # String |  (optional)

try:
    # Activate/Deactivate 5G slice Service on a specified version and serviceId
    api_instance.activate_e2_e_service_instances(version, serviceId, operationType, body=body)
except ApiException as e:
    print("Exception when calling E2eServiceInstancesApi->activateE2EServiceInstances: %s\n" % e)</code></pre>
                                </div>
                            </div>

                            <h2>Parameters</h2>

                            <div class="methodsubtabletitle">Path parameters</div>
                            <table id="methodsubtable">
                                <tr>
                                    <th width="150px">Name</th>
                                    <th>Description</th>
                                </tr>
                                <tr><td style="width:150px;">version*</td>
                                    <td>


                                        <div id="d2e199_activateE2EServiceInstances_version">
                                            <div class="json-schema-view">
                                                <div class="primitive">
                <span class="type">
                    String
                </span>

                                                </div>
                                                <div class="inner required">
                                                    Required
                                                </div>
                                            </div>
                                        </div>
                                    </td>
                                </tr>

                                <tr><td style="width:150px;">serviceId*</td>
                                    <td>


                                        <div id="d2e199_activateE2EServiceInstances_serviceId">
                                            <div class="json-schema-view">
                                                <div class="primitive">
                <span class="type">
                    String
                </span>

                                                </div>
                                                <div class="inner required">
                                                    Required
                                                </div>
                                            </div>
                                        </div>
                                    </td>
                                </tr>

                                <tr><td style="width:150px;">operationType*</td>
                                    <td>


                                        <div id="d2e199_activateE2EServiceInstances_operationType">
                                            <div class="json-schema-view">
                                                <div class="primitive">
                <span class="type">
                    String
                </span>

                                                </div>
                                                <div class="inner required">
                                                    Required
                                                </div>
                                            </div>
                                        </div>
                                    </td>
                                </tr>

                            </table>


                            <div class="methodsubtabletitle">Body parameters</div>
                            <table id="methodsubtable">
                                <tr>
                                    <th width="150px">Name</th>
                                    <th>Description</th>
                                </tr>
                                <tr><td style="width:150px;">body </td>
                                    <td>


                                        <script>
$(document).ready(function() {
  var schemaWrapper = {
  "in" : "body",
  "name" : "body",
  "required" : false,
  "schema" : {
    "type" : "string"
  }
};
  var schema = schemaWrapper.schema;
  if (schema.$ref != null) {
    schema = defsParser.$refs.get(schema.$ref);
  } else {
    schemaWrapper.definitions = Object.assign({}, defs);
    $RefParser.dereference(schemaWrapper).catch(function(err) {
      console.log(err);
    });
  }

  var view = new JSONSchemaView(schema,2,{isBodyParam: true});
  var result = $('#d2e199_activateE2EServiceInstances_body');
  result.empty();
  result.append(view.render());
});
</script>
                                        <div id="d2e199_activateE2EServiceInstances_body"></div>
                                    </td>
                                </tr>

                            </table>



                            <h2>Responses</h2>
                            <h3> Status: default - successful operation </h3>

                            <ul class="nav nav-tabs nav-tabs-examples" >
                            </ul>

                            <div class="tab-content" style='margin-bottom: 10px;'>
                            </div>

                        </article>
                    </div>
                    <hr>
                    <div id="api-E2eServiceInstances-compareModelwithTargetVersion">
                        <article id="api-E2eServiceInstances-compareModelwithTargetVersion-0" data-group="User" data-name="compareModelwithTargetVersion" data-version="0">
                            <div class="pull-left">
                                <h1>compareModelwithTargetVersion</h1>
                                <p>Find added and deleted resources of target model for the e2eserviceInstance on a given serviceId </p>
                            </div>
                            <div class="pull-right"></div>
                            <div class="clearfix"></div>
                            <p></p>
                            <p class="marked"></p>
                            <p></p>
                            <br />
                            <pre class="prettyprint language-html prettyprinted" data-type="post"><code><span class="pln">/onap/so/infra/e2eServiceInstances/{version}/{serviceId}/modeldifferences</span></code></pre>
                            <p>
                            <h3>Usage and SDK Samples</h3>
                            </p>
                            <ul class="nav nav-tabs nav-tabs-examples">
                                <li class="active"><a href="#examples-E2eServiceInstances-compareModelwithTargetVersion-0-curl">Curl</a></li>
                                <li class=""><a href="#examples-E2eServiceInstances-compareModelwithTargetVersion-0-java">Java</a></li>
                                <li class=""><a href="#examples-E2eServiceInstances-compareModelwithTargetVersion-0-android">Android</a></li>
                                <!--<li class=""><a href="#examples-E2eServiceInstances-compareModelwithTargetVersion-0-groovy">Groovy</a></li>-->
                                <li class=""><a href="#examples-E2eServiceInstances-compareModelwithTargetVersion-0-objc">Obj-C</a></li>
                                <li class=""><a href="#examples-E2eServiceInstances-compareModelwithTargetVersion-0-javascript">JavaScript</a></li>
                                <!--<li class=""><a href="#examples-E2eServiceInstances-compareModelwithTargetVersion-0-angular">Angular</a></li>-->
                                <li class=""><a href="#examples-E2eServiceInstances-compareModelwithTargetVersion-0-csharp">C#</a></li>
                                <li class=""><a href="#examples-E2eServiceInstances-compareModelwithTargetVersion-0-php">PHP</a></li>
                                <li class=""><a href="#examples-E2eServiceInstances-compareModelwithTargetVersion-0-perl">Perl</a></li>
                                <li class=""><a href="#examples-E2eServiceInstances-compareModelwithTargetVersion-0-python">Python</a></li>
                            </ul>

                            <div class="tab-content">
                                <div class="tab-pane active" id="examples-E2eServiceInstances-compareModelwithTargetVersion-0-curl">
                                    <pre class="prettyprint"><code class="language-bsh">curl -X POST "http://localhost/onap/so/infra/e2eServiceInstances/{version}/{serviceId}/modeldifferences"</code></pre>
                                </div>
                                <div class="tab-pane" id="examples-E2eServiceInstances-compareModelwithTargetVersion-0-java">
                            <pre class="prettyprint"><code class="language-java">import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.E2eServiceInstancesApi;

import java.io.File;
import java.util.*;

public class E2eServiceInstancesApiExample {

    public static void main(String[] args) {

        E2eServiceInstancesApi apiInstance = new E2eServiceInstancesApi();
        String serviceId = serviceId_example; // String |
        String version = version_example; // String |
        String body = body_example; // String |
        try {
            apiInstance.compareModelwithTargetVersion(serviceId, version, body);
        } catch (ApiException e) {
            System.err.println("Exception when calling E2eServiceInstancesApi#compareModelwithTargetVersion");
            e.printStackTrace();
        }
    }
}</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-E2eServiceInstances-compareModelwithTargetVersion-0-android">
                            <pre class="prettyprint"><code class="language-java">import io.swagger.client.api.E2eServiceInstancesApi;

public class E2eServiceInstancesApiExample {

    public static void main(String[] args) {
        E2eServiceInstancesApi apiInstance = new E2eServiceInstancesApi();
        String serviceId = serviceId_example; // String |
        String version = version_example; // String |
        String body = body_example; // String |
        try {
            apiInstance.compareModelwithTargetVersion(serviceId, version, body);
        } catch (ApiException e) {
            System.err.println("Exception when calling E2eServiceInstancesApi#compareModelwithTargetVersion");
            e.printStackTrace();
        }
    }
}</code></pre>
                                </div>
                                <!--
  <div class="tab-pane" id="examples-E2eServiceInstances-compareModelwithTargetVersion-0-groovy">
  <pre class="prettyprint language-json prettyprinted" data-type="json"><code>Coming Soon!</code></pre>
  </div> -->
                                <div class="tab-pane" id="examples-E2eServiceInstances-compareModelwithTargetVersion-0-objc">
                              <pre class="prettyprint"><code class="language-cpp">String *serviceId = serviceId_example; //
String *version = version_example; //
String *body = body_example; //  (optional)

E2eServiceInstancesApi *apiInstance = [[E2eServiceInstancesApi alloc] init];

// Find added and deleted resources of target model for the e2eserviceInstance on a given serviceId
[apiInstance compareModelwithTargetVersionWith:serviceId
    version:version
    body:body
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-E2eServiceInstances-compareModelwithTargetVersion-0-javascript">
                              <pre class="prettyprint"><code class="language-js">var SoGuilinApIs = require('so_guilin_ap_is');

var api = new SoGuilinApIs.E2eServiceInstancesApi()

var serviceId = serviceId_example; // {String}

var version = version_example; // {String}

var opts = {
  'body': body_example // {String}
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.compareModelwithTargetVersion(serviceId, version, opts, callback);
</code></pre>
                                </div>

                                <!--<div class="tab-pane" id="examples-E2eServiceInstances-compareModelwithTargetVersion-0-angular">
              <pre class="prettyprint language-json prettyprinted" data-type="json"><code>Coming Soon!</code></pre>
            </div>-->
                                <div class="tab-pane" id="examples-E2eServiceInstances-compareModelwithTargetVersion-0-csharp">
                              <pre class="prettyprint"><code class="language-cs">using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class compareModelwithTargetVersionExample
    {
        public void main()
        {

            var apiInstance = new E2eServiceInstancesApi();
            var serviceId = serviceId_example;  // String |
            var version = version_example;  // String |
            var body = body_example;  // String |  (optional)

            try
            {
                // Find added and deleted resources of target model for the e2eserviceInstance on a given serviceId
                apiInstance.compareModelwithTargetVersion(serviceId, version, body);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling E2eServiceInstancesApi.compareModelwithTargetVersion: " + e.Message );
            }
        }
    }
}
</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-E2eServiceInstances-compareModelwithTargetVersion-0-php">
                              <pre class="prettyprint"><code class="language-php"><&#63;php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\E2eServiceInstancesApi();
$serviceId = serviceId_example; // String |
$version = version_example; // String |
$body = body_example; // String |

try {
    $api_instance->compareModelwithTargetVersion($serviceId, $version, $body);
} catch (Exception $e) {
    echo 'Exception when calling E2eServiceInstancesApi->compareModelwithTargetVersion: ', $e->getMessage(), PHP_EOL;
}
?></code></pre>
                                </div>

                                <div class="tab-pane" id="examples-E2eServiceInstances-compareModelwithTargetVersion-0-perl">
                              <pre class="prettyprint"><code class="language-perl">use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::E2eServiceInstancesApi;

my $api_instance = WWW::SwaggerClient::E2eServiceInstancesApi->new();
my $serviceId = serviceId_example; # String |
my $version = version_example; # String |
my $body = WWW::SwaggerClient::Object::String->new(); # String |

eval {
    $api_instance->compareModelwithTargetVersion(serviceId => $serviceId, version => $version, body => $body);
};
if ($@) {
    warn "Exception when calling E2eServiceInstancesApi->compareModelwithTargetVersion: $@\n";
}</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-E2eServiceInstances-compareModelwithTargetVersion-0-python">
                              <pre class="prettyprint"><code class="language-python">from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.E2eServiceInstancesApi()
serviceId = serviceId_example # String |
version = version_example # String |
body = body_example # String |  (optional)

try:
    # Find added and deleted resources of target model for the e2eserviceInstance on a given serviceId
    api_instance.compare_modelwith_target_version(serviceId, version, body=body)
except ApiException as e:
    print("Exception when calling E2eServiceInstancesApi->compareModelwithTargetVersion: %s\n" % e)</code></pre>
                                </div>
                            </div>

                            <h2>Parameters</h2>

                            <div class="methodsubtabletitle">Path parameters</div>
                            <table id="methodsubtable">
                                <tr>
                                    <th width="150px">Name</th>
                                    <th>Description</th>
                                </tr>
                                <tr><td style="width:150px;">serviceId*</td>
                                    <td>


                                        <div id="d2e199_compareModelwithTargetVersion_serviceId">
                                            <div class="json-schema-view">
                                                <div class="primitive">
                <span class="type">
                    String
                </span>

                                                </div>
                                                <div class="inner required">
                                                    Required
                                                </div>
                                            </div>
                                        </div>
                                    </td>
                                </tr>

                                <tr><td style="width:150px;">version*</td>
                                    <td>


                                        <div id="d2e199_compareModelwithTargetVersion_version">
                                            <div class="json-schema-view">
                                                <div class="primitive">
                <span class="type">
                    String
                </span>

                                                </div>
                                                <div class="inner required">
                                                    Required
                                                </div>
                                            </div>
                                        </div>
                                    </td>
                                </tr>

                            </table>


                            <div class="methodsubtabletitle">Body parameters</div>
                            <table id="methodsubtable">
                                <tr>
                                    <th width="150px">Name</th>
                                    <th>Description</th>
                                </tr>
                                <tr><td style="width:150px;">body </td>
                                    <td>


                                        <script>
$(document).ready(function() {
  var schemaWrapper = {
  "in" : "body",
  "name" : "body",
  "required" : false,
  "schema" : {
    "type" : "string"
  }
};
  var schema = schemaWrapper.schema;
  if (schema.$ref != null) {
    schema = defsParser.$refs.get(schema.$ref);
  } else {
    schemaWrapper.definitions = Object.assign({}, defs);
    $RefParser.dereference(schemaWrapper).catch(function(err) {
      console.log(err);
    });
  }

  var view = new JSONSchemaView(schema,2,{isBodyParam: true});
  var result = $('#d2e199_compareModelwithTargetVersion_body');
  result.empty();
  result.append(view.render());
});
</script>
                                        <div id="d2e199_compareModelwithTargetVersion_body"></div>
                                    </td>
                                </tr>

                            </table>



                            <h2>Responses</h2>
                            <h3> Status: default - successful operation </h3>

                            <ul class="nav nav-tabs nav-tabs-examples" >
                            </ul>

                            <div class="tab-content" style='margin-bottom: 10px;'>
                            </div>

                        </article>
                    </div>
                    <hr>
                    <div id="api-E2eServiceInstances-createE2EServiceInstance">
                        <article id="api-E2eServiceInstances-createE2EServiceInstance-0" data-group="User" data-name="createE2EServiceInstance" data-version="0">
                            <div class="pull-left">
                                <h1>createE2EServiceInstance</h1>
                                <p>Create an E2E Service Instance on a version provided</p>
                            </div>
                            <div class="pull-right"></div>
                            <div class="clearfix"></div>
                            <p></p>
                            <p class="marked"></p>
                            <p></p>
                            <br />
                            <pre class="prettyprint language-html prettyprinted" data-type="post"><code><span class="pln">/onap/so/infra/e2eServiceInstances/{version}</span></code></pre>
                            <p>
                            <h3>Usage and SDK Samples</h3>
                            </p>
                            <ul class="nav nav-tabs nav-tabs-examples">
                                <li class="active"><a href="#examples-E2eServiceInstances-createE2EServiceInstance-0-curl">Curl</a></li>
                                <li class=""><a href="#examples-E2eServiceInstances-createE2EServiceInstance-0-java">Java</a></li>
                                <li class=""><a href="#examples-E2eServiceInstances-createE2EServiceInstance-0-android">Android</a></li>
                                <!--<li class=""><a href="#examples-E2eServiceInstances-createE2EServiceInstance-0-groovy">Groovy</a></li>-->
                                <li class=""><a href="#examples-E2eServiceInstances-createE2EServiceInstance-0-objc">Obj-C</a></li>
                                <li class=""><a href="#examples-E2eServiceInstances-createE2EServiceInstance-0-javascript">JavaScript</a></li>
                                <!--<li class=""><a href="#examples-E2eServiceInstances-createE2EServiceInstance-0-angular">Angular</a></li>-->
                                <li class=""><a href="#examples-E2eServiceInstances-createE2EServiceInstance-0-csharp">C#</a></li>
                                <li class=""><a href="#examples-E2eServiceInstances-createE2EServiceInstance-0-php">PHP</a></li>
                                <li class=""><a href="#examples-E2eServiceInstances-createE2EServiceInstance-0-perl">Perl</a></li>
                                <li class=""><a href="#examples-E2eServiceInstances-createE2EServiceInstance-0-python">Python</a></li>
                            </ul>

                            <div class="tab-content">
                                <div class="tab-pane active" id="examples-E2eServiceInstances-createE2EServiceInstance-0-curl">
                                    <pre class="prettyprint"><code class="language-bsh">curl -X POST "http://localhost/onap/so/infra/e2eServiceInstances/{version}"</code></pre>
                                </div>
                                <div class="tab-pane" id="examples-E2eServiceInstances-createE2EServiceInstance-0-java">
                            <pre class="prettyprint"><code class="language-java">import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.E2eServiceInstancesApi;

import java.io.File;
import java.util.*;

public class E2eServiceInstancesApiExample {

    public static void main(String[] args) {

        E2eServiceInstancesApi apiInstance = new E2eServiceInstancesApi();
        String version = version_example; // String |
        String body = body_example; // String |
        try {
            apiInstance.createE2EServiceInstance(version, body);
        } catch (ApiException e) {
            System.err.println("Exception when calling E2eServiceInstancesApi#createE2EServiceInstance");
            e.printStackTrace();
        }
    }
}</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-E2eServiceInstances-createE2EServiceInstance-0-android">
                            <pre class="prettyprint"><code class="language-java">import io.swagger.client.api.E2eServiceInstancesApi;

public class E2eServiceInstancesApiExample {

    public static void main(String[] args) {
        E2eServiceInstancesApi apiInstance = new E2eServiceInstancesApi();
        String version = version_example; // String |
        String body = body_example; // String |
        try {
            apiInstance.createE2EServiceInstance(version, body);
        } catch (ApiException e) {
            System.err.println("Exception when calling E2eServiceInstancesApi#createE2EServiceInstance");
            e.printStackTrace();
        }
    }
}</code></pre>
                                </div>
                                <!--
  <div class="tab-pane" id="examples-E2eServiceInstances-createE2EServiceInstance-0-groovy">
  <pre class="prettyprint language-json prettyprinted" data-type="json"><code>Coming Soon!</code></pre>
  </div> -->
                                <div class="tab-pane" id="examples-E2eServiceInstances-createE2EServiceInstance-0-objc">
                              <pre class="prettyprint"><code class="language-cpp">String *version = version_example; //
String *body = body_example; //  (optional)

E2eServiceInstancesApi *apiInstance = [[E2eServiceInstancesApi alloc] init];

// Create an E2E Service Instance on a version provided
[apiInstance createE2EServiceInstanceWith:version
    body:body
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-E2eServiceInstances-createE2EServiceInstance-0-javascript">
                              <pre class="prettyprint"><code class="language-js">var SoGuilinApIs = require('so_guilin_ap_is');

var api = new SoGuilinApIs.E2eServiceInstancesApi()

var version = version_example; // {String}

var opts = {
  'body': body_example // {String}
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.createE2EServiceInstance(version, opts, callback);
</code></pre>
                                </div>

                                <!--<div class="tab-pane" id="examples-E2eServiceInstances-createE2EServiceInstance-0-angular">
              <pre class="prettyprint language-json prettyprinted" data-type="json"><code>Coming Soon!</code></pre>
            </div>-->
                                <div class="tab-pane" id="examples-E2eServiceInstances-createE2EServiceInstance-0-csharp">
                              <pre class="prettyprint"><code class="language-cs">using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class createE2EServiceInstanceExample
    {
        public void main()
        {

            var apiInstance = new E2eServiceInstancesApi();
            var version = version_example;  // String |
            var body = body_example;  // String |  (optional)

            try
            {
                // Create an E2E Service Instance on a version provided
                apiInstance.createE2EServiceInstance(version, body);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling E2eServiceInstancesApi.createE2EServiceInstance: " + e.Message );
            }
        }
    }
}
</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-E2eServiceInstances-createE2EServiceInstance-0-php">
                              <pre class="prettyprint"><code class="language-php"><&#63;php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\E2eServiceInstancesApi();
$version = version_example; // String |
$body = body_example; // String |

try {
    $api_instance->createE2EServiceInstance($version, $body);
} catch (Exception $e) {
    echo 'Exception when calling E2eServiceInstancesApi->createE2EServiceInstance: ', $e->getMessage(), PHP_EOL;
}
?></code></pre>
                                </div>

                                <div class="tab-pane" id="examples-E2eServiceInstances-createE2EServiceInstance-0-perl">
                              <pre class="prettyprint"><code class="language-perl">use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::E2eServiceInstancesApi;

my $api_instance = WWW::SwaggerClient::E2eServiceInstancesApi->new();
my $version = version_example; # String |
my $body = WWW::SwaggerClient::Object::String->new(); # String |

eval {
    $api_instance->createE2EServiceInstance(version => $version, body => $body);
};
if ($@) {
    warn "Exception when calling E2eServiceInstancesApi->createE2EServiceInstance: $@\n";
}</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-E2eServiceInstances-createE2EServiceInstance-0-python">
                              <pre class="prettyprint"><code class="language-python">from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.E2eServiceInstancesApi()
version = version_example # String |
body = body_example # String |  (optional)

try:
    # Create an E2E Service Instance on a version provided
    api_instance.create_e2_e_service_instance(version, body=body)
except ApiException as e:
    print("Exception when calling E2eServiceInstancesApi->createE2EServiceInstance: %s\n" % e)</code></pre>
                                </div>
                            </div>

                            <h2>Parameters</h2>

                            <div class="methodsubtabletitle">Path parameters</div>
                            <table id="methodsubtable">
                                <tr>
                                    <th width="150px">Name</th>
                                    <th>Description</th>
                                </tr>
                                <tr><td style="width:150px;">version*</td>
                                    <td>


                                        <div id="d2e199_createE2EServiceInstance_version">
                                            <div class="json-schema-view">
                                                <div class="primitive">
                <span class="type">
                    String
                </span>

                                                </div>
                                                <div class="inner required">
                                                    Required
                                                </div>
                                            </div>
                                        </div>
                                    </td>
                                </tr>

                            </table>


                            <div class="methodsubtabletitle">Body parameters</div>
                            <table id="methodsubtable">
                                <tr>
                                    <th width="150px">Name</th>
                                    <th>Description</th>
                                </tr>
                                <tr><td style="width:150px;">body </td>
                                    <td>


                                        <script>
$(document).ready(function() {
  var schemaWrapper = {
  "in" : "body",
  "name" : "body",
  "required" : false,
  "schema" : {
    "type" : "string"
  }
};
  var schema = schemaWrapper.schema;
  if (schema.$ref != null) {
    schema = defsParser.$refs.get(schema.$ref);
  } else {
    schemaWrapper.definitions = Object.assign({}, defs);
    $RefParser.dereference(schemaWrapper).catch(function(err) {
      console.log(err);
    });
  }

  var view = new JSONSchemaView(schema,2,{isBodyParam: true});
  var result = $('#d2e199_createE2EServiceInstance_body');
  result.empty();
  result.append(view.render());
});
</script>
                                        <div id="d2e199_createE2EServiceInstance_body"></div>
                                    </td>
                                </tr>

                            </table>



                            <h2>Responses</h2>
                            <h3> Status: default - successful operation </h3>

                            <ul class="nav nav-tabs nav-tabs-examples" >
                            </ul>

                            <div class="tab-content" style='margin-bottom: 10px;'>
                            </div>

                        </article>
                    </div>
                    <hr>
                    <div id="api-E2eServiceInstances-deleteE2EServiceInstance">
                        <article id="api-E2eServiceInstances-deleteE2EServiceInstance-0" data-group="User" data-name="deleteE2EServiceInstance" data-version="0">
                            <div class="pull-left">
                                <h1>deleteE2EServiceInstance</h1>
                                <p>Delete E2E Service Instance on a specified version and serviceId</p>
                            </div>
                            <div class="pull-right"></div>
                            <div class="clearfix"></div>
                            <p></p>
                            <p class="marked"></p>
                            <p></p>
                            <br />
                            <pre class="prettyprint language-html prettyprinted" data-type="delete"><code><span class="pln">/onap/so/infra/e2eServiceInstances/{version}/{serviceId}</span></code></pre>
                            <p>
                            <h3>Usage and SDK Samples</h3>
                            </p>
                            <ul class="nav nav-tabs nav-tabs-examples">
                                <li class="active"><a href="#examples-E2eServiceInstances-deleteE2EServiceInstance-0-curl">Curl</a></li>
                                <li class=""><a href="#examples-E2eServiceInstances-deleteE2EServiceInstance-0-java">Java</a></li>
                                <li class=""><a href="#examples-E2eServiceInstances-deleteE2EServiceInstance-0-android">Android</a></li>
                                <!--<li class=""><a href="#examples-E2eServiceInstances-deleteE2EServiceInstance-0-groovy">Groovy</a></li>-->
                                <li class=""><a href="#examples-E2eServiceInstances-deleteE2EServiceInstance-0-objc">Obj-C</a></li>
                                <li class=""><a href="#examples-E2eServiceInstances-deleteE2EServiceInstance-0-javascript">JavaScript</a></li>
                                <!--<li class=""><a href="#examples-E2eServiceInstances-deleteE2EServiceInstance-0-angular">Angular</a></li>-->
                                <li class=""><a href="#examples-E2eServiceInstances-deleteE2EServiceInstance-0-csharp">C#</a></li>
                                <li class=""><a href="#examples-E2eServiceInstances-deleteE2EServiceInstance-0-php">PHP</a></li>
                                <li class=""><a href="#examples-E2eServiceInstances-deleteE2EServiceInstance-0-perl">Perl</a></li>
                                <li class=""><a href="#examples-E2eServiceInstances-deleteE2EServiceInstance-0-python">Python</a></li>
                            </ul>

                            <div class="tab-content">
                                <div class="tab-pane active" id="examples-E2eServiceInstances-deleteE2EServiceInstance-0-curl">
                                    <pre class="prettyprint"><code class="language-bsh">curl -X DELETE "http://localhost/onap/so/infra/e2eServiceInstances/{version}/{serviceId}"</code></pre>
                                </div>
                                <div class="tab-pane" id="examples-E2eServiceInstances-deleteE2EServiceInstance-0-java">
                            <pre class="prettyprint"><code class="language-java">import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.E2eServiceInstancesApi;

import java.io.File;
import java.util.*;

public class E2eServiceInstancesApiExample {

    public static void main(String[] args) {

        E2eServiceInstancesApi apiInstance = new E2eServiceInstancesApi();
        String version = version_example; // String |
        String serviceId = serviceId_example; // String |
        String body = body_example; // String |
        try {
            apiInstance.deleteE2EServiceInstance(version, serviceId, body);
        } catch (ApiException e) {
            System.err.println("Exception when calling E2eServiceInstancesApi#deleteE2EServiceInstance");
            e.printStackTrace();
        }
    }
}</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-E2eServiceInstances-deleteE2EServiceInstance-0-android">
                            <pre class="prettyprint"><code class="language-java">import io.swagger.client.api.E2eServiceInstancesApi;

public class E2eServiceInstancesApiExample {

    public static void main(String[] args) {
        E2eServiceInstancesApi apiInstance = new E2eServiceInstancesApi();
        String version = version_example; // String |
        String serviceId = serviceId_example; // String |
        String body = body_example; // String |
        try {
            apiInstance.deleteE2EServiceInstance(version, serviceId, body);
        } catch (ApiException e) {
            System.err.println("Exception when calling E2eServiceInstancesApi#deleteE2EServiceInstance");
            e.printStackTrace();
        }
    }
}</code></pre>
                                </div>
                                <!--
  <div class="tab-pane" id="examples-E2eServiceInstances-deleteE2EServiceInstance-0-groovy">
  <pre class="prettyprint language-json prettyprinted" data-type="json"><code>Coming Soon!</code></pre>
  </div> -->
                                <div class="tab-pane" id="examples-E2eServiceInstances-deleteE2EServiceInstance-0-objc">
                              <pre class="prettyprint"><code class="language-cpp">String *version = version_example; //
String *serviceId = serviceId_example; //
String *body = body_example; //  (optional)

E2eServiceInstancesApi *apiInstance = [[E2eServiceInstancesApi alloc] init];

// Delete E2E Service Instance on a specified version and serviceId
[apiInstance deleteE2EServiceInstanceWith:version
    serviceId:serviceId
    body:body
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-E2eServiceInstances-deleteE2EServiceInstance-0-javascript">
                              <pre class="prettyprint"><code class="language-js">var SoGuilinApIs = require('so_guilin_ap_is');

var api = new SoGuilinApIs.E2eServiceInstancesApi()

var version = version_example; // {String}

var serviceId = serviceId_example; // {String}

var opts = {
  'body': body_example // {String}
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.deleteE2EServiceInstance(version, serviceId, opts, callback);
</code></pre>
                                </div>

                                <!--<div class="tab-pane" id="examples-E2eServiceInstances-deleteE2EServiceInstance-0-angular">
              <pre class="prettyprint language-json prettyprinted" data-type="json"><code>Coming Soon!</code></pre>
            </div>-->
                                <div class="tab-pane" id="examples-E2eServiceInstances-deleteE2EServiceInstance-0-csharp">
                              <pre class="prettyprint"><code class="language-cs">using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class deleteE2EServiceInstanceExample
    {
        public void main()
        {

            var apiInstance = new E2eServiceInstancesApi();
            var version = version_example;  // String |
            var serviceId = serviceId_example;  // String |
            var body = body_example;  // String |  (optional)

            try
            {
                // Delete E2E Service Instance on a specified version and serviceId
                apiInstance.deleteE2EServiceInstance(version, serviceId, body);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling E2eServiceInstancesApi.deleteE2EServiceInstance: " + e.Message );
            }
        }
    }
}
</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-E2eServiceInstances-deleteE2EServiceInstance-0-php">
                              <pre class="prettyprint"><code class="language-php"><&#63;php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\E2eServiceInstancesApi();
$version = version_example; // String |
$serviceId = serviceId_example; // String |
$body = body_example; // String |

try {
    $api_instance->deleteE2EServiceInstance($version, $serviceId, $body);
} catch (Exception $e) {
    echo 'Exception when calling E2eServiceInstancesApi->deleteE2EServiceInstance: ', $e->getMessage(), PHP_EOL;
}
?></code></pre>
                                </div>

                                <div class="tab-pane" id="examples-E2eServiceInstances-deleteE2EServiceInstance-0-perl">
                              <pre class="prettyprint"><code class="language-perl">use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::E2eServiceInstancesApi;

my $api_instance = WWW::SwaggerClient::E2eServiceInstancesApi->new();
my $version = version_example; # String |
my $serviceId = serviceId_example; # String |
my $body = WWW::SwaggerClient::Object::String->new(); # String |

eval {
    $api_instance->deleteE2EServiceInstance(version => $version, serviceId => $serviceId, body => $body);
};
if ($@) {
    warn "Exception when calling E2eServiceInstancesApi->deleteE2EServiceInstance: $@\n";
}</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-E2eServiceInstances-deleteE2EServiceInstance-0-python">
                              <pre class="prettyprint"><code class="language-python">from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.E2eServiceInstancesApi()
version = version_example # String |
serviceId = serviceId_example # String |
body = body_example # String |  (optional)

try:
    # Delete E2E Service Instance on a specified version and serviceId
    api_instance.delete_e2_e_service_instance(version, serviceId, body=body)
except ApiException as e:
    print("Exception when calling E2eServiceInstancesApi->deleteE2EServiceInstance: %s\n" % e)</code></pre>
                                </div>
                            </div>

                            <h2>Parameters</h2>

                            <div class="methodsubtabletitle">Path parameters</div>
                            <table id="methodsubtable">
                                <tr>
                                    <th width="150px">Name</th>
                                    <th>Description</th>
                                </tr>
                                <tr><td style="width:150px;">version*</td>
                                    <td>


                                        <div id="d2e199_deleteE2EServiceInstance_version">
                                            <div class="json-schema-view">
                                                <div class="primitive">
                <span class="type">
                    String
                </span>

                                                </div>
                                                <div class="inner required">
                                                    Required
                                                </div>
                                            </div>
                                        </div>
                                    </td>
                                </tr>

                                <tr><td style="width:150px;">serviceId*</td>
                                    <td>


                                        <div id="d2e199_deleteE2EServiceInstance_serviceId">
                                            <div class="json-schema-view">
                                                <div class="primitive">
                <span class="type">
                    String
                </span>

                                                </div>
                                                <div class="inner required">
                                                    Required
                                                </div>
                                            </div>
                                        </div>
                                    </td>
                                </tr>

                            </table>


                            <div class="methodsubtabletitle">Body parameters</div>
                            <table id="methodsubtable">
                                <tr>
                                    <th width="150px">Name</th>
                                    <th>Description</th>
                                </tr>
                                <tr><td style="width:150px;">body </td>
                                    <td>


                                        <script>
$(document).ready(function() {
  var schemaWrapper = {
  "in" : "body",
  "name" : "body",
  "required" : false,
  "schema" : {
    "type" : "string"
  }
};
  var schema = schemaWrapper.schema;
  if (schema.$ref != null) {
    schema = defsParser.$refs.get(schema.$ref);
  } else {
    schemaWrapper.definitions = Object.assign({}, defs);
    $RefParser.dereference(schemaWrapper).catch(function(err) {
      console.log(err);
    });
  }

  var view = new JSONSchemaView(schema,2,{isBodyParam: true});
  var result = $('#d2e199_deleteE2EServiceInstance_body');
  result.empty();
  result.append(view.render());
});
</script>
                                        <div id="d2e199_deleteE2EServiceInstance_body"></div>
                                    </td>
                                </tr>

                            </table>



                            <h2>Responses</h2>
                            <h3> Status: default - successful operation </h3>

                            <ul class="nav nav-tabs nav-tabs-examples" >
                            </ul>

                            <div class="tab-content" style='margin-bottom: 10px;'>
                            </div>

                        </article>
                    </div>
                    <hr>
                    <div id="api-E2eServiceInstances-getE2EServiceInstances">
                        <article id="api-E2eServiceInstances-getE2EServiceInstances-0" data-group="User" data-name="getE2EServiceInstances" data-version="0">
                            <div class="pull-left">
                                <h1>getE2EServiceInstances</h1>
                                <p>Find e2eServiceInstances Requests for a given serviceId and operationId</p>
                            </div>
                            <div class="pull-right"></div>
                            <div class="clearfix"></div>
                            <p></p>
                            <p class="marked"></p>
                            <p></p>
                            <br />
                            <pre class="prettyprint language-html prettyprinted" data-type="get"><code><span class="pln">/onap/so/infra/e2eServiceInstances/{version}/{serviceId}/operations/{operationId}</span></code></pre>
                            <p>
                            <h3>Usage and SDK Samples</h3>
                            </p>
                            <ul class="nav nav-tabs nav-tabs-examples">
                                <li class="active"><a href="#examples-E2eServiceInstances-getE2EServiceInstances-0-curl">Curl</a></li>
                                <li class=""><a href="#examples-E2eServiceInstances-getE2EServiceInstances-0-java">Java</a></li>
                                <li class=""><a href="#examples-E2eServiceInstances-getE2EServiceInstances-0-android">Android</a></li>
                                <!--<li class=""><a href="#examples-E2eServiceInstances-getE2EServiceInstances-0-groovy">Groovy</a></li>-->
                                <li class=""><a href="#examples-E2eServiceInstances-getE2EServiceInstances-0-objc">Obj-C</a></li>
                                <li class=""><a href="#examples-E2eServiceInstances-getE2EServiceInstances-0-javascript">JavaScript</a></li>
                                <!--<li class=""><a href="#examples-E2eServiceInstances-getE2EServiceInstances-0-angular">Angular</a></li>-->
                                <li class=""><a href="#examples-E2eServiceInstances-getE2EServiceInstances-0-csharp">C#</a></li>
                                <li class=""><a href="#examples-E2eServiceInstances-getE2EServiceInstances-0-php">PHP</a></li>
                                <li class=""><a href="#examples-E2eServiceInstances-getE2EServiceInstances-0-perl">Perl</a></li>
                                <li class=""><a href="#examples-E2eServiceInstances-getE2EServiceInstances-0-python">Python</a></li>
                            </ul>

                            <div class="tab-content">
                                <div class="tab-pane active" id="examples-E2eServiceInstances-getE2EServiceInstances-0-curl">
                                    <pre class="prettyprint"><code class="language-bsh">curl -X GET "http://localhost/onap/so/infra/e2eServiceInstances/{version}/{serviceId}/operations/{operationId}"</code></pre>
                                </div>
                                <div class="tab-pane" id="examples-E2eServiceInstances-getE2EServiceInstances-0-java">
                            <pre class="prettyprint"><code class="language-java">import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.E2eServiceInstancesApi;

import java.io.File;
import java.util.*;

public class E2eServiceInstancesApiExample {

    public static void main(String[] args) {

        E2eServiceInstancesApi apiInstance = new E2eServiceInstancesApi();
        String serviceId = serviceId_example; // String |
        String version = version_example; // String |
        String operationId = operationId_example; // String |
        try {
            apiInstance.getE2EServiceInstances(serviceId, version, operationId);
        } catch (ApiException e) {
            System.err.println("Exception when calling E2eServiceInstancesApi#getE2EServiceInstances");
            e.printStackTrace();
        }
    }
}</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-E2eServiceInstances-getE2EServiceInstances-0-android">
                            <pre class="prettyprint"><code class="language-java">import io.swagger.client.api.E2eServiceInstancesApi;

public class E2eServiceInstancesApiExample {

    public static void main(String[] args) {
        E2eServiceInstancesApi apiInstance = new E2eServiceInstancesApi();
        String serviceId = serviceId_example; // String |
        String version = version_example; // String |
        String operationId = operationId_example; // String |
        try {
            apiInstance.getE2EServiceInstances(serviceId, version, operationId);
        } catch (ApiException e) {
            System.err.println("Exception when calling E2eServiceInstancesApi#getE2EServiceInstances");
            e.printStackTrace();
        }
    }
}</code></pre>
                                </div>
                                <!--
  <div class="tab-pane" id="examples-E2eServiceInstances-getE2EServiceInstances-0-groovy">
  <pre class="prettyprint language-json prettyprinted" data-type="json"><code>Coming Soon!</code></pre>
  </div> -->
                                <div class="tab-pane" id="examples-E2eServiceInstances-getE2EServiceInstances-0-objc">
                              <pre class="prettyprint"><code class="language-cpp">String *serviceId = serviceId_example; //
String *version = version_example; //
String *operationId = operationId_example; //

E2eServiceInstancesApi *apiInstance = [[E2eServiceInstancesApi alloc] init];

// Find e2eServiceInstances Requests for a given serviceId and operationId
[apiInstance getE2EServiceInstancesWith:serviceId
    version:version
    operationId:operationId
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-E2eServiceInstances-getE2EServiceInstances-0-javascript">
                              <pre class="prettyprint"><code class="language-js">var SoGuilinApIs = require('so_guilin_ap_is');

var api = new SoGuilinApIs.E2eServiceInstancesApi()

var serviceId = serviceId_example; // {String}

var version = version_example; // {String}

var operationId = operationId_example; // {String}


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.getE2EServiceInstances(serviceId, version, operationId, callback);
</code></pre>
                                </div>

                                <!--<div class="tab-pane" id="examples-E2eServiceInstances-getE2EServiceInstances-0-angular">
              <pre class="prettyprint language-json prettyprinted" data-type="json"><code>Coming Soon!</code></pre>
            </div>-->
                                <div class="tab-pane" id="examples-E2eServiceInstances-getE2EServiceInstances-0-csharp">
                              <pre class="prettyprint"><code class="language-cs">using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getE2EServiceInstancesExample
    {
        public void main()
        {

            var apiInstance = new E2eServiceInstancesApi();
            var serviceId = serviceId_example;  // String |
            var version = version_example;  // String |
            var operationId = operationId_example;  // String |

            try
            {
                // Find e2eServiceInstances Requests for a given serviceId and operationId
                apiInstance.getE2EServiceInstances(serviceId, version, operationId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling E2eServiceInstancesApi.getE2EServiceInstances: " + e.Message );
            }
        }
    }
}
</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-E2eServiceInstances-getE2EServiceInstances-0-php">
                              <pre class="prettyprint"><code class="language-php"><&#63;php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\E2eServiceInstancesApi();
$serviceId = serviceId_example; // String |
$version = version_example; // String |
$operationId = operationId_example; // String |

try {
    $api_instance->getE2EServiceInstances($serviceId, $version, $operationId);
} catch (Exception $e) {
    echo 'Exception when calling E2eServiceInstancesApi->getE2EServiceInstances: ', $e->getMessage(), PHP_EOL;
}
?></code></pre>
                                </div>

                                <div class="tab-pane" id="examples-E2eServiceInstances-getE2EServiceInstances-0-perl">
                              <pre class="prettyprint"><code class="language-perl">use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::E2eServiceInstancesApi;

my $api_instance = WWW::SwaggerClient::E2eServiceInstancesApi->new();
my $serviceId = serviceId_example; # String |
my $version = version_example; # String |
my $operationId = operationId_example; # String |

eval {
    $api_instance->getE2EServiceInstances(serviceId => $serviceId, version => $version, operationId => $operationId);
};
if ($@) {
    warn "Exception when calling E2eServiceInstancesApi->getE2EServiceInstances: $@\n";
}</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-E2eServiceInstances-getE2EServiceInstances-0-python">
                              <pre class="prettyprint"><code class="language-python">from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.E2eServiceInstancesApi()
serviceId = serviceId_example # String |
version = version_example # String |
operationId = operationId_example # String |

try:
    # Find e2eServiceInstances Requests for a given serviceId and operationId
    api_instance.get_e2_e_service_instances(serviceId, version, operationId)
except ApiException as e:
    print("Exception when calling E2eServiceInstancesApi->getE2EServiceInstances: %s\n" % e)</code></pre>
                                </div>
                            </div>

                            <h2>Parameters</h2>

                            <div class="methodsubtabletitle">Path parameters</div>
                            <table id="methodsubtable">
                                <tr>
                                    <th width="150px">Name</th>
                                    <th>Description</th>
                                </tr>
                                <tr><td style="width:150px;">serviceId*</td>
                                    <td>


                                        <div id="d2e199_getE2EServiceInstances_serviceId">
                                            <div class="json-schema-view">
                                                <div class="primitive">
                <span class="type">
                    String
                </span>

                                                </div>
                                                <div class="inner required">
                                                    Required
                                                </div>
                                            </div>
                                        </div>
                                    </td>
                                </tr>

                                <tr><td style="width:150px;">version*</td>
                                    <td>


                                        <div id="d2e199_getE2EServiceInstances_version">
                                            <div class="json-schema-view">
                                                <div class="primitive">
                <span class="type">
                    String
                </span>

                                                </div>
                                                <div class="inner required">
                                                    Required
                                                </div>
                                            </div>
                                        </div>
                                    </td>
                                </tr>

                                <tr><td style="width:150px;">operationId*</td>
                                    <td>


                                        <div id="d2e199_getE2EServiceInstances_operationId">
                                            <div class="json-schema-view">
                                                <div class="primitive">
                <span class="type">
                    String
                </span>

                                                </div>
                                                <div class="inner required">
                                                    Required
                                                </div>
                                            </div>
                                        </div>
                                    </td>
                                </tr>

                            </table>





                            <h2>Responses</h2>
                            <h3> Status: default - successful operation </h3>

                            <ul class="nav nav-tabs nav-tabs-examples" >
                            </ul>

                            <div class="tab-content" style='margin-bottom: 10px;'>
                            </div>

                        </article>
                    </div>
                    <hr>
                    <div id="api-E2eServiceInstances-scaleE2EServiceInstance">
                        <article id="api-E2eServiceInstances-scaleE2EServiceInstance-0" data-group="User" data-name="scaleE2EServiceInstance" data-version="0">
                            <div class="pull-left">
                                <h1>scaleE2EServiceInstance</h1>
                                <p>Scale E2E Service Instance on a specified version</p>
                            </div>
                            <div class="pull-right"></div>
                            <div class="clearfix"></div>
                            <p></p>
                            <p class="marked"></p>
                            <p></p>
                            <br />
                            <pre class="prettyprint language-html prettyprinted" data-type="post"><code><span class="pln">/onap/so/infra/e2eServiceInstances/{version}/{serviceId}/scale</span></code></pre>
                            <p>
                            <h3>Usage and SDK Samples</h3>
                            </p>
                            <ul class="nav nav-tabs nav-tabs-examples">
                                <li class="active"><a href="#examples-E2eServiceInstances-scaleE2EServiceInstance-0-curl">Curl</a></li>
                                <li class=""><a href="#examples-E2eServiceInstances-scaleE2EServiceInstance-0-java">Java</a></li>
                                <li class=""><a href="#examples-E2eServiceInstances-scaleE2EServiceInstance-0-android">Android</a></li>
                                <!--<li class=""><a href="#examples-E2eServiceInstances-scaleE2EServiceInstance-0-groovy">Groovy</a></li>-->
                                <li class=""><a href="#examples-E2eServiceInstances-scaleE2EServiceInstance-0-objc">Obj-C</a></li>
                                <li class=""><a href="#examples-E2eServiceInstances-scaleE2EServiceInstance-0-javascript">JavaScript</a></li>
                                <!--<li class=""><a href="#examples-E2eServiceInstances-scaleE2EServiceInstance-0-angular">Angular</a></li>-->
                                <li class=""><a href="#examples-E2eServiceInstances-scaleE2EServiceInstance-0-csharp">C#</a></li>
                                <li class=""><a href="#examples-E2eServiceInstances-scaleE2EServiceInstance-0-php">PHP</a></li>
                                <li class=""><a href="#examples-E2eServiceInstances-scaleE2EServiceInstance-0-perl">Perl</a></li>
                                <li class=""><a href="#examples-E2eServiceInstances-scaleE2EServiceInstance-0-python">Python</a></li>
                            </ul>

                            <div class="tab-content">
                                <div class="tab-pane active" id="examples-E2eServiceInstances-scaleE2EServiceInstance-0-curl">
                                    <pre class="prettyprint"><code class="language-bsh">curl -X POST "http://localhost/onap/so/infra/e2eServiceInstances/{version}/{serviceId}/scale"</code></pre>
                                </div>
                                <div class="tab-pane" id="examples-E2eServiceInstances-scaleE2EServiceInstance-0-java">
                            <pre class="prettyprint"><code class="language-java">import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.E2eServiceInstancesApi;

import java.io.File;
import java.util.*;

public class E2eServiceInstancesApiExample {

    public static void main(String[] args) {

        E2eServiceInstancesApi apiInstance = new E2eServiceInstancesApi();
        String version = version_example; // String |
        String serviceId = serviceId_example; // String |
        String body = body_example; // String |
        try {
            apiInstance.scaleE2EServiceInstance(version, serviceId, body);
        } catch (ApiException e) {
            System.err.println("Exception when calling E2eServiceInstancesApi#scaleE2EServiceInstance");
            e.printStackTrace();
        }
    }
}</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-E2eServiceInstances-scaleE2EServiceInstance-0-android">
                            <pre class="prettyprint"><code class="language-java">import io.swagger.client.api.E2eServiceInstancesApi;

public class E2eServiceInstancesApiExample {

    public static void main(String[] args) {
        E2eServiceInstancesApi apiInstance = new E2eServiceInstancesApi();
        String version = version_example; // String |
        String serviceId = serviceId_example; // String |
        String body = body_example; // String |
        try {
            apiInstance.scaleE2EServiceInstance(version, serviceId, body);
        } catch (ApiException e) {
            System.err.println("Exception when calling E2eServiceInstancesApi#scaleE2EServiceInstance");
            e.printStackTrace();
        }
    }
}</code></pre>
                                </div>
                                <!--
  <div class="tab-pane" id="examples-E2eServiceInstances-scaleE2EServiceInstance-0-groovy">
  <pre class="prettyprint language-json prettyprinted" data-type="json"><code>Coming Soon!</code></pre>
  </div> -->
                                <div class="tab-pane" id="examples-E2eServiceInstances-scaleE2EServiceInstance-0-objc">
                              <pre class="prettyprint"><code class="language-cpp">String *version = version_example; //
String *serviceId = serviceId_example; //
String *body = body_example; //  (optional)

E2eServiceInstancesApi *apiInstance = [[E2eServiceInstancesApi alloc] init];

// Scale E2E Service Instance on a specified version
[apiInstance scaleE2EServiceInstanceWith:version
    serviceId:serviceId
    body:body
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-E2eServiceInstances-scaleE2EServiceInstance-0-javascript">
                              <pre class="prettyprint"><code class="language-js">var SoGuilinApIs = require('so_guilin_ap_is');

var api = new SoGuilinApIs.E2eServiceInstancesApi()

var version = version_example; // {String}

var serviceId = serviceId_example; // {String}

var opts = {
  'body': body_example // {String}
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.scaleE2EServiceInstance(version, serviceId, opts, callback);
</code></pre>
                                </div>

                                <!--<div class="tab-pane" id="examples-E2eServiceInstances-scaleE2EServiceInstance-0-angular">
              <pre class="prettyprint language-json prettyprinted" data-type="json"><code>Coming Soon!</code></pre>
            </div>-->
                                <div class="tab-pane" id="examples-E2eServiceInstances-scaleE2EServiceInstance-0-csharp">
                              <pre class="prettyprint"><code class="language-cs">using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class scaleE2EServiceInstanceExample
    {
        public void main()
        {

            var apiInstance = new E2eServiceInstancesApi();
            var version = version_example;  // String |
            var serviceId = serviceId_example;  // String |
            var body = body_example;  // String |  (optional)

            try
            {
                // Scale E2E Service Instance on a specified version
                apiInstance.scaleE2EServiceInstance(version, serviceId, body);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling E2eServiceInstancesApi.scaleE2EServiceInstance: " + e.Message );
            }
        }
    }
}
</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-E2eServiceInstances-scaleE2EServiceInstance-0-php">
                              <pre class="prettyprint"><code class="language-php"><&#63;php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\E2eServiceInstancesApi();
$version = version_example; // String |
$serviceId = serviceId_example; // String |
$body = body_example; // String |

try {
    $api_instance->scaleE2EServiceInstance($version, $serviceId, $body);
} catch (Exception $e) {
    echo 'Exception when calling E2eServiceInstancesApi->scaleE2EServiceInstance: ', $e->getMessage(), PHP_EOL;
}
?></code></pre>
                                </div>

                                <div class="tab-pane" id="examples-E2eServiceInstances-scaleE2EServiceInstance-0-perl">
                              <pre class="prettyprint"><code class="language-perl">use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::E2eServiceInstancesApi;

my $api_instance = WWW::SwaggerClient::E2eServiceInstancesApi->new();
my $version = version_example; # String |
my $serviceId = serviceId_example; # String |
my $body = WWW::SwaggerClient::Object::String->new(); # String |

eval {
    $api_instance->scaleE2EServiceInstance(version => $version, serviceId => $serviceId, body => $body);
};
if ($@) {
    warn "Exception when calling E2eServiceInstancesApi->scaleE2EServiceInstance: $@\n";
}</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-E2eServiceInstances-scaleE2EServiceInstance-0-python">
                              <pre class="prettyprint"><code class="language-python">from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.E2eServiceInstancesApi()
version = version_example # String |
serviceId = serviceId_example # String |
body = body_example # String |  (optional)

try:
    # Scale E2E Service Instance on a specified version
    api_instance.scale_e2_e_service_instance(version, serviceId, body=body)
except ApiException as e:
    print("Exception when calling E2eServiceInstancesApi->scaleE2EServiceInstance: %s\n" % e)</code></pre>
                                </div>
                            </div>

                            <h2>Parameters</h2>

                            <div class="methodsubtabletitle">Path parameters</div>
                            <table id="methodsubtable">
                                <tr>
                                    <th width="150px">Name</th>
                                    <th>Description</th>
                                </tr>
                                <tr><td style="width:150px;">version*</td>
                                    <td>


                                        <div id="d2e199_scaleE2EServiceInstance_version">
                                            <div class="json-schema-view">
                                                <div class="primitive">
                <span class="type">
                    String
                </span>

                                                </div>
                                                <div class="inner required">
                                                    Required
                                                </div>
                                            </div>
                                        </div>
                                    </td>
                                </tr>

                                <tr><td style="width:150px;">serviceId*</td>
                                    <td>


                                        <div id="d2e199_scaleE2EServiceInstance_serviceId">
                                            <div class="json-schema-view">
                                                <div class="primitive">
                <span class="type">
                    String
                </span>

                                                </div>
                                                <div class="inner required">
                                                    Required
                                                </div>
                                            </div>
                                        </div>
                                    </td>
                                </tr>

                            </table>


                            <div class="methodsubtabletitle">Body parameters</div>
                            <table id="methodsubtable">
                                <tr>
                                    <th width="150px">Name</th>
                                    <th>Description</th>
                                </tr>
                                <tr><td style="width:150px;">body </td>
                                    <td>


                                        <script>
$(document).ready(function() {
  var schemaWrapper = {
  "in" : "body",
  "name" : "body",
  "required" : false,
  "schema" : {
    "type" : "string"
  }
};
  var schema = schemaWrapper.schema;
  if (schema.$ref != null) {
    schema = defsParser.$refs.get(schema.$ref);
  } else {
    schemaWrapper.definitions = Object.assign({}, defs);
    $RefParser.dereference(schemaWrapper).catch(function(err) {
      console.log(err);
    });
  }

  var view = new JSONSchemaView(schema,2,{isBodyParam: true});
  var result = $('#d2e199_scaleE2EServiceInstance_body');
  result.empty();
  result.append(view.render());
});
</script>
                                        <div id="d2e199_scaleE2EServiceInstance_body"></div>
                                    </td>
                                </tr>

                            </table>



                            <h2>Responses</h2>
                            <h3> Status: default - successful operation </h3>

                            <ul class="nav nav-tabs nav-tabs-examples" >
                            </ul>

                            <div class="tab-content" style='margin-bottom: 10px;'>
                            </div>

                        </article>
                    </div>
                    <hr>
                    <div id="api-E2eServiceInstances-updateE2EServiceInstance">
                        <article id="api-E2eServiceInstances-updateE2EServiceInstance-0" data-group="User" data-name="updateE2EServiceInstance" data-version="0">
                            <div class="pull-left">
                                <h1>updateE2EServiceInstance</h1>
                                <p>Update an E2E Service Instance on a version provided and serviceId</p>
                            </div>
                            <div class="pull-right"></div>
                            <div class="clearfix"></div>
                            <p></p>
                            <p class="marked"></p>
                            <p></p>
                            <br />
                            <pre class="prettyprint language-html prettyprinted" data-type="put"><code><span class="pln">/onap/so/infra/e2eServiceInstances/{version}/{serviceId}</span></code></pre>
                            <p>
                            <h3>Usage and SDK Samples</h3>
                            </p>
                            <ul class="nav nav-tabs nav-tabs-examples">
                                <li class="active"><a href="#examples-E2eServiceInstances-updateE2EServiceInstance-0-curl">Curl</a></li>
                                <li class=""><a href="#examples-E2eServiceInstances-updateE2EServiceInstance-0-java">Java</a></li>
                                <li class=""><a href="#examples-E2eServiceInstances-updateE2EServiceInstance-0-android">Android</a></li>
                                <!--<li class=""><a href="#examples-E2eServiceInstances-updateE2EServiceInstance-0-groovy">Groovy</a></li>-->
                                <li class=""><a href="#examples-E2eServiceInstances-updateE2EServiceInstance-0-objc">Obj-C</a></li>
                                <li class=""><a href="#examples-E2eServiceInstances-updateE2EServiceInstance-0-javascript">JavaScript</a></li>
                                <!--<li class=""><a href="#examples-E2eServiceInstances-updateE2EServiceInstance-0-angular">Angular</a></li>-->
                                <li class=""><a href="#examples-E2eServiceInstances-updateE2EServiceInstance-0-csharp">C#</a></li>
                                <li class=""><a href="#examples-E2eServiceInstances-updateE2EServiceInstance-0-php">PHP</a></li>
                                <li class=""><a href="#examples-E2eServiceInstances-updateE2EServiceInstance-0-perl">Perl</a></li>
                                <li class=""><a href="#examples-E2eServiceInstances-updateE2EServiceInstance-0-python">Python</a></li>
                            </ul>

                            <div class="tab-content">
                                <div class="tab-pane active" id="examples-E2eServiceInstances-updateE2EServiceInstance-0-curl">
                                    <pre class="prettyprint"><code class="language-bsh">curl -X PUT "http://localhost/onap/so/infra/e2eServiceInstances/{version}/{serviceId}"</code></pre>
                                </div>
                                <div class="tab-pane" id="examples-E2eServiceInstances-updateE2EServiceInstance-0-java">
                            <pre class="prettyprint"><code class="language-java">import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.E2eServiceInstancesApi;

import java.io.File;
import java.util.*;

public class E2eServiceInstancesApiExample {

    public static void main(String[] args) {

        E2eServiceInstancesApi apiInstance = new E2eServiceInstancesApi();
        String version = version_example; // String |
        String serviceId = serviceId_example; // String |
        String body = body_example; // String |
        try {
            apiInstance.updateE2EServiceInstance(version, serviceId, body);
        } catch (ApiException e) {
            System.err.println("Exception when calling E2eServiceInstancesApi#updateE2EServiceInstance");
            e.printStackTrace();
        }
    }
}</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-E2eServiceInstances-updateE2EServiceInstance-0-android">
                            <pre class="prettyprint"><code class="language-java">import io.swagger.client.api.E2eServiceInstancesApi;

public class E2eServiceInstancesApiExample {

    public static void main(String[] args) {
        E2eServiceInstancesApi apiInstance = new E2eServiceInstancesApi();
        String version = version_example; // String |
        String serviceId = serviceId_example; // String |
        String body = body_example; // String |
        try {
            apiInstance.updateE2EServiceInstance(version, serviceId, body);
        } catch (ApiException e) {
            System.err.println("Exception when calling E2eServiceInstancesApi#updateE2EServiceInstance");
            e.printStackTrace();
        }
    }
}</code></pre>
                                </div>
                                <!--
  <div class="tab-pane" id="examples-E2eServiceInstances-updateE2EServiceInstance-0-groovy">
  <pre class="prettyprint language-json prettyprinted" data-type="json"><code>Coming Soon!</code></pre>
  </div> -->
                                <div class="tab-pane" id="examples-E2eServiceInstances-updateE2EServiceInstance-0-objc">
                              <pre class="prettyprint"><code class="language-cpp">String *version = version_example; //
String *serviceId = serviceId_example; //
String *body = body_example; //  (optional)

E2eServiceInstancesApi *apiInstance = [[E2eServiceInstancesApi alloc] init];

// Update an E2E Service Instance on a version provided and serviceId
[apiInstance updateE2EServiceInstanceWith:version
    serviceId:serviceId
    body:body
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-E2eServiceInstances-updateE2EServiceInstance-0-javascript">
                              <pre class="prettyprint"><code class="language-js">var SoGuilinApIs = require('so_guilin_ap_is');

var api = new SoGuilinApIs.E2eServiceInstancesApi()

var version = version_example; // {String}

var serviceId = serviceId_example; // {String}

var opts = {
  'body': body_example // {String}
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.updateE2EServiceInstance(version, serviceId, opts, callback);
</code></pre>
                                </div>

                                <!--<div class="tab-pane" id="examples-E2eServiceInstances-updateE2EServiceInstance-0-angular">
              <pre class="prettyprint language-json prettyprinted" data-type="json"><code>Coming Soon!</code></pre>
            </div>-->
                                <div class="tab-pane" id="examples-E2eServiceInstances-updateE2EServiceInstance-0-csharp">
                              <pre class="prettyprint"><code class="language-cs">using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class updateE2EServiceInstanceExample
    {
        public void main()
        {

            var apiInstance = new E2eServiceInstancesApi();
            var version = version_example;  // String |
            var serviceId = serviceId_example;  // String |
            var body = body_example;  // String |  (optional)

            try
            {
                // Update an E2E Service Instance on a version provided and serviceId
                apiInstance.updateE2EServiceInstance(version, serviceId, body);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling E2eServiceInstancesApi.updateE2EServiceInstance: " + e.Message );
            }
        }
    }
}
</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-E2eServiceInstances-updateE2EServiceInstance-0-php">
                              <pre class="prettyprint"><code class="language-php"><&#63;php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\E2eServiceInstancesApi();
$version = version_example; // String |
$serviceId = serviceId_example; // String |
$body = body_example; // String |

try {
    $api_instance->updateE2EServiceInstance($version, $serviceId, $body);
} catch (Exception $e) {
    echo 'Exception when calling E2eServiceInstancesApi->updateE2EServiceInstance: ', $e->getMessage(), PHP_EOL;
}
?></code></pre>
                                </div>

                                <div class="tab-pane" id="examples-E2eServiceInstances-updateE2EServiceInstance-0-perl">
                              <pre class="prettyprint"><code class="language-perl">use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::E2eServiceInstancesApi;

my $api_instance = WWW::SwaggerClient::E2eServiceInstancesApi->new();
my $version = version_example; # String |
my $serviceId = serviceId_example; # String |
my $body = WWW::SwaggerClient::Object::String->new(); # String |

eval {
    $api_instance->updateE2EServiceInstance(version => $version, serviceId => $serviceId, body => $body);
};
if ($@) {
    warn "Exception when calling E2eServiceInstancesApi->updateE2EServiceInstance: $@\n";
}</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-E2eServiceInstances-updateE2EServiceInstance-0-python">
                              <pre class="prettyprint"><code class="language-python">from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.E2eServiceInstancesApi()
version = version_example # String |
serviceId = serviceId_example # String |
body = body_example # String |  (optional)

try:
    # Update an E2E Service Instance on a version provided and serviceId
    api_instance.update_e2_e_service_instance(version, serviceId, body=body)
except ApiException as e:
    print("Exception when calling E2eServiceInstancesApi->updateE2EServiceInstance: %s\n" % e)</code></pre>
                                </div>
                            </div>

                            <h2>Parameters</h2>

                            <div class="methodsubtabletitle">Path parameters</div>
                            <table id="methodsubtable">
                                <tr>
                                    <th width="150px">Name</th>
                                    <th>Description</th>
                                </tr>
                                <tr><td style="width:150px;">version*</td>
                                    <td>


                                        <div id="d2e199_updateE2EServiceInstance_version">
                                            <div class="json-schema-view">
                                                <div class="primitive">
                <span class="type">
                    String
                </span>

                                                </div>
                                                <div class="inner required">
                                                    Required
                                                </div>
                                            </div>
                                        </div>
                                    </td>
                                </tr>

                                <tr><td style="width:150px;">serviceId*</td>
                                    <td>


                                        <div id="d2e199_updateE2EServiceInstance_serviceId">
                                            <div class="json-schema-view">
                                                <div class="primitive">
                <span class="type">
                    String
                </span>

                                                </div>
                                                <div class="inner required">
                                                    Required
                                                </div>
                                            </div>
                                        </div>
                                    </td>
                                </tr>

                            </table>


                            <div class="methodsubtabletitle">Body parameters</div>
                            <table id="methodsubtable">
                                <tr>
                                    <th width="150px">Name</th>
                                    <th>Description</th>
                                </tr>
                                <tr><td style="width:150px;">body </td>
                                    <td>


                                        <script>
$(document).ready(function() {
  var schemaWrapper = {
  "in" : "body",
  "name" : "body",
  "required" : false,
  "schema" : {
    "type" : "string"
  }
};
  var schema = schemaWrapper.schema;
  if (schema.$ref != null) {
    schema = defsParser.$refs.get(schema.$ref);
  } else {
    schemaWrapper.definitions = Object.assign({}, defs);
    $RefParser.dereference(schemaWrapper).catch(function(err) {
      console.log(err);
    });
  }

  var view = new JSONSchemaView(schema,2,{isBodyParam: true});
  var result = $('#d2e199_updateE2EServiceInstance_body');
  result.empty();
  result.append(view.render());
});
</script>
                                        <div id="d2e199_updateE2EServiceInstance_body"></div>
                                    </td>
                                </tr>

                            </table>



                            <h2>Responses</h2>
                            <h3> Status: default - successful operation </h3>

                            <ul class="nav nav-tabs nav-tabs-examples" >
                            </ul>

                            <div class="tab-content" style='margin-bottom: 10px;'>
                            </div>

                        </article>
                    </div>
                    <hr>
                </section>
                <section id="api-Globalhealthcheck">
                    <h1>Globalhealthcheck</h1>
                    <div id="api-Globalhealthcheck-globalHealthcheck">
                        <article id="api-Globalhealthcheck-globalHealthcheck-0" data-group="User" data-name="globalHealthcheck" data-version="0">
                            <div class="pull-left">
                                <h1>globalHealthcheck</h1>
                                <p>Performing global health check</p>
                            </div>
                            <div class="pull-right"></div>
                            <div class="clearfix"></div>
                            <p></p>
                            <p class="marked"></p>
                            <p></p>
                            <br />
                            <pre class="prettyprint language-html prettyprinted" data-type="get"><code><span class="pln">/globalhealthcheck</span></code></pre>
                            <p>
                            <h3>Usage and SDK Samples</h3>
                            </p>
                            <ul class="nav nav-tabs nav-tabs-examples">
                                <li class="active"><a href="#examples-Globalhealthcheck-globalHealthcheck-0-curl">Curl</a></li>
                                <li class=""><a href="#examples-Globalhealthcheck-globalHealthcheck-0-java">Java</a></li>
                                <li class=""><a href="#examples-Globalhealthcheck-globalHealthcheck-0-android">Android</a></li>
                                <!--<li class=""><a href="#examples-Globalhealthcheck-globalHealthcheck-0-groovy">Groovy</a></li>-->
                                <li class=""><a href="#examples-Globalhealthcheck-globalHealthcheck-0-objc">Obj-C</a></li>
                                <li class=""><a href="#examples-Globalhealthcheck-globalHealthcheck-0-javascript">JavaScript</a></li>
                                <!--<li class=""><a href="#examples-Globalhealthcheck-globalHealthcheck-0-angular">Angular</a></li>-->
                                <li class=""><a href="#examples-Globalhealthcheck-globalHealthcheck-0-csharp">C#</a></li>
                                <li class=""><a href="#examples-Globalhealthcheck-globalHealthcheck-0-php">PHP</a></li>
                                <li class=""><a href="#examples-Globalhealthcheck-globalHealthcheck-0-perl">Perl</a></li>
                                <li class=""><a href="#examples-Globalhealthcheck-globalHealthcheck-0-python">Python</a></li>
                            </ul>

                            <div class="tab-content">
                                <div class="tab-pane active" id="examples-Globalhealthcheck-globalHealthcheck-0-curl">
                                    <pre class="prettyprint"><code class="language-bsh">curl -X GET "http://localhost/globalhealthcheck?enableBpmn="</code></pre>
                                </div>
                                <div class="tab-pane" id="examples-Globalhealthcheck-globalHealthcheck-0-java">
                            <pre class="prettyprint"><code class="language-java">import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.GlobalhealthcheckApi;

import java.io.File;
import java.util.*;

public class GlobalhealthcheckApiExample {

    public static void main(String[] args) {

        GlobalhealthcheckApi apiInstance = new GlobalhealthcheckApi();
        Boolean enableBpmn = true; // Boolean |
        try {
            apiInstance.globalHealthcheck(enableBpmn);
        } catch (ApiException e) {
            System.err.println("Exception when calling GlobalhealthcheckApi#globalHealthcheck");
            e.printStackTrace();
        }
    }
}</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-Globalhealthcheck-globalHealthcheck-0-android">
                            <pre class="prettyprint"><code class="language-java">import io.swagger.client.api.GlobalhealthcheckApi;

public class GlobalhealthcheckApiExample {

    public static void main(String[] args) {
        GlobalhealthcheckApi apiInstance = new GlobalhealthcheckApi();
        Boolean enableBpmn = true; // Boolean |
        try {
            apiInstance.globalHealthcheck(enableBpmn);
        } catch (ApiException e) {
            System.err.println("Exception when calling GlobalhealthcheckApi#globalHealthcheck");
            e.printStackTrace();
        }
    }
}</code></pre>
                                </div>
                                <!--
  <div class="tab-pane" id="examples-Globalhealthcheck-globalHealthcheck-0-groovy">
  <pre class="prettyprint language-json prettyprinted" data-type="json"><code>Coming Soon!</code></pre>
  </div> -->
                                <div class="tab-pane" id="examples-Globalhealthcheck-globalHealthcheck-0-objc">
                              <pre class="prettyprint"><code class="language-cpp">Boolean *enableBpmn = true; //  (optional) (default to true)

GlobalhealthcheckApi *apiInstance = [[GlobalhealthcheckApi alloc] init];

// Performing global health check
[apiInstance globalHealthcheckWith:enableBpmn
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-Globalhealthcheck-globalHealthcheck-0-javascript">
                              <pre class="prettyprint"><code class="language-js">var SoGuilinApIs = require('so_guilin_ap_is');

var api = new SoGuilinApIs.GlobalhealthcheckApi()

var opts = {
  'enableBpmn': true // {Boolean}
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.globalHealthcheck(opts, callback);
</code></pre>
                                </div>

                                <!--<div class="tab-pane" id="examples-Globalhealthcheck-globalHealthcheck-0-angular">
              <pre class="prettyprint language-json prettyprinted" data-type="json"><code>Coming Soon!</code></pre>
            </div>-->
                                <div class="tab-pane" id="examples-Globalhealthcheck-globalHealthcheck-0-csharp">
                              <pre class="prettyprint"><code class="language-cs">using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class globalHealthcheckExample
    {
        public void main()
        {

            var apiInstance = new GlobalhealthcheckApi();
            var enableBpmn = true;  // Boolean |  (optional)  (default to true)

            try
            {
                // Performing global health check
                apiInstance.globalHealthcheck(enableBpmn);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling GlobalhealthcheckApi.globalHealthcheck: " + e.Message );
            }
        }
    }
}
</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-Globalhealthcheck-globalHealthcheck-0-php">
                              <pre class="prettyprint"><code class="language-php"><&#63;php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\GlobalhealthcheckApi();
$enableBpmn = true; // Boolean |

try {
    $api_instance->globalHealthcheck($enableBpmn);
} catch (Exception $e) {
    echo 'Exception when calling GlobalhealthcheckApi->globalHealthcheck: ', $e->getMessage(), PHP_EOL;
}
?></code></pre>
                                </div>

                                <div class="tab-pane" id="examples-Globalhealthcheck-globalHealthcheck-0-perl">
                              <pre class="prettyprint"><code class="language-perl">use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::GlobalhealthcheckApi;

my $api_instance = WWW::SwaggerClient::GlobalhealthcheckApi->new();
my $enableBpmn = true; # Boolean |

eval {
    $api_instance->globalHealthcheck(enableBpmn => $enableBpmn);
};
if ($@) {
    warn "Exception when calling GlobalhealthcheckApi->globalHealthcheck: $@\n";
}</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-Globalhealthcheck-globalHealthcheck-0-python">
                              <pre class="prettyprint"><code class="language-python">from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.GlobalhealthcheckApi()
enableBpmn = true # Boolean |  (optional) (default to true)

try:
    # Performing global health check
    api_instance.global_healthcheck(enableBpmn=enableBpmn)
except ApiException as e:
    print("Exception when calling GlobalhealthcheckApi->globalHealthcheck: %s\n" % e)</code></pre>
                                </div>
                            </div>

                            <h2>Parameters</h2>





                            <div class="methodsubtabletitle">Query parameters</div>
                            <table id="methodsubtable">
                                <tr>
                                    <th width="150px">Name</th>
                                    <th>Description</th>
                                </tr>
                                <tr><td style="width:150px;">enableBpmn</td>
                                    <td>


                                        <div id="d2e199_globalHealthcheck_enableBpmn">
                                            <div class="json-schema-view">
                                                <div class="primitive">
                <span class="type">
                    Boolean
                </span>

                                                </div>
                                            </div>
                                        </div>
                                    </td>
                                </tr>

                            </table>

                            <h2>Responses</h2>
                            <h3> Status: default - successful operation </h3>

                            <ul class="nav nav-tabs nav-tabs-examples" >
                            </ul>

                            <div class="tab-content" style='margin-bottom: 10px;'>
                            </div>

                        </article>
                    </div>
                    <hr>
                </section>
                <section id="api-Nodehealthcheck">
                    <h1>Nodehealthcheck</h1>
                    <div id="api-Nodehealthcheck-nodeHealthcheck">
                        <article id="api-Nodehealthcheck-nodeHealthcheck-0" data-group="User" data-name="nodeHealthcheck" data-version="0">
                            <div class="pull-left">
                                <h1>nodeHealthcheck</h1>
                                <p>Performing node health check</p>
                            </div>
                            <div class="pull-right"></div>
                            <div class="clearfix"></div>
                            <p></p>
                            <p class="marked"></p>
                            <p></p>
                            <br />
                            <pre class="prettyprint language-html prettyprinted" data-type="get"><code><span class="pln">/nodehealthcheck</span></code></pre>
                            <p>
                            <h3>Usage and SDK Samples</h3>
                            </p>
                            <ul class="nav nav-tabs nav-tabs-examples">
                                <li class="active"><a href="#examples-Nodehealthcheck-nodeHealthcheck-0-curl">Curl</a></li>
                                <li class=""><a href="#examples-Nodehealthcheck-nodeHealthcheck-0-java">Java</a></li>
                                <li class=""><a href="#examples-Nodehealthcheck-nodeHealthcheck-0-android">Android</a></li>
                                <!--<li class=""><a href="#examples-Nodehealthcheck-nodeHealthcheck-0-groovy">Groovy</a></li>-->
                                <li class=""><a href="#examples-Nodehealthcheck-nodeHealthcheck-0-objc">Obj-C</a></li>
                                <li class=""><a href="#examples-Nodehealthcheck-nodeHealthcheck-0-javascript">JavaScript</a></li>
                                <!--<li class=""><a href="#examples-Nodehealthcheck-nodeHealthcheck-0-angular">Angular</a></li>-->
                                <li class=""><a href="#examples-Nodehealthcheck-nodeHealthcheck-0-csharp">C#</a></li>
                                <li class=""><a href="#examples-Nodehealthcheck-nodeHealthcheck-0-php">PHP</a></li>
                                <li class=""><a href="#examples-Nodehealthcheck-nodeHealthcheck-0-perl">Perl</a></li>
                                <li class=""><a href="#examples-Nodehealthcheck-nodeHealthcheck-0-python">Python</a></li>
                            </ul>

                            <div class="tab-content">
                                <div class="tab-pane active" id="examples-Nodehealthcheck-nodeHealthcheck-0-curl">
                                    <pre class="prettyprint"><code class="language-bsh">curl -X GET "http://localhost/nodehealthcheck"</code></pre>
                                </div>
                                <div class="tab-pane" id="examples-Nodehealthcheck-nodeHealthcheck-0-java">
                            <pre class="prettyprint"><code class="language-java">import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.NodehealthcheckApi;

import java.io.File;
import java.util.*;

public class NodehealthcheckApiExample {

    public static void main(String[] args) {

        NodehealthcheckApi apiInstance = new NodehealthcheckApi();
        try {
            apiInstance.nodeHealthcheck();
        } catch (ApiException e) {
            System.err.println("Exception when calling NodehealthcheckApi#nodeHealthcheck");
            e.printStackTrace();
        }
    }
}</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-Nodehealthcheck-nodeHealthcheck-0-android">
                            <pre class="prettyprint"><code class="language-java">import io.swagger.client.api.NodehealthcheckApi;

public class NodehealthcheckApiExample {

    public static void main(String[] args) {
        NodehealthcheckApi apiInstance = new NodehealthcheckApi();
        try {
            apiInstance.nodeHealthcheck();
        } catch (ApiException e) {
            System.err.println("Exception when calling NodehealthcheckApi#nodeHealthcheck");
            e.printStackTrace();
        }
    }
}</code></pre>
                                </div>
                                <!--
  <div class="tab-pane" id="examples-Nodehealthcheck-nodeHealthcheck-0-groovy">
  <pre class="prettyprint language-json prettyprinted" data-type="json"><code>Coming Soon!</code></pre>
  </div> -->
                                <div class="tab-pane" id="examples-Nodehealthcheck-nodeHealthcheck-0-objc">
                              <pre class="prettyprint"><code class="language-cpp">
NodehealthcheckApi *apiInstance = [[NodehealthcheckApi alloc] init];

// Performing node health check
[apiInstance nodeHealthcheckWithCompletionHandler:
              ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-Nodehealthcheck-nodeHealthcheck-0-javascript">
                              <pre class="prettyprint"><code class="language-js">var SoGuilinApIs = require('so_guilin_ap_is');

var api = new SoGuilinApIs.NodehealthcheckApi()

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.nodeHealthcheck(callback);
</code></pre>
                                </div>

                                <!--<div class="tab-pane" id="examples-Nodehealthcheck-nodeHealthcheck-0-angular">
              <pre class="prettyprint language-json prettyprinted" data-type="json"><code>Coming Soon!</code></pre>
            </div>-->
                                <div class="tab-pane" id="examples-Nodehealthcheck-nodeHealthcheck-0-csharp">
                              <pre class="prettyprint"><code class="language-cs">using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class nodeHealthcheckExample
    {
        public void main()
        {

            var apiInstance = new NodehealthcheckApi();

            try
            {
                // Performing node health check
                apiInstance.nodeHealthcheck();
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling NodehealthcheckApi.nodeHealthcheck: " + e.Message );
            }
        }
    }
}
</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-Nodehealthcheck-nodeHealthcheck-0-php">
                              <pre class="prettyprint"><code class="language-php"><&#63;php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\NodehealthcheckApi();

try {
    $api_instance->nodeHealthcheck();
} catch (Exception $e) {
    echo 'Exception when calling NodehealthcheckApi->nodeHealthcheck: ', $e->getMessage(), PHP_EOL;
}
?></code></pre>
                                </div>

                                <div class="tab-pane" id="examples-Nodehealthcheck-nodeHealthcheck-0-perl">
                              <pre class="prettyprint"><code class="language-perl">use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::NodehealthcheckApi;

my $api_instance = WWW::SwaggerClient::NodehealthcheckApi->new();

eval {
    $api_instance->nodeHealthcheck();
};
if ($@) {
    warn "Exception when calling NodehealthcheckApi->nodeHealthcheck: $@\n";
}</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-Nodehealthcheck-nodeHealthcheck-0-python">
                              <pre class="prettyprint"><code class="language-python">from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.NodehealthcheckApi()

try:
    # Performing node health check
    api_instance.node_healthcheck()
except ApiException as e:
    print("Exception when calling NodehealthcheckApi->nodeHealthcheck: %s\n" % e)</code></pre>
                                </div>
                            </div>

                            <h2>Parameters</h2>






                            <h2>Responses</h2>
                            <h3> Status: default - successful operation </h3>

                            <ul class="nav nav-tabs nav-tabs-examples" >
                            </ul>

                            <div class="tab-content" style='margin-bottom: 10px;'>
                            </div>

                        </article>
                    </div>
                    <hr>
                </section>
                <section id="api-Onap3gppServiceInstances">
                    <h1>Onap3gppServiceInstances</h1>
                    <div id="api-Onap3gppServiceInstances-activate3gppService">
                        <article id="api-Onap3gppServiceInstances-activate3gppService-0" data-group="User" data-name="activate3gppService" data-version="0">
                            <div class="pull-left">
                                <h1>activate3gppService</h1>
                                <p>Activate a 3GPP Service Instance on a version provided</p>
                            </div>
                            <div class="pull-right"></div>
                            <div class="clearfix"></div>
                            <p></p>
                            <p class="marked"></p>
                            <p></p>
                            <br />
                            <pre class="prettyprint language-html prettyprinted" data-type="post"><code><span class="pln">/onap/so/infra/3gppservices/{version}/activate</span></code></pre>
                            <p>
                            <h3>Usage and SDK Samples</h3>
                            </p>
                            <ul class="nav nav-tabs nav-tabs-examples">
                                <li class="active"><a href="#examples-Onap3gppServiceInstances-activate3gppService-0-curl">Curl</a></li>
                                <li class=""><a href="#examples-Onap3gppServiceInstances-activate3gppService-0-java">Java</a></li>
                                <li class=""><a href="#examples-Onap3gppServiceInstances-activate3gppService-0-android">Android</a></li>
                                <!--<li class=""><a href="#examples-Onap3gppServiceInstances-activate3gppService-0-groovy">Groovy</a></li>-->
                                <li class=""><a href="#examples-Onap3gppServiceInstances-activate3gppService-0-objc">Obj-C</a></li>
                                <li class=""><a href="#examples-Onap3gppServiceInstances-activate3gppService-0-javascript">JavaScript</a></li>
                                <!--<li class=""><a href="#examples-Onap3gppServiceInstances-activate3gppService-0-angular">Angular</a></li>-->
                                <li class=""><a href="#examples-Onap3gppServiceInstances-activate3gppService-0-csharp">C#</a></li>
                                <li class=""><a href="#examples-Onap3gppServiceInstances-activate3gppService-0-php">PHP</a></li>
                                <li class=""><a href="#examples-Onap3gppServiceInstances-activate3gppService-0-perl">Perl</a></li>
                                <li class=""><a href="#examples-Onap3gppServiceInstances-activate3gppService-0-python">Python</a></li>
                            </ul>

                            <div class="tab-content">
                                <div class="tab-pane active" id="examples-Onap3gppServiceInstances-activate3gppService-0-curl">
                                    <pre class="prettyprint"><code class="language-bsh">curl -X POST "http://localhost/onap/so/infra/3gppservices/{version}/activate"</code></pre>
                                </div>
                                <div class="tab-pane" id="examples-Onap3gppServiceInstances-activate3gppService-0-java">
                            <pre class="prettyprint"><code class="language-java">import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.Onap3gppServiceInstancesApi;

import java.io.File;
import java.util.*;

public class Onap3gppServiceInstancesApiExample {

    public static void main(String[] args) {

        Onap3gppServiceInstancesApi apiInstance = new Onap3gppServiceInstancesApi();
        3gppServiceActivation body = ; // 3gppServiceActivation |
        String version = version_example; // String |
        try {
            3gppServiceResponse result = apiInstance.activate3gppService(body, version);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling Onap3gppServiceInstancesApi#activate3gppService");
            e.printStackTrace();
        }
    }
}</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-Onap3gppServiceInstances-activate3gppService-0-android">
                            <pre class="prettyprint"><code class="language-java">import io.swagger.client.api.Onap3gppServiceInstancesApi;

public class Onap3gppServiceInstancesApiExample {

    public static void main(String[] args) {
        Onap3gppServiceInstancesApi apiInstance = new Onap3gppServiceInstancesApi();
        3gppServiceActivation body = ; // 3gppServiceActivation |
        String version = version_example; // String |
        try {
            3gppServiceResponse result = apiInstance.activate3gppService(body, version);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling Onap3gppServiceInstancesApi#activate3gppService");
            e.printStackTrace();
        }
    }
}</code></pre>
                                </div>
                                <!--
  <div class="tab-pane" id="examples-Onap3gppServiceInstances-activate3gppService-0-groovy">
  <pre class="prettyprint language-json prettyprinted" data-type="json"><code>Coming Soon!</code></pre>
  </div> -->
                                <div class="tab-pane" id="examples-Onap3gppServiceInstances-activate3gppService-0-objc">
                              <pre class="prettyprint"><code class="language-cpp">3gppServiceActivation *body = ; //
String *version = version_example; //

Onap3gppServiceInstancesApi *apiInstance = [[Onap3gppServiceInstancesApi alloc] init];

// Activate a 3GPP Service Instance on a version provided
[apiInstance activate3gppServiceWith:body
    version:version
              completionHandler: ^(3gppServiceResponse output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-Onap3gppServiceInstances-activate3gppService-0-javascript">
                              <pre class="prettyprint"><code class="language-js">var SoGuilinApIs = require('so_guilin_ap_is');

var api = new SoGuilinApIs.Onap3gppServiceInstancesApi()

var body = ; // {3gppServiceActivation}

var version = version_example; // {String}


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.activate3gppService(body, version, callback);
</code></pre>
                                </div>

                                <!--<div class="tab-pane" id="examples-Onap3gppServiceInstances-activate3gppService-0-angular">
              <pre class="prettyprint language-json prettyprinted" data-type="json"><code>Coming Soon!</code></pre>
            </div>-->
                                <div class="tab-pane" id="examples-Onap3gppServiceInstances-activate3gppService-0-csharp">
                              <pre class="prettyprint"><code class="language-cs">using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class activate3gppServiceExample
    {
        public void main()
        {

            var apiInstance = new Onap3gppServiceInstancesApi();
            var body = new 3gppServiceActivation(); // 3gppServiceActivation |
            var version = version_example;  // String |

            try
            {
                // Activate a 3GPP Service Instance on a version provided
                3gppServiceResponse result = apiInstance.activate3gppService(body, version);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling Onap3gppServiceInstancesApi.activate3gppService: " + e.Message );
            }
        }
    }
}
</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-Onap3gppServiceInstances-activate3gppService-0-php">
                              <pre class="prettyprint"><code class="language-php"><&#63;php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\Onap3gppServiceInstancesApi();
$body = ; // 3gppServiceActivation |
$version = version_example; // String |

try {
    $result = $api_instance->activate3gppService($body, $version);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling Onap3gppServiceInstancesApi->activate3gppService: ', $e->getMessage(), PHP_EOL;
}
?></code></pre>
                                </div>

                                <div class="tab-pane" id="examples-Onap3gppServiceInstances-activate3gppService-0-perl">
                              <pre class="prettyprint"><code class="language-perl">use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::Onap3gppServiceInstancesApi;

my $api_instance = WWW::SwaggerClient::Onap3gppServiceInstancesApi->new();
my $body = WWW::SwaggerClient::Object::3gppServiceActivation->new(); # 3gppServiceActivation |
my $version = version_example; # String |

eval {
    my $result = $api_instance->activate3gppService(body => $body, version => $version);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling Onap3gppServiceInstancesApi->activate3gppService: $@\n";
}</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-Onap3gppServiceInstances-activate3gppService-0-python">
                              <pre class="prettyprint"><code class="language-python">from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.Onap3gppServiceInstancesApi()
body =  # 3gppServiceActivation |
version = version_example # String |

try:
    # Activate a 3GPP Service Instance on a version provided
    api_response = api_instance.activate3gpp_service(body, version)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling Onap3gppServiceInstancesApi->activate3gppService: %s\n" % e)</code></pre>
                                </div>
                            </div>

                            <h2>Parameters</h2>

                            <div class="methodsubtabletitle">Path parameters</div>
                            <table id="methodsubtable">
                                <tr>
                                    <th width="150px">Name</th>
                                    <th>Description</th>
                                </tr>
                                <tr><td style="width:150px;">version*</td>
                                    <td>


                                        <div id="d2e199_activate3gppService_version">
                                            <div class="json-schema-view">
                                                <div class="primitive">
                <span class="type">
                    String
                </span>

                                                </div>
                                                <div class="inner required">
                                                    Required
                                                </div>
                                            </div>
                                        </div>
                                    </td>
                                </tr>

                            </table>


                            <div class="methodsubtabletitle">Body parameters</div>
                            <table id="methodsubtable">
                                <tr>
                                    <th width="150px">Name</th>
                                    <th>Description</th>
                                </tr>
                                <tr><td style="width:150px;">body <span style="color:red;">*</span></td>
                                    <td>


                                        <script>
$(document).ready(function() {
  var schemaWrapper = {
  "in" : "body",
  "name" : "body",
  "required" : true,
  "schema" : {
    "$ref" : "#/definitions/3gppServiceActivation"
  }
};
  var schema = schemaWrapper.schema;
  if (schema.$ref != null) {
    schema = defsParser.$refs.get(schema.$ref);
  } else {
    schemaWrapper.definitions = Object.assign({}, defs);
    $RefParser.dereference(schemaWrapper).catch(function(err) {
      console.log(err);
    });
  }

  var view = new JSONSchemaView(schema,2,{isBodyParam: true});
  var result = $('#d2e199_activate3gppService_body');
  result.empty();
  result.append(view.render());
});
</script>
                                        <div id="d2e199_activate3gppService_body"></div>
                                    </td>
                                </tr>

                            </table>



                            <h2>Responses</h2>
                            <h3> Status: default - successful operation </h3>

                            <ul class="nav nav-tabs nav-tabs-examples" >
                                <li class="active">
                                    <a data-toggle="tab" href="#responses-activate3gppService-default-schema">Schema</a>
                                </li>

                            </ul>

                            <div class="tab-content" style='margin-bottom: 10px;'>
                                <div class="tab-pane active" id="responses-activate3gppService-default-schema">
                                    <div id='responses-activate3gppService-default-schema-default' style="padding: 30px; border-left: 1px solid #eee; border-right: 1px solid #eee; border-bottom: 1px solid #eee;">
                                        <script>
                                      $(document).ready(function() {
                                        var schemaWrapper = {
  "description" : "successful operation",
  "schema" : {
    "$ref" : "#/definitions/3gppServiceResponse"
  }
};
                                        var schema = schemaWrapper.schema;
                                        if (schema.$ref != null) {
                                          schema = defsParser.$refs.get(schema.$ref);
                                        } else {
                                          schemaWrapper.definitions = defs;
                                          $RefParser.dereference(schemaWrapper).catch(function(err) {
                                            console.log(err);
                                          });
                                        }

                                        //console.log(JSON.stringify(schema));
                                        var view = new JSONSchemaView(schema, 3);
                                        $('#responses-activate3gppService-default-schema-data').val(stringify(schema));
                                        var result = $('#responses-activate3gppService-default-schema-default');
                                        result.empty();
                                        result.append(view.render());
                                      });
                                    </script>
                                    </div>
                                    <input id='responses-activate3gppService-default-schema-data' type='hidden' value=''></input>
                                </div>
                            </div>

                        </article>
                    </div>
                    <hr>
                    <div id="api-Onap3gppServiceInstances-allocate3gppService">
                        <article id="api-Onap3gppServiceInstances-allocate3gppService-0" data-group="User" data-name="allocate3gppService" data-version="0">
                            <div class="pull-left">
                                <h1>allocate3gppService</h1>
                                <p>Create a 3GPP Service Instance on a version provided</p>
                            </div>
                            <div class="pull-right"></div>
                            <div class="clearfix"></div>
                            <p></p>
                            <p class="marked"></p>
                            <p></p>
                            <br />
                            <pre class="prettyprint language-html prettyprinted" data-type="post"><code><span class="pln">/onap/so/infra/3gppservices/{version}/allocate</span></code></pre>
                            <p>
                            <h3>Usage and SDK Samples</h3>
                            </p>
                            <ul class="nav nav-tabs nav-tabs-examples">
                                <li class="active"><a href="#examples-Onap3gppServiceInstances-allocate3gppService-0-curl">Curl</a></li>
                                <li class=""><a href="#examples-Onap3gppServiceInstances-allocate3gppService-0-java">Java</a></li>
                                <li class=""><a href="#examples-Onap3gppServiceInstances-allocate3gppService-0-android">Android</a></li>
                                <!--<li class=""><a href="#examples-Onap3gppServiceInstances-allocate3gppService-0-groovy">Groovy</a></li>-->
                                <li class=""><a href="#examples-Onap3gppServiceInstances-allocate3gppService-0-objc">Obj-C</a></li>
                                <li class=""><a href="#examples-Onap3gppServiceInstances-allocate3gppService-0-javascript">JavaScript</a></li>
                                <!--<li class=""><a href="#examples-Onap3gppServiceInstances-allocate3gppService-0-angular">Angular</a></li>-->
                                <li class=""><a href="#examples-Onap3gppServiceInstances-allocate3gppService-0-csharp">C#</a></li>
                                <li class=""><a href="#examples-Onap3gppServiceInstances-allocate3gppService-0-php">PHP</a></li>
                                <li class=""><a href="#examples-Onap3gppServiceInstances-allocate3gppService-0-perl">Perl</a></li>
                                <li class=""><a href="#examples-Onap3gppServiceInstances-allocate3gppService-0-python">Python</a></li>
                            </ul>

                            <div class="tab-content">
                                <div class="tab-pane active" id="examples-Onap3gppServiceInstances-allocate3gppService-0-curl">
                                    <pre class="prettyprint"><code class="language-bsh">curl -X POST "http://localhost/onap/so/infra/3gppservices/{version}/allocate"</code></pre>
                                </div>
                                <div class="tab-pane" id="examples-Onap3gppServiceInstances-allocate3gppService-0-java">
                            <pre class="prettyprint"><code class="language-java">import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.Onap3gppServiceInstancesApi;

import java.io.File;
import java.util.*;

public class Onap3gppServiceInstancesApiExample {

    public static void main(String[] args) {

        Onap3gppServiceInstancesApi apiInstance = new Onap3gppServiceInstancesApi();
        Allocate3gppService body = ; // Allocate3gppService |
        String version = version_example; // String |
        try {
            3gppServiceResponse result = apiInstance.allocate3gppService(body, version);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling Onap3gppServiceInstancesApi#allocate3gppService");
            e.printStackTrace();
        }
    }
}</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-Onap3gppServiceInstances-allocate3gppService-0-android">
                            <pre class="prettyprint"><code class="language-java">import io.swagger.client.api.Onap3gppServiceInstancesApi;

public class Onap3gppServiceInstancesApiExample {

    public static void main(String[] args) {
        Onap3gppServiceInstancesApi apiInstance = new Onap3gppServiceInstancesApi();
        Allocate3gppService body = ; // Allocate3gppService |
        String version = version_example; // String |
        try {
            3gppServiceResponse result = apiInstance.allocate3gppService(body, version);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling Onap3gppServiceInstancesApi#allocate3gppService");
            e.printStackTrace();
        }
    }
}</code></pre>
                                </div>
                                <!--
  <div class="tab-pane" id="examples-Onap3gppServiceInstances-allocate3gppService-0-groovy">
  <pre class="prettyprint language-json prettyprinted" data-type="json"><code>Coming Soon!</code></pre>
  </div> -->
                                <div class="tab-pane" id="examples-Onap3gppServiceInstances-allocate3gppService-0-objc">
                              <pre class="prettyprint"><code class="language-cpp">Allocate3gppService *body = ; //
String *version = version_example; //

Onap3gppServiceInstancesApi *apiInstance = [[Onap3gppServiceInstancesApi alloc] init];

// Create a 3GPP Service Instance on a version provided
[apiInstance allocate3gppServiceWith:body
    version:version
              completionHandler: ^(3gppServiceResponse output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-Onap3gppServiceInstances-allocate3gppService-0-javascript">
                              <pre class="prettyprint"><code class="language-js">var SoGuilinApIs = require('so_guilin_ap_is');

var api = new SoGuilinApIs.Onap3gppServiceInstancesApi()

var body = ; // {Allocate3gppService}

var version = version_example; // {String}


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.allocate3gppService(body, version, callback);
</code></pre>
                                </div>

                                <!--<div class="tab-pane" id="examples-Onap3gppServiceInstances-allocate3gppService-0-angular">
              <pre class="prettyprint language-json prettyprinted" data-type="json"><code>Coming Soon!</code></pre>
            </div>-->
                                <div class="tab-pane" id="examples-Onap3gppServiceInstances-allocate3gppService-0-csharp">
                              <pre class="prettyprint"><code class="language-cs">using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class allocate3gppServiceExample
    {
        public void main()
        {

            var apiInstance = new Onap3gppServiceInstancesApi();
            var body = new Allocate3gppService(); // Allocate3gppService |
            var version = version_example;  // String |

            try
            {
                // Create a 3GPP Service Instance on a version provided
                3gppServiceResponse result = apiInstance.allocate3gppService(body, version);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling Onap3gppServiceInstancesApi.allocate3gppService: " + e.Message );
            }
        }
    }
}
</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-Onap3gppServiceInstances-allocate3gppService-0-php">
                              <pre class="prettyprint"><code class="language-php"><&#63;php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\Onap3gppServiceInstancesApi();
$body = ; // Allocate3gppService |
$version = version_example; // String |

try {
    $result = $api_instance->allocate3gppService($body, $version);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling Onap3gppServiceInstancesApi->allocate3gppService: ', $e->getMessage(), PHP_EOL;
}
?></code></pre>
                                </div>

                                <div class="tab-pane" id="examples-Onap3gppServiceInstances-allocate3gppService-0-perl">
                              <pre class="prettyprint"><code class="language-perl">use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::Onap3gppServiceInstancesApi;

my $api_instance = WWW::SwaggerClient::Onap3gppServiceInstancesApi->new();
my $body = WWW::SwaggerClient::Object::Allocate3gppService->new(); # Allocate3gppService |
my $version = version_example; # String |

eval {
    my $result = $api_instance->allocate3gppService(body => $body, version => $version);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling Onap3gppServiceInstancesApi->allocate3gppService: $@\n";
}</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-Onap3gppServiceInstances-allocate3gppService-0-python">
                              <pre class="prettyprint"><code class="language-python">from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.Onap3gppServiceInstancesApi()
body =  # Allocate3gppService |
version = version_example # String |

try:
    # Create a 3GPP Service Instance on a version provided
    api_response = api_instance.allocate3gpp_service(body, version)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling Onap3gppServiceInstancesApi->allocate3gppService: %s\n" % e)</code></pre>
                                </div>
                            </div>

                            <h2>Parameters</h2>

                            <div class="methodsubtabletitle">Path parameters</div>
                            <table id="methodsubtable">
                                <tr>
                                    <th width="150px">Name</th>
                                    <th>Description</th>
                                </tr>
                                <tr><td style="width:150px;">version*</td>
                                    <td>


                                        <div id="d2e199_allocate3gppService_version">
                                            <div class="json-schema-view">
                                                <div class="primitive">
                <span class="type">
                    String
                </span>

                                                </div>
                                                <div class="inner required">
                                                    Required
                                                </div>
                                            </div>
                                        </div>
                                    </td>
                                </tr>

                            </table>


                            <div class="methodsubtabletitle">Body parameters</div>
                            <table id="methodsubtable">
                                <tr>
                                    <th width="150px">Name</th>
                                    <th>Description</th>
                                </tr>
                                <tr><td style="width:150px;">body <span style="color:red;">*</span></td>
                                    <td>


                                        <script>
$(document).ready(function() {
  var schemaWrapper = {
  "in" : "body",
  "name" : "body",
  "required" : true,
  "schema" : {
    "$ref" : "#/definitions/Allocate3gppService"
  }
};
  var schema = schemaWrapper.schema;
  if (schema.$ref != null) {
    schema = defsParser.$refs.get(schema.$ref);
  } else {
    schemaWrapper.definitions = Object.assign({}, defs);
    $RefParser.dereference(schemaWrapper).catch(function(err) {
      console.log(err);
    });
  }

  var view = new JSONSchemaView(schema,2,{isBodyParam: true});
  var result = $('#d2e199_allocate3gppService_body');
  result.empty();
  result.append(view.render());
});
</script>
                                        <div id="d2e199_allocate3gppService_body"></div>
                                    </td>
                                </tr>

                            </table>



                            <h2>Responses</h2>
                            <h3> Status: default - successful operation </h3>

                            <ul class="nav nav-tabs nav-tabs-examples" >
                                <li class="active">
                                    <a data-toggle="tab" href="#responses-allocate3gppService-default-schema">Schema</a>
                                </li>

                            </ul>

                            <div class="tab-content" style='margin-bottom: 10px;'>
                                <div class="tab-pane active" id="responses-allocate3gppService-default-schema">
                                    <div id='responses-allocate3gppService-default-schema-default' style="padding: 30px; border-left: 1px solid #eee; border-right: 1px solid #eee; border-bottom: 1px solid #eee;">
                                        <script>
                                      $(document).ready(function() {
                                        var schemaWrapper = {
  "description" : "successful operation",
  "schema" : {
    "$ref" : "#/definitions/3gppServiceResponse"
  }
};
                                        var schema = schemaWrapper.schema;
                                        if (schema.$ref != null) {
                                          schema = defsParser.$refs.get(schema.$ref);
                                        } else {
                                          schemaWrapper.definitions = defs;
                                          $RefParser.dereference(schemaWrapper).catch(function(err) {
                                            console.log(err);
                                          });
                                        }

                                        //console.log(JSON.stringify(schema));
                                        var view = new JSONSchemaView(schema, 3);
                                        $('#responses-allocate3gppService-default-schema-data').val(stringify(schema));
                                        var result = $('#responses-allocate3gppService-default-schema-default');
                                        result.empty();
                                        result.append(view.render());
                                      });
                                    </script>
                                    </div>
                                    <input id='responses-allocate3gppService-default-schema-data' type='hidden' value=''></input>
                                </div>
                            </div>

                        </article>
                    </div>
                    <hr>
                    <div id="api-Onap3gppServiceInstances-deactivate3gppService">
                        <article id="api-Onap3gppServiceInstances-deactivate3gppService-0" data-group="User" data-name="deactivate3gppService" data-version="0">
                            <div class="pull-left">
                                <h1>deactivate3gppService</h1>
                                <p>Deactivate a 3GPP Service Instance on a version provided</p>
                            </div>
                            <div class="pull-right"></div>
                            <div class="clearfix"></div>
                            <p></p>
                            <p class="marked"></p>
                            <p></p>
                            <br />
                            <pre class="prettyprint language-html prettyprinted" data-type="post"><code><span class="pln">/onap/so/infra/3gppservices/{version}/deActivate</span></code></pre>
                            <p>
                            <h3>Usage and SDK Samples</h3>
                            </p>
                            <ul class="nav nav-tabs nav-tabs-examples">
                                <li class="active"><a href="#examples-Onap3gppServiceInstances-deactivate3gppService-0-curl">Curl</a></li>
                                <li class=""><a href="#examples-Onap3gppServiceInstances-deactivate3gppService-0-java">Java</a></li>
                                <li class=""><a href="#examples-Onap3gppServiceInstances-deactivate3gppService-0-android">Android</a></li>
                                <!--<li class=""><a href="#examples-Onap3gppServiceInstances-deactivate3gppService-0-groovy">Groovy</a></li>-->
                                <li class=""><a href="#examples-Onap3gppServiceInstances-deactivate3gppService-0-objc">Obj-C</a></li>
                                <li class=""><a href="#examples-Onap3gppServiceInstances-deactivate3gppService-0-javascript">JavaScript</a></li>
                                <!--<li class=""><a href="#examples-Onap3gppServiceInstances-deactivate3gppService-0-angular">Angular</a></li>-->
                                <li class=""><a href="#examples-Onap3gppServiceInstances-deactivate3gppService-0-csharp">C#</a></li>
                                <li class=""><a href="#examples-Onap3gppServiceInstances-deactivate3gppService-0-php">PHP</a></li>
                                <li class=""><a href="#examples-Onap3gppServiceInstances-deactivate3gppService-0-perl">Perl</a></li>
                                <li class=""><a href="#examples-Onap3gppServiceInstances-deactivate3gppService-0-python">Python</a></li>
                            </ul>

                            <div class="tab-content">
                                <div class="tab-pane active" id="examples-Onap3gppServiceInstances-deactivate3gppService-0-curl">
                                    <pre class="prettyprint"><code class="language-bsh">curl -X POST "http://localhost/onap/so/infra/3gppservices/{version}/deActivate"</code></pre>
                                </div>
                                <div class="tab-pane" id="examples-Onap3gppServiceInstances-deactivate3gppService-0-java">
                            <pre class="prettyprint"><code class="language-java">import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.Onap3gppServiceInstancesApi;

import java.io.File;
import java.util.*;

public class Onap3gppServiceInstancesApiExample {

    public static void main(String[] args) {

        Onap3gppServiceInstancesApi apiInstance = new Onap3gppServiceInstancesApi();
        3gppServiceActivation body = ; // 3gppServiceActivation |
        String version = version_example; // String |
        try {
            3gppServiceResponse result = apiInstance.deactivate3gppService(body, version);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling Onap3gppServiceInstancesApi#deactivate3gppService");
            e.printStackTrace();
        }
    }
}</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-Onap3gppServiceInstances-deactivate3gppService-0-android">
                            <pre class="prettyprint"><code class="language-java">import io.swagger.client.api.Onap3gppServiceInstancesApi;

public class Onap3gppServiceInstancesApiExample {

    public static void main(String[] args) {
        Onap3gppServiceInstancesApi apiInstance = new Onap3gppServiceInstancesApi();
        3gppServiceActivation body = ; // 3gppServiceActivation |
        String version = version_example; // String |
        try {
            3gppServiceResponse result = apiInstance.deactivate3gppService(body, version);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling Onap3gppServiceInstancesApi#deactivate3gppService");
            e.printStackTrace();
        }
    }
}</code></pre>
                                </div>
                                <!--
  <div class="tab-pane" id="examples-Onap3gppServiceInstances-deactivate3gppService-0-groovy">
  <pre class="prettyprint language-json prettyprinted" data-type="json"><code>Coming Soon!</code></pre>
  </div> -->
                                <div class="tab-pane" id="examples-Onap3gppServiceInstances-deactivate3gppService-0-objc">
                              <pre class="prettyprint"><code class="language-cpp">3gppServiceActivation *body = ; //
String *version = version_example; //

Onap3gppServiceInstancesApi *apiInstance = [[Onap3gppServiceInstancesApi alloc] init];

// Deactivate a 3GPP Service Instance on a version provided
[apiInstance deactivate3gppServiceWith:body
    version:version
              completionHandler: ^(3gppServiceResponse output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-Onap3gppServiceInstances-deactivate3gppService-0-javascript">
                              <pre class="prettyprint"><code class="language-js">var SoGuilinApIs = require('so_guilin_ap_is');

var api = new SoGuilinApIs.Onap3gppServiceInstancesApi()

var body = ; // {3gppServiceActivation}

var version = version_example; // {String}


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.deactivate3gppService(body, version, callback);
</code></pre>
                                </div>

                                <!--<div class="tab-pane" id="examples-Onap3gppServiceInstances-deactivate3gppService-0-angular">
              <pre class="prettyprint language-json prettyprinted" data-type="json"><code>Coming Soon!</code></pre>
            </div>-->
                                <div class="tab-pane" id="examples-Onap3gppServiceInstances-deactivate3gppService-0-csharp">
                              <pre class="prettyprint"><code class="language-cs">using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class deactivate3gppServiceExample
    {
        public void main()
        {

            var apiInstance = new Onap3gppServiceInstancesApi();
            var body = new 3gppServiceActivation(); // 3gppServiceActivation |
            var version = version_example;  // String |

            try
            {
                // Deactivate a 3GPP Service Instance on a version provided
                3gppServiceResponse result = apiInstance.deactivate3gppService(body, version);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling Onap3gppServiceInstancesApi.deactivate3gppService: " + e.Message );
            }
        }
    }
}
</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-Onap3gppServiceInstances-deactivate3gppService-0-php">
                              <pre class="prettyprint"><code class="language-php"><&#63;php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\Onap3gppServiceInstancesApi();
$body = ; // 3gppServiceActivation |
$version = version_example; // String |

try {
    $result = $api_instance->deactivate3gppService($body, $version);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling Onap3gppServiceInstancesApi->deactivate3gppService: ', $e->getMessage(), PHP_EOL;
}
?></code></pre>
                                </div>

                                <div class="tab-pane" id="examples-Onap3gppServiceInstances-deactivate3gppService-0-perl">
                              <pre class="prettyprint"><code class="language-perl">use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::Onap3gppServiceInstancesApi;

my $api_instance = WWW::SwaggerClient::Onap3gppServiceInstancesApi->new();
my $body = WWW::SwaggerClient::Object::3gppServiceActivation->new(); # 3gppServiceActivation |
my $version = version_example; # String |

eval {
    my $result = $api_instance->deactivate3gppService(body => $body, version => $version);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling Onap3gppServiceInstancesApi->deactivate3gppService: $@\n";
}</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-Onap3gppServiceInstances-deactivate3gppService-0-python">
                              <pre class="prettyprint"><code class="language-python">from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.Onap3gppServiceInstancesApi()
body =  # 3gppServiceActivation |
version = version_example # String |

try:
    # Deactivate a 3GPP Service Instance on a version provided
    api_response = api_instance.deactivate3gpp_service(body, version)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling Onap3gppServiceInstancesApi->deactivate3gppService: %s\n" % e)</code></pre>
                                </div>
                            </div>

                            <h2>Parameters</h2>

                            <div class="methodsubtabletitle">Path parameters</div>
                            <table id="methodsubtable">
                                <tr>
                                    <th width="150px">Name</th>
                                    <th>Description</th>
                                </tr>
                                <tr><td style="width:150px;">version*</td>
                                    <td>


                                        <div id="d2e199_deactivate3gppService_version">
                                            <div class="json-schema-view">
                                                <div class="primitive">
                <span class="type">
                    String
                </span>

                                                </div>
                                                <div class="inner required">
                                                    Required
                                                </div>
                                            </div>
                                        </div>
                                    </td>
                                </tr>

                            </table>


                            <div class="methodsubtabletitle">Body parameters</div>
                            <table id="methodsubtable">
                                <tr>
                                    <th width="150px">Name</th>
                                    <th>Description</th>
                                </tr>
                                <tr><td style="width:150px;">body <span style="color:red;">*</span></td>
                                    <td>


                                        <script>
$(document).ready(function() {
  var schemaWrapper = {
  "in" : "body",
  "name" : "body",
  "required" : true,
  "schema" : {
    "$ref" : "#/definitions/3gppServiceActivation"
  }
};
  var schema = schemaWrapper.schema;
  if (schema.$ref != null) {
    schema = defsParser.$refs.get(schema.$ref);
  } else {
    schemaWrapper.definitions = Object.assign({}, defs);
    $RefParser.dereference(schemaWrapper).catch(function(err) {
      console.log(err);
    });
  }

  var view = new JSONSchemaView(schema,2,{isBodyParam: true});
  var result = $('#d2e199_deactivate3gppService_body');
  result.empty();
  result.append(view.render());
});
</script>
                                        <div id="d2e199_deactivate3gppService_body"></div>
                                    </td>
                                </tr>

                            </table>



                            <h2>Responses</h2>
                            <h3> Status: default - successful operation </h3>

                            <ul class="nav nav-tabs nav-tabs-examples" >
                                <li class="active">
                                    <a data-toggle="tab" href="#responses-deactivate3gppService-default-schema">Schema</a>
                                </li>

                            </ul>

                            <div class="tab-content" style='margin-bottom: 10px;'>
                                <div class="tab-pane active" id="responses-deactivate3gppService-default-schema">
                                    <div id='responses-deactivate3gppService-default-schema-default' style="padding: 30px; border-left: 1px solid #eee; border-right: 1px solid #eee; border-bottom: 1px solid #eee;">
                                        <script>
                                      $(document).ready(function() {
                                        var schemaWrapper = {
  "description" : "successful operation",
  "schema" : {
    "$ref" : "#/definitions/3gppServiceResponse"
  }
};
                                        var schema = schemaWrapper.schema;
                                        if (schema.$ref != null) {
                                          schema = defsParser.$refs.get(schema.$ref);
                                        } else {
                                          schemaWrapper.definitions = defs;
                                          $RefParser.dereference(schemaWrapper).catch(function(err) {
                                            console.log(err);
                                          });
                                        }

                                        //console.log(JSON.stringify(schema));
                                        var view = new JSONSchemaView(schema, 3);
                                        $('#responses-deactivate3gppService-default-schema-data').val(stringify(schema));
                                        var result = $('#responses-deactivate3gppService-default-schema-default');
                                        result.empty();
                                        result.append(view.render());
                                      });
                                    </script>
                                    </div>
                                    <input id='responses-deactivate3gppService-default-schema-data' type='hidden' value=''></input>
                                </div>
                            </div>

                        </article>
                    </div>
                    <hr>
                    <div id="api-Onap3gppServiceInstances-deallocate3gppService">
                        <article id="api-Onap3gppServiceInstances-deallocate3gppService-0" data-group="User" data-name="deallocate3gppService" data-version="0">
                            <div class="pull-left">
                                <h1>deallocate3gppService</h1>
                                <p>Terminate/Deallocate a 3GPP Service Instance on a version provided</p>
                            </div>
                            <div class="pull-right"></div>
                            <div class="clearfix"></div>
                            <p></p>
                            <p class="marked"></p>
                            <p></p>
                            <br />
                            <pre class="prettyprint language-html prettyprinted" data-type="delete"><code><span class="pln">/onap/so/infra/3gppservices/{version}/deAllocate</span></code></pre>
                            <p>
                            <h3>Usage and SDK Samples</h3>
                            </p>
                            <ul class="nav nav-tabs nav-tabs-examples">
                                <li class="active"><a href="#examples-Onap3gppServiceInstances-deallocate3gppService-0-curl">Curl</a></li>
                                <li class=""><a href="#examples-Onap3gppServiceInstances-deallocate3gppService-0-java">Java</a></li>
                                <li class=""><a href="#examples-Onap3gppServiceInstances-deallocate3gppService-0-android">Android</a></li>
                                <!--<li class=""><a href="#examples-Onap3gppServiceInstances-deallocate3gppService-0-groovy">Groovy</a></li>-->
                                <li class=""><a href="#examples-Onap3gppServiceInstances-deallocate3gppService-0-objc">Obj-C</a></li>
                                <li class=""><a href="#examples-Onap3gppServiceInstances-deallocate3gppService-0-javascript">JavaScript</a></li>
                                <!--<li class=""><a href="#examples-Onap3gppServiceInstances-deallocate3gppService-0-angular">Angular</a></li>-->
                                <li class=""><a href="#examples-Onap3gppServiceInstances-deallocate3gppService-0-csharp">C#</a></li>
                                <li class=""><a href="#examples-Onap3gppServiceInstances-deallocate3gppService-0-php">PHP</a></li>
                                <li class=""><a href="#examples-Onap3gppServiceInstances-deallocate3gppService-0-perl">Perl</a></li>
                                <li class=""><a href="#examples-Onap3gppServiceInstances-deallocate3gppService-0-python">Python</a></li>
                            </ul>

                            <div class="tab-content">
                                <div class="tab-pane active" id="examples-Onap3gppServiceInstances-deallocate3gppService-0-curl">
                                    <pre class="prettyprint"><code class="language-bsh">curl -X DELETE "http://localhost/onap/so/infra/3gppservices/{version}/deAllocate"</code></pre>
                                </div>
                                <div class="tab-pane" id="examples-Onap3gppServiceInstances-deallocate3gppService-0-java">
                            <pre class="prettyprint"><code class="language-java">import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.Onap3gppServiceInstancesApi;

import java.io.File;
import java.util.*;

public class Onap3gppServiceInstancesApiExample {

    public static void main(String[] args) {

        Onap3gppServiceInstancesApi apiInstance = new Onap3gppServiceInstancesApi();
        DeAllocate3gppService body = ; // DeAllocate3gppService |
        String version = version_example; // String |
        try {
            3gppServiceResponse result = apiInstance.deallocate3gppService(body, version);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling Onap3gppServiceInstancesApi#deallocate3gppService");
            e.printStackTrace();
        }
    }
}</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-Onap3gppServiceInstances-deallocate3gppService-0-android">
                            <pre class="prettyprint"><code class="language-java">import io.swagger.client.api.Onap3gppServiceInstancesApi;

public class Onap3gppServiceInstancesApiExample {

    public static void main(String[] args) {
        Onap3gppServiceInstancesApi apiInstance = new Onap3gppServiceInstancesApi();
        DeAllocate3gppService body = ; // DeAllocate3gppService |
        String version = version_example; // String |
        try {
            3gppServiceResponse result = apiInstance.deallocate3gppService(body, version);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling Onap3gppServiceInstancesApi#deallocate3gppService");
            e.printStackTrace();
        }
    }
}</code></pre>
                                </div>
                                <!--
  <div class="tab-pane" id="examples-Onap3gppServiceInstances-deallocate3gppService-0-groovy">
  <pre class="prettyprint language-json prettyprinted" data-type="json"><code>Coming Soon!</code></pre>
  </div> -->
                                <div class="tab-pane" id="examples-Onap3gppServiceInstances-deallocate3gppService-0-objc">
                              <pre class="prettyprint"><code class="language-cpp">DeAllocate3gppService *body = ; //
String *version = version_example; //

Onap3gppServiceInstancesApi *apiInstance = [[Onap3gppServiceInstancesApi alloc] init];

// Terminate/Deallocate a 3GPP Service Instance on a version provided
[apiInstance deallocate3gppServiceWith:body
    version:version
              completionHandler: ^(3gppServiceResponse output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-Onap3gppServiceInstances-deallocate3gppService-0-javascript">
                              <pre class="prettyprint"><code class="language-js">var SoGuilinApIs = require('so_guilin_ap_is');

var api = new SoGuilinApIs.Onap3gppServiceInstancesApi()

var body = ; // {DeAllocate3gppService}

var version = version_example; // {String}


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.deallocate3gppService(body, version, callback);
</code></pre>
                                </div>

                                <!--<div class="tab-pane" id="examples-Onap3gppServiceInstances-deallocate3gppService-0-angular">
              <pre class="prettyprint language-json prettyprinted" data-type="json"><code>Coming Soon!</code></pre>
            </div>-->
                                <div class="tab-pane" id="examples-Onap3gppServiceInstances-deallocate3gppService-0-csharp">
                              <pre class="prettyprint"><code class="language-cs">using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class deallocate3gppServiceExample
    {
        public void main()
        {

            var apiInstance = new Onap3gppServiceInstancesApi();
            var body = new DeAllocate3gppService(); // DeAllocate3gppService |
            var version = version_example;  // String |

            try
            {
                // Terminate/Deallocate a 3GPP Service Instance on a version provided
                3gppServiceResponse result = apiInstance.deallocate3gppService(body, version);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling Onap3gppServiceInstancesApi.deallocate3gppService: " + e.Message );
            }
        }
    }
}
</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-Onap3gppServiceInstances-deallocate3gppService-0-php">
                              <pre class="prettyprint"><code class="language-php"><&#63;php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\Onap3gppServiceInstancesApi();
$body = ; // DeAllocate3gppService |
$version = version_example; // String |

try {
    $result = $api_instance->deallocate3gppService($body, $version);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling Onap3gppServiceInstancesApi->deallocate3gppService: ', $e->getMessage(), PHP_EOL;
}
?></code></pre>
                                </div>

                                <div class="tab-pane" id="examples-Onap3gppServiceInstances-deallocate3gppService-0-perl">
                              <pre class="prettyprint"><code class="language-perl">use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::Onap3gppServiceInstancesApi;

my $api_instance = WWW::SwaggerClient::Onap3gppServiceInstancesApi->new();
my $body = WWW::SwaggerClient::Object::DeAllocate3gppService->new(); # DeAllocate3gppService |
my $version = version_example; # String |

eval {
    my $result = $api_instance->deallocate3gppService(body => $body, version => $version);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling Onap3gppServiceInstancesApi->deallocate3gppService: $@\n";
}</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-Onap3gppServiceInstances-deallocate3gppService-0-python">
                              <pre class="prettyprint"><code class="language-python">from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.Onap3gppServiceInstancesApi()
body =  # DeAllocate3gppService |
version = version_example # String |

try:
    # Terminate/Deallocate a 3GPP Service Instance on a version provided
    api_response = api_instance.deallocate3gpp_service(body, version)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling Onap3gppServiceInstancesApi->deallocate3gppService: %s\n" % e)</code></pre>
                                </div>
                            </div>

                            <h2>Parameters</h2>

                            <div class="methodsubtabletitle">Path parameters</div>
                            <table id="methodsubtable">
                                <tr>
                                    <th width="150px">Name</th>
                                    <th>Description</th>
                                </tr>
                                <tr><td style="width:150px;">version*</td>
                                    <td>


                                        <div id="d2e199_deallocate3gppService_version">
                                            <div class="json-schema-view">
                                                <div class="primitive">
                <span class="type">
                    String
                </span>

                                                </div>
                                                <div class="inner required">
                                                    Required
                                                </div>
                                            </div>
                                        </div>
                                    </td>
                                </tr>

                            </table>


                            <div class="methodsubtabletitle">Body parameters</div>
                            <table id="methodsubtable">
                                <tr>
                                    <th width="150px">Name</th>
                                    <th>Description</th>
                                </tr>
                                <tr><td style="width:150px;">body <span style="color:red;">*</span></td>
                                    <td>


                                        <script>
$(document).ready(function() {
  var schemaWrapper = {
  "in" : "body",
  "name" : "body",
  "required" : true,
  "schema" : {
    "$ref" : "#/definitions/DeAllocate3gppService"
  }
};
  var schema = schemaWrapper.schema;
  if (schema.$ref != null) {
    schema = defsParser.$refs.get(schema.$ref);
  } else {
    schemaWrapper.definitions = Object.assign({}, defs);
    $RefParser.dereference(schemaWrapper).catch(function(err) {
      console.log(err);
    });
  }

  var view = new JSONSchemaView(schema,2,{isBodyParam: true});
  var result = $('#d2e199_deallocate3gppService_body');
  result.empty();
  result.append(view.render());
});
</script>
                                        <div id="d2e199_deallocate3gppService_body"></div>
                                    </td>
                                </tr>

                            </table>



                            <h2>Responses</h2>
                            <h3> Status: default - successful operation </h3>

                            <ul class="nav nav-tabs nav-tabs-examples" >
                                <li class="active">
                                    <a data-toggle="tab" href="#responses-deallocate3gppService-default-schema">Schema</a>
                                </li>

                            </ul>

                            <div class="tab-content" style='margin-bottom: 10px;'>
                                <div class="tab-pane active" id="responses-deallocate3gppService-default-schema">
                                    <div id='responses-deallocate3gppService-default-schema-default' style="padding: 30px; border-left: 1px solid #eee; border-right: 1px solid #eee; border-bottom: 1px solid #eee;">
                                        <script>
                                      $(document).ready(function() {
                                        var schemaWrapper = {
  "description" : "successful operation",
  "schema" : {
    "$ref" : "#/definitions/3gppServiceResponse"
  }
};
                                        var schema = schemaWrapper.schema;
                                        if (schema.$ref != null) {
                                          schema = defsParser.$refs.get(schema.$ref);
                                        } else {
                                          schemaWrapper.definitions = defs;
                                          $RefParser.dereference(schemaWrapper).catch(function(err) {
                                            console.log(err);
                                          });
                                        }

                                        //console.log(JSON.stringify(schema));
                                        var view = new JSONSchemaView(schema, 3);
                                        $('#responses-deallocate3gppService-default-schema-data').val(stringify(schema));
                                        var result = $('#responses-deallocate3gppService-default-schema-default');
                                        result.empty();
                                        result.append(view.render());
                                      });
                                    </script>
                                    </div>
                                    <input id='responses-deallocate3gppService-default-schema-data' type='hidden' value=''></input>
                                </div>
                            </div>

                        </article>
                    </div>
                    <hr>
                    <div id="api-Onap3gppServiceInstances-modify3gppService">
                        <article id="api-Onap3gppServiceInstances-modify3gppService-0" data-group="User" data-name="modify3gppService" data-version="0">
                            <div class="pull-left">
                                <h1>modify3gppService</h1>
                                <p>Modify a 3GPP Service Instance on a version provided</p>
                            </div>
                            <div class="pull-right"></div>
                            <div class="clearfix"></div>
                            <p></p>
                            <p class="marked"></p>
                            <p></p>
                            <br />
                            <pre class="prettyprint language-html prettyprinted" data-type="put"><code><span class="pln">/onap/so/infra/3gppservices/{version}/modify</span></code></pre>
                            <p>
                            <h3>Usage and SDK Samples</h3>
                            </p>
                            <ul class="nav nav-tabs nav-tabs-examples">
                                <li class="active"><a href="#examples-Onap3gppServiceInstances-modify3gppService-0-curl">Curl</a></li>
                                <li class=""><a href="#examples-Onap3gppServiceInstances-modify3gppService-0-java">Java</a></li>
                                <li class=""><a href="#examples-Onap3gppServiceInstances-modify3gppService-0-android">Android</a></li>
                                <!--<li class=""><a href="#examples-Onap3gppServiceInstances-modify3gppService-0-groovy">Groovy</a></li>-->
                                <li class=""><a href="#examples-Onap3gppServiceInstances-modify3gppService-0-objc">Obj-C</a></li>
                                <li class=""><a href="#examples-Onap3gppServiceInstances-modify3gppService-0-javascript">JavaScript</a></li>
                                <!--<li class=""><a href="#examples-Onap3gppServiceInstances-modify3gppService-0-angular">Angular</a></li>-->
                                <li class=""><a href="#examples-Onap3gppServiceInstances-modify3gppService-0-csharp">C#</a></li>
                                <li class=""><a href="#examples-Onap3gppServiceInstances-modify3gppService-0-php">PHP</a></li>
                                <li class=""><a href="#examples-Onap3gppServiceInstances-modify3gppService-0-perl">Perl</a></li>
                                <li class=""><a href="#examples-Onap3gppServiceInstances-modify3gppService-0-python">Python</a></li>
                            </ul>

                            <div class="tab-content">
                                <div class="tab-pane active" id="examples-Onap3gppServiceInstances-modify3gppService-0-curl">
                                    <pre class="prettyprint"><code class="language-bsh">curl -X PUT "http://localhost/onap/so/infra/3gppservices/{version}/modify"</code></pre>
                                </div>
                                <div class="tab-pane" id="examples-Onap3gppServiceInstances-modify3gppService-0-java">
                            <pre class="prettyprint"><code class="language-java">import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.Onap3gppServiceInstancesApi;

import java.io.File;
import java.util.*;

public class Onap3gppServiceInstancesApiExample {

    public static void main(String[] args) {

        Onap3gppServiceInstancesApi apiInstance = new Onap3gppServiceInstancesApi();
        Modify3gppService body = ; // Modify3gppService |
        String version = version_example; // String |
        try {
            3gppServiceResponse result = apiInstance.modify3gppService(body, version);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling Onap3gppServiceInstancesApi#modify3gppService");
            e.printStackTrace();
        }
    }
}</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-Onap3gppServiceInstances-modify3gppService-0-android">
                            <pre class="prettyprint"><code class="language-java">import io.swagger.client.api.Onap3gppServiceInstancesApi;

public class Onap3gppServiceInstancesApiExample {

    public static void main(String[] args) {
        Onap3gppServiceInstancesApi apiInstance = new Onap3gppServiceInstancesApi();
        Modify3gppService body = ; // Modify3gppService |
        String version = version_example; // String |
        try {
            3gppServiceResponse result = apiInstance.modify3gppService(body, version);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling Onap3gppServiceInstancesApi#modify3gppService");
            e.printStackTrace();
        }
    }
}</code></pre>
                                </div>
                                <!--
  <div class="tab-pane" id="examples-Onap3gppServiceInstances-modify3gppService-0-groovy">
  <pre class="prettyprint language-json prettyprinted" data-type="json"><code>Coming Soon!</code></pre>
  </div> -->
                                <div class="tab-pane" id="examples-Onap3gppServiceInstances-modify3gppService-0-objc">
                              <pre class="prettyprint"><code class="language-cpp">Modify3gppService *body = ; //
String *version = version_example; //

Onap3gppServiceInstancesApi *apiInstance = [[Onap3gppServiceInstancesApi alloc] init];

// Modify a 3GPP Service Instance on a version provided
[apiInstance modify3gppServiceWith:body
    version:version
              completionHandler: ^(3gppServiceResponse output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-Onap3gppServiceInstances-modify3gppService-0-javascript">
                              <pre class="prettyprint"><code class="language-js">var SoGuilinApIs = require('so_guilin_ap_is');

var api = new SoGuilinApIs.Onap3gppServiceInstancesApi()

var body = ; // {Modify3gppService}

var version = version_example; // {String}


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.modify3gppService(body, version, callback);
</code></pre>
                                </div>

                                <!--<div class="tab-pane" id="examples-Onap3gppServiceInstances-modify3gppService-0-angular">
              <pre class="prettyprint language-json prettyprinted" data-type="json"><code>Coming Soon!</code></pre>
            </div>-->
                                <div class="tab-pane" id="examples-Onap3gppServiceInstances-modify3gppService-0-csharp">
                              <pre class="prettyprint"><code class="language-cs">using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class modify3gppServiceExample
    {
        public void main()
        {

            var apiInstance = new Onap3gppServiceInstancesApi();
            var body = new Modify3gppService(); // Modify3gppService |
            var version = version_example;  // String |

            try
            {
                // Modify a 3GPP Service Instance on a version provided
                3gppServiceResponse result = apiInstance.modify3gppService(body, version);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling Onap3gppServiceInstancesApi.modify3gppService: " + e.Message );
            }
        }
    }
}
</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-Onap3gppServiceInstances-modify3gppService-0-php">
                              <pre class="prettyprint"><code class="language-php"><&#63;php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\Onap3gppServiceInstancesApi();
$body = ; // Modify3gppService |
$version = version_example; // String |

try {
    $result = $api_instance->modify3gppService($body, $version);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling Onap3gppServiceInstancesApi->modify3gppService: ', $e->getMessage(), PHP_EOL;
}
?></code></pre>
                                </div>

                                <div class="tab-pane" id="examples-Onap3gppServiceInstances-modify3gppService-0-perl">
                              <pre class="prettyprint"><code class="language-perl">use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::Onap3gppServiceInstancesApi;

my $api_instance = WWW::SwaggerClient::Onap3gppServiceInstancesApi->new();
my $body = WWW::SwaggerClient::Object::Modify3gppService->new(); # Modify3gppService |
my $version = version_example; # String |

eval {
    my $result = $api_instance->modify3gppService(body => $body, version => $version);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling Onap3gppServiceInstancesApi->modify3gppService: $@\n";
}</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-Onap3gppServiceInstances-modify3gppService-0-python">
                              <pre class="prettyprint"><code class="language-python">from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.Onap3gppServiceInstancesApi()
body =  # Modify3gppService |
version = version_example # String |

try:
    # Modify a 3GPP Service Instance on a version provided
    api_response = api_instance.modify3gpp_service(body, version)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling Onap3gppServiceInstancesApi->modify3gppService: %s\n" % e)</code></pre>
                                </div>
                            </div>

                            <h2>Parameters</h2>

                            <div class="methodsubtabletitle">Path parameters</div>
                            <table id="methodsubtable">
                                <tr>
                                    <th width="150px">Name</th>
                                    <th>Description</th>
                                </tr>
                                <tr><td style="width:150px;">version*</td>
                                    <td>


                                        <div id="d2e199_modify3gppService_version">
                                            <div class="json-schema-view">
                                                <div class="primitive">
                <span class="type">
                    String
                </span>

                                                </div>
                                                <div class="inner required">
                                                    Required
                                                </div>
                                            </div>
                                        </div>
                                    </td>
                                </tr>

                            </table>


                            <div class="methodsubtabletitle">Body parameters</div>
                            <table id="methodsubtable">
                                <tr>
                                    <th width="150px">Name</th>
                                    <th>Description</th>
                                </tr>
                                <tr><td style="width:150px;">body <span style="color:red;">*</span></td>
                                    <td>


                                        <script>
$(document).ready(function() {
  var schemaWrapper = {
  "in" : "body",
  "name" : "body",
  "required" : true,
  "schema" : {
    "$ref" : "#/definitions/Modify3gppService"
  }
};
  var schema = schemaWrapper.schema;
  if (schema.$ref != null) {
    schema = defsParser.$refs.get(schema.$ref);
  } else {
    schemaWrapper.definitions = Object.assign({}, defs);
    $RefParser.dereference(schemaWrapper).catch(function(err) {
      console.log(err);
    });
  }

  var view = new JSONSchemaView(schema,2,{isBodyParam: true});
  var result = $('#d2e199_modify3gppService_body');
  result.empty();
  result.append(view.render());
});
</script>
                                        <div id="d2e199_modify3gppService_body"></div>
                                    </td>
                                </tr>

                            </table>



                            <h2>Responses</h2>
                            <h3> Status: default - successful operation </h3>

                            <ul class="nav nav-tabs nav-tabs-examples" >
                                <li class="active">
                                    <a data-toggle="tab" href="#responses-modify3gppService-default-schema">Schema</a>
                                </li>

                            </ul>

                            <div class="tab-content" style='margin-bottom: 10px;'>
                                <div class="tab-pane active" id="responses-modify3gppService-default-schema">
                                    <div id='responses-modify3gppService-default-schema-default' style="padding: 30px; border-left: 1px solid #eee; border-right: 1px solid #eee; border-bottom: 1px solid #eee;">
                                        <script>
                                      $(document).ready(function() {
                                        var schemaWrapper = {
  "description" : "successful operation",
  "schema" : {
    "$ref" : "#/definitions/3gppServiceResponse"
  }
};
                                        var schema = schemaWrapper.schema;
                                        if (schema.$ref != null) {
                                          schema = defsParser.$refs.get(schema.$ref);
                                        } else {
                                          schemaWrapper.definitions = defs;
                                          $RefParser.dereference(schemaWrapper).catch(function(err) {
                                            console.log(err);
                                          });
                                        }

                                        //console.log(JSON.stringify(schema));
                                        var view = new JSONSchemaView(schema, 3);
                                        $('#responses-modify3gppService-default-schema-data').val(stringify(schema));
                                        var result = $('#responses-modify3gppService-default-schema-default');
                                        result.empty();
                                        result.append(view.render());
                                      });
                                    </script>
                                    </div>
                                    <input id='responses-modify3gppService-default-schema-data' type='hidden' value=''></input>
                                </div>
                            </div>

                        </article>
                    </div>
                    <hr>
                    <div id="api-Onap3gppServiceInstances-querySubnetCapability">
                        <article id="api-Onap3gppServiceInstances-querySubnetCapability-0" data-group="User" data-name="querySubnetCapability" data-version="0">
                            <div class="pull-left">
                                <h1>querySubnetCapability</h1>
                                <p>Provides subnet capability based on subnet types</p>
                            </div>
                            <div class="pull-right"></div>
                            <div class="clearfix"></div>
                            <p></p>
                            <p class="marked"></p>
                            <p></p>
                            <br />
                            <pre class="prettyprint language-html prettyprinted" data-type="get"><code><span class="pln">/onap/so/infra/3gppservices/{version}/subnetCapabilityQuery</span></code></pre>
                            <p>
                            <h3>Usage and SDK Samples</h3>
                            </p>
                            <ul class="nav nav-tabs nav-tabs-examples">
                                <li class="active"><a href="#examples-Onap3gppServiceInstances-querySubnetCapability-0-curl">Curl</a></li>
                                <li class=""><a href="#examples-Onap3gppServiceInstances-querySubnetCapability-0-java">Java</a></li>
                                <li class=""><a href="#examples-Onap3gppServiceInstances-querySubnetCapability-0-android">Android</a></li>
                                <!--<li class=""><a href="#examples-Onap3gppServiceInstances-querySubnetCapability-0-groovy">Groovy</a></li>-->
                                <li class=""><a href="#examples-Onap3gppServiceInstances-querySubnetCapability-0-objc">Obj-C</a></li>
                                <li class=""><a href="#examples-Onap3gppServiceInstances-querySubnetCapability-0-javascript">JavaScript</a></li>
                                <!--<li class=""><a href="#examples-Onap3gppServiceInstances-querySubnetCapability-0-angular">Angular</a></li>-->
                                <li class=""><a href="#examples-Onap3gppServiceInstances-querySubnetCapability-0-csharp">C#</a></li>
                                <li class=""><a href="#examples-Onap3gppServiceInstances-querySubnetCapability-0-php">PHP</a></li>
                                <li class=""><a href="#examples-Onap3gppServiceInstances-querySubnetCapability-0-perl">Perl</a></li>
                                <li class=""><a href="#examples-Onap3gppServiceInstances-querySubnetCapability-0-python">Python</a></li>
                            </ul>

                            <div class="tab-content">
                                <div class="tab-pane active" id="examples-Onap3gppServiceInstances-querySubnetCapability-0-curl">
                                    <pre class="prettyprint"><code class="language-bsh">curl -X GET "http://localhost/onap/so/infra/3gppservices/{version}/subnetCapabilityQuery"</code></pre>
                                </div>
                                <div class="tab-pane" id="examples-Onap3gppServiceInstances-querySubnetCapability-0-java">
                            <pre class="prettyprint"><code class="language-java">import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.Onap3gppServiceInstancesApi;

import java.io.File;
import java.util.*;

public class Onap3gppServiceInstancesApiExample {

    public static void main(String[] args) {

        Onap3gppServiceInstancesApi apiInstance = new Onap3gppServiceInstancesApi();
        QuerySubnetCapability body = ; // QuerySubnetCapability |
        String version = version_example; // String |
        try {
            Object result = apiInstance.querySubnetCapability(body, version);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling Onap3gppServiceInstancesApi#querySubnetCapability");
            e.printStackTrace();
        }
    }
}</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-Onap3gppServiceInstances-querySubnetCapability-0-android">
                            <pre class="prettyprint"><code class="language-java">import io.swagger.client.api.Onap3gppServiceInstancesApi;

public class Onap3gppServiceInstancesApiExample {

    public static void main(String[] args) {
        Onap3gppServiceInstancesApi apiInstance = new Onap3gppServiceInstancesApi();
        QuerySubnetCapability body = ; // QuerySubnetCapability |
        String version = version_example; // String |
        try {
            Object result = apiInstance.querySubnetCapability(body, version);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling Onap3gppServiceInstancesApi#querySubnetCapability");
            e.printStackTrace();
        }
    }
}</code></pre>
                                </div>
                                <!--
  <div class="tab-pane" id="examples-Onap3gppServiceInstances-querySubnetCapability-0-groovy">
  <pre class="prettyprint language-json prettyprinted" data-type="json"><code>Coming Soon!</code></pre>
  </div> -->
                                <div class="tab-pane" id="examples-Onap3gppServiceInstances-querySubnetCapability-0-objc">
                              <pre class="prettyprint"><code class="language-cpp">QuerySubnetCapability *body = ; //
String *version = version_example; //

Onap3gppServiceInstancesApi *apiInstance = [[Onap3gppServiceInstancesApi alloc] init];

// Provides subnet capability based on subnet types
[apiInstance querySubnetCapabilityWith:body
    version:version
              completionHandler: ^(Object output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-Onap3gppServiceInstances-querySubnetCapability-0-javascript">
                              <pre class="prettyprint"><code class="language-js">var SoGuilinApIs = require('so_guilin_ap_is');

var api = new SoGuilinApIs.Onap3gppServiceInstancesApi()

var body = ; // {QuerySubnetCapability}

var version = version_example; // {String}


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.querySubnetCapability(body, version, callback);
</code></pre>
                                </div>

                                <!--<div class="tab-pane" id="examples-Onap3gppServiceInstances-querySubnetCapability-0-angular">
              <pre class="prettyprint language-json prettyprinted" data-type="json"><code>Coming Soon!</code></pre>
            </div>-->
                                <div class="tab-pane" id="examples-Onap3gppServiceInstances-querySubnetCapability-0-csharp">
                              <pre class="prettyprint"><code class="language-cs">using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class querySubnetCapabilityExample
    {
        public void main()
        {

            var apiInstance = new Onap3gppServiceInstancesApi();
            var body = new QuerySubnetCapability(); // QuerySubnetCapability |
            var version = version_example;  // String |

            try
            {
                // Provides subnet capability based on subnet types
                Object result = apiInstance.querySubnetCapability(body, version);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling Onap3gppServiceInstancesApi.querySubnetCapability: " + e.Message );
            }
        }
    }
}
</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-Onap3gppServiceInstances-querySubnetCapability-0-php">
                              <pre class="prettyprint"><code class="language-php"><&#63;php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\Onap3gppServiceInstancesApi();
$body = ; // QuerySubnetCapability |
$version = version_example; // String |

try {
    $result = $api_instance->querySubnetCapability($body, $version);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling Onap3gppServiceInstancesApi->querySubnetCapability: ', $e->getMessage(), PHP_EOL;
}
?></code></pre>
                                </div>

                                <div class="tab-pane" id="examples-Onap3gppServiceInstances-querySubnetCapability-0-perl">
                              <pre class="prettyprint"><code class="language-perl">use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::Onap3gppServiceInstancesApi;

my $api_instance = WWW::SwaggerClient::Onap3gppServiceInstancesApi->new();
my $body = WWW::SwaggerClient::Object::QuerySubnetCapability->new(); # QuerySubnetCapability |
my $version = version_example; # String |

eval {
    my $result = $api_instance->querySubnetCapability(body => $body, version => $version);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling Onap3gppServiceInstancesApi->querySubnetCapability: $@\n";
}</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-Onap3gppServiceInstances-querySubnetCapability-0-python">
                              <pre class="prettyprint"><code class="language-python">from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.Onap3gppServiceInstancesApi()
body =  # QuerySubnetCapability |
version = version_example # String |

try:
    # Provides subnet capability based on subnet types
    api_response = api_instance.query_subnet_capability(body, version)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling Onap3gppServiceInstancesApi->querySubnetCapability: %s\n" % e)</code></pre>
                                </div>
                            </div>

                            <h2>Parameters</h2>

                            <div class="methodsubtabletitle">Path parameters</div>
                            <table id="methodsubtable">
                                <tr>
                                    <th width="150px">Name</th>
                                    <th>Description</th>
                                </tr>
                                <tr><td style="width:150px;">version*</td>
                                    <td>


                                        <div id="d2e199_querySubnetCapability_version">
                                            <div class="json-schema-view">
                                                <div class="primitive">
                <span class="type">
                    String
                </span>

                                                </div>
                                                <div class="inner required">
                                                    Required
                                                </div>
                                            </div>
                                        </div>
                                    </td>
                                </tr>

                            </table>


                            <div class="methodsubtabletitle">Body parameters</div>
                            <table id="methodsubtable">
                                <tr>
                                    <th width="150px">Name</th>
                                    <th>Description</th>
                                </tr>
                                <tr><td style="width:150px;">body <span style="color:red;">*</span></td>
                                    <td>


                                        <script>
$(document).ready(function() {
  var schemaWrapper = {
  "in" : "body",
  "name" : "body",
  "required" : true,
  "schema" : {
    "$ref" : "#/definitions/QuerySubnetCapability"
  }
};
  var schema = schemaWrapper.schema;
  if (schema.$ref != null) {
    schema = defsParser.$refs.get(schema.$ref);
  } else {
    schemaWrapper.definitions = Object.assign({}, defs);
    $RefParser.dereference(schemaWrapper).catch(function(err) {
      console.log(err);
    });
  }

  var view = new JSONSchemaView(schema,2,{isBodyParam: true});
  var result = $('#d2e199_querySubnetCapability_body');
  result.empty();
  result.append(view.render());
});
</script>
                                        <div id="d2e199_querySubnetCapability_body"></div>
                                    </td>
                                </tr>

                            </table>



                            <h2>Responses</h2>
                            <h3> Status: default - successful operation with capabilities for the queried subnetTypes </h3>

                            <ul class="nav nav-tabs nav-tabs-examples" >
                                <li class="active">
                                    <a data-toggle="tab" href="#responses-querySubnetCapability-default-schema">Schema</a>
                                </li>

                            </ul>

                            <div class="tab-content" style='margin-bottom: 10px;'>
                                <div class="tab-pane active" id="responses-querySubnetCapability-default-schema">
                                    <div id='responses-querySubnetCapability-default-schema-default' style="padding: 30px; border-left: 1px solid #eee; border-right: 1px solid #eee; border-bottom: 1px solid #eee;">
                                        <script>
                                      $(document).ready(function() {
                                        var schemaWrapper = {
  "description" : "successful operation with capabilities for the queried subnetTypes",
  "schema" : {
    "type" : "object"
  }
};
                                        var schema = schemaWrapper.schema;
                                        if (schema.$ref != null) {
                                          schema = defsParser.$refs.get(schema.$ref);
                                        } else {
                                          schemaWrapper.definitions = defs;
                                          $RefParser.dereference(schemaWrapper).catch(function(err) {
                                            console.log(err);
                                          });
                                        }

                                        //console.log(JSON.stringify(schema));
                                        var view = new JSONSchemaView(schema, 3);
                                        $('#responses-querySubnetCapability-default-schema-data').val(stringify(schema));
                                        var result = $('#responses-querySubnetCapability-default-schema-default');
                                        result.empty();
                                        result.append(view.render());
                                      });
                                    </script>
                                    </div>
                                    <input id='responses-querySubnetCapability-default-schema-data' type='hidden' value=''></input>
                                </div>
                            </div>

                        </article>
                    </div>
                    <hr>
                </section>
                <section id="api-OnapsoinfracloudResources">
                    <h1>OnapsoinfracloudResources</h1>
                    <div id="api-OnapsoinfracloudResources-activateOperationEnvironment">
                        <article id="api-OnapsoinfracloudResources-activateOperationEnvironment-0" data-group="User" data-name="activateOperationEnvironment" data-version="0">
                            <div class="pull-left">
                                <h1>activateOperationEnvironment</h1>
                                <p>Activate an Operational Environment</p>
                            </div>
                            <div class="pull-right"></div>
                            <div class="clearfix"></div>
                            <p></p>
                            <p class="marked"></p>
                            <p></p>
                            <br />
                            <pre class="prettyprint language-html prettyprinted" data-type="post"><code><span class="pln">/onap/so/infra/cloudResources/{version}/operationalEnvironments/{operationalEnvironmentId}/activate</span></code></pre>
                            <p>
                            <h3>Usage and SDK Samples</h3>
                            </p>
                            <ul class="nav nav-tabs nav-tabs-examples">
                                <li class="active"><a href="#examples-OnapsoinfracloudResources-activateOperationEnvironment-0-curl">Curl</a></li>
                                <li class=""><a href="#examples-OnapsoinfracloudResources-activateOperationEnvironment-0-java">Java</a></li>
                                <li class=""><a href="#examples-OnapsoinfracloudResources-activateOperationEnvironment-0-android">Android</a></li>
                                <!--<li class=""><a href="#examples-OnapsoinfracloudResources-activateOperationEnvironment-0-groovy">Groovy</a></li>-->
                                <li class=""><a href="#examples-OnapsoinfracloudResources-activateOperationEnvironment-0-objc">Obj-C</a></li>
                                <li class=""><a href="#examples-OnapsoinfracloudResources-activateOperationEnvironment-0-javascript">JavaScript</a></li>
                                <!--<li class=""><a href="#examples-OnapsoinfracloudResources-activateOperationEnvironment-0-angular">Angular</a></li>-->
                                <li class=""><a href="#examples-OnapsoinfracloudResources-activateOperationEnvironment-0-csharp">C#</a></li>
                                <li class=""><a href="#examples-OnapsoinfracloudResources-activateOperationEnvironment-0-php">PHP</a></li>
                                <li class=""><a href="#examples-OnapsoinfracloudResources-activateOperationEnvironment-0-perl">Perl</a></li>
                                <li class=""><a href="#examples-OnapsoinfracloudResources-activateOperationEnvironment-0-python">Python</a></li>
                            </ul>

                            <div class="tab-content">
                                <div class="tab-pane active" id="examples-OnapsoinfracloudResources-activateOperationEnvironment-0-curl">
                                    <pre class="prettyprint"><code class="language-bsh">curl -X POST "http://localhost/onap/so/infra/cloudResources/{version}/operationalEnvironments/{operationalEnvironmentId}/activate"</code></pre>
                                </div>
                                <div class="tab-pane" id="examples-OnapsoinfracloudResources-activateOperationEnvironment-0-java">
                            <pre class="prettyprint"><code class="language-java">import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.OnapsoinfracloudResourcesApi;

import java.io.File;
import java.util.*;

public class OnapsoinfracloudResourcesApiExample {

    public static void main(String[] args) {

        OnapsoinfracloudResourcesApi apiInstance = new OnapsoinfracloudResourcesApi();
        String version = version_example; // String |
        String operationalEnvironmentId = operationalEnvironmentId_example; // String |
        String body = body_example; // String |
        try {
            apiInstance.activateOperationEnvironment(version, operationalEnvironmentId, body);
        } catch (ApiException e) {
            System.err.println("Exception when calling OnapsoinfracloudResourcesApi#activateOperationEnvironment");
            e.printStackTrace();
        }
    }
}</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-OnapsoinfracloudResources-activateOperationEnvironment-0-android">
                            <pre class="prettyprint"><code class="language-java">import io.swagger.client.api.OnapsoinfracloudResourcesApi;

public class OnapsoinfracloudResourcesApiExample {

    public static void main(String[] args) {
        OnapsoinfracloudResourcesApi apiInstance = new OnapsoinfracloudResourcesApi();
        String version = version_example; // String |
        String operationalEnvironmentId = operationalEnvironmentId_example; // String |
        String body = body_example; // String |
        try {
            apiInstance.activateOperationEnvironment(version, operationalEnvironmentId, body);
        } catch (ApiException e) {
            System.err.println("Exception when calling OnapsoinfracloudResourcesApi#activateOperationEnvironment");
            e.printStackTrace();
        }
    }
}</code></pre>
                                </div>
                                <!--
  <div class="tab-pane" id="examples-OnapsoinfracloudResources-activateOperationEnvironment-0-groovy">
  <pre class="prettyprint language-json prettyprinted" data-type="json"><code>Coming Soon!</code></pre>
  </div> -->
                                <div class="tab-pane" id="examples-OnapsoinfracloudResources-activateOperationEnvironment-0-objc">
                              <pre class="prettyprint"><code class="language-cpp">String *version = version_example; //
String *operationalEnvironmentId = operationalEnvironmentId_example; //
String *body = body_example; //  (optional)

OnapsoinfracloudResourcesApi *apiInstance = [[OnapsoinfracloudResourcesApi alloc] init];

// Activate an Operational Environment
[apiInstance activateOperationEnvironmentWith:version
    operationalEnvironmentId:operationalEnvironmentId
    body:body
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-OnapsoinfracloudResources-activateOperationEnvironment-0-javascript">
                              <pre class="prettyprint"><code class="language-js">var SoGuilinApIs = require('so_guilin_ap_is');

var api = new SoGuilinApIs.OnapsoinfracloudResourcesApi()

var version = version_example; // {String}

var operationalEnvironmentId = operationalEnvironmentId_example; // {String}

var opts = {
  'body': body_example // {String}
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.activateOperationEnvironment(version, operationalEnvironmentId, opts, callback);
</code></pre>
                                </div>

                                <!--<div class="tab-pane" id="examples-OnapsoinfracloudResources-activateOperationEnvironment-0-angular">
              <pre class="prettyprint language-json prettyprinted" data-type="json"><code>Coming Soon!</code></pre>
            </div>-->
                                <div class="tab-pane" id="examples-OnapsoinfracloudResources-activateOperationEnvironment-0-csharp">
                              <pre class="prettyprint"><code class="language-cs">using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class activateOperationEnvironmentExample
    {
        public void main()
        {

            var apiInstance = new OnapsoinfracloudResourcesApi();
            var version = version_example;  // String |
            var operationalEnvironmentId = operationalEnvironmentId_example;  // String |
            var body = body_example;  // String |  (optional)

            try
            {
                // Activate an Operational Environment
                apiInstance.activateOperationEnvironment(version, operationalEnvironmentId, body);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling OnapsoinfracloudResourcesApi.activateOperationEnvironment: " + e.Message );
            }
        }
    }
}
</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-OnapsoinfracloudResources-activateOperationEnvironment-0-php">
                              <pre class="prettyprint"><code class="language-php"><&#63;php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\OnapsoinfracloudResourcesApi();
$version = version_example; // String |
$operationalEnvironmentId = operationalEnvironmentId_example; // String |
$body = body_example; // String |

try {
    $api_instance->activateOperationEnvironment($version, $operationalEnvironmentId, $body);
} catch (Exception $e) {
    echo 'Exception when calling OnapsoinfracloudResourcesApi->activateOperationEnvironment: ', $e->getMessage(), PHP_EOL;
}
?></code></pre>
                                </div>

                                <div class="tab-pane" id="examples-OnapsoinfracloudResources-activateOperationEnvironment-0-perl">
                              <pre class="prettyprint"><code class="language-perl">use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::OnapsoinfracloudResourcesApi;

my $api_instance = WWW::SwaggerClient::OnapsoinfracloudResourcesApi->new();
my $version = version_example; # String |
my $operationalEnvironmentId = operationalEnvironmentId_example; # String |
my $body = WWW::SwaggerClient::Object::String->new(); # String |

eval {
    $api_instance->activateOperationEnvironment(version => $version, operationalEnvironmentId => $operationalEnvironmentId, body => $body);
};
if ($@) {
    warn "Exception when calling OnapsoinfracloudResourcesApi->activateOperationEnvironment: $@\n";
}</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-OnapsoinfracloudResources-activateOperationEnvironment-0-python">
                              <pre class="prettyprint"><code class="language-python">from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.OnapsoinfracloudResourcesApi()
version = version_example # String |
operationalEnvironmentId = operationalEnvironmentId_example # String |
body = body_example # String |  (optional)

try:
    # Activate an Operational Environment
    api_instance.activate_operation_environment(version, operationalEnvironmentId, body=body)
except ApiException as e:
    print("Exception when calling OnapsoinfracloudResourcesApi->activateOperationEnvironment: %s\n" % e)</code></pre>
                                </div>
                            </div>

                            <h2>Parameters</h2>

                            <div class="methodsubtabletitle">Path parameters</div>
                            <table id="methodsubtable">
                                <tr>
                                    <th width="150px">Name</th>
                                    <th>Description</th>
                                </tr>
                                <tr><td style="width:150px;">version*</td>
                                    <td>


                                        <div id="d2e199_activateOperationEnvironment_version">
                                            <div class="json-schema-view">
                                                <div class="primitive">
                <span class="type">
                    String
                </span>

                                                </div>
                                                <div class="inner required">
                                                    Required
                                                </div>
                                            </div>
                                        </div>
                                    </td>
                                </tr>

                                <tr><td style="width:150px;">operationalEnvironmentId*</td>
                                    <td>


                                        <div id="d2e199_activateOperationEnvironment_operationalEnvironmentId">
                                            <div class="json-schema-view">
                                                <div class="primitive">
                <span class="type">
                    String
                </span>

                                                </div>
                                                <div class="inner required">
                                                    Required
                                                </div>
                                            </div>
                                        </div>
                                    </td>
                                </tr>

                            </table>


                            <div class="methodsubtabletitle">Body parameters</div>
                            <table id="methodsubtable">
                                <tr>
                                    <th width="150px">Name</th>
                                    <th>Description</th>
                                </tr>
                                <tr><td style="width:150px;">body </td>
                                    <td>


                                        <script>
$(document).ready(function() {
  var schemaWrapper = {
  "in" : "body",
  "name" : "body",
  "required" : false,
  "schema" : {
    "type" : "string"
  }
};
  var schema = schemaWrapper.schema;
  if (schema.$ref != null) {
    schema = defsParser.$refs.get(schema.$ref);
  } else {
    schemaWrapper.definitions = Object.assign({}, defs);
    $RefParser.dereference(schemaWrapper).catch(function(err) {
      console.log(err);
    });
  }

  var view = new JSONSchemaView(schema,2,{isBodyParam: true});
  var result = $('#d2e199_activateOperationEnvironment_body');
  result.empty();
  result.append(view.render());
});
</script>
                                        <div id="d2e199_activateOperationEnvironment_body"></div>
                                    </td>
                                </tr>

                            </table>



                            <h2>Responses</h2>
                            <h3> Status: default - successful operation </h3>

                            <ul class="nav nav-tabs nav-tabs-examples" >
                            </ul>

                            <div class="tab-content" style='margin-bottom: 10px;'>
                            </div>

                        </article>
                    </div>
                    <hr>
                    <div id="api-OnapsoinfracloudResources-createOperationEnvironment">
                        <article id="api-OnapsoinfracloudResources-createOperationEnvironment-0" data-group="User" data-name="createOperationEnvironment" data-version="0">
                            <div class="pull-left">
                                <h1>createOperationEnvironment</h1>
                                <p>Create an Operational Environment</p>
                            </div>
                            <div class="pull-right"></div>
                            <div class="clearfix"></div>
                            <p></p>
                            <p class="marked"></p>
                            <p></p>
                            <br />
                            <pre class="prettyprint language-html prettyprinted" data-type="post"><code><span class="pln">/onap/so/infra/cloudResources/{version}/operationalEnvironments</span></code></pre>
                            <p>
                            <h3>Usage and SDK Samples</h3>
                            </p>
                            <ul class="nav nav-tabs nav-tabs-examples">
                                <li class="active"><a href="#examples-OnapsoinfracloudResources-createOperationEnvironment-0-curl">Curl</a></li>
                                <li class=""><a href="#examples-OnapsoinfracloudResources-createOperationEnvironment-0-java">Java</a></li>
                                <li class=""><a href="#examples-OnapsoinfracloudResources-createOperationEnvironment-0-android">Android</a></li>
                                <!--<li class=""><a href="#examples-OnapsoinfracloudResources-createOperationEnvironment-0-groovy">Groovy</a></li>-->
                                <li class=""><a href="#examples-OnapsoinfracloudResources-createOperationEnvironment-0-objc">Obj-C</a></li>
                                <li class=""><a href="#examples-OnapsoinfracloudResources-createOperationEnvironment-0-javascript">JavaScript</a></li>
                                <!--<li class=""><a href="#examples-OnapsoinfracloudResources-createOperationEnvironment-0-angular">Angular</a></li>-->
                                <li class=""><a href="#examples-OnapsoinfracloudResources-createOperationEnvironment-0-csharp">C#</a></li>
                                <li class=""><a href="#examples-OnapsoinfracloudResources-createOperationEnvironment-0-php">PHP</a></li>
                                <li class=""><a href="#examples-OnapsoinfracloudResources-createOperationEnvironment-0-perl">Perl</a></li>
                                <li class=""><a href="#examples-OnapsoinfracloudResources-createOperationEnvironment-0-python">Python</a></li>
                            </ul>

                            <div class="tab-content">
                                <div class="tab-pane active" id="examples-OnapsoinfracloudResources-createOperationEnvironment-0-curl">
                                    <pre class="prettyprint"><code class="language-bsh">curl -X POST "http://localhost/onap/so/infra/cloudResources/{version}/operationalEnvironments"</code></pre>
                                </div>
                                <div class="tab-pane" id="examples-OnapsoinfracloudResources-createOperationEnvironment-0-java">
                            <pre class="prettyprint"><code class="language-java">import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.OnapsoinfracloudResourcesApi;

import java.io.File;
import java.util.*;

public class OnapsoinfracloudResourcesApiExample {

    public static void main(String[] args) {

        OnapsoinfracloudResourcesApi apiInstance = new OnapsoinfracloudResourcesApi();
        String version = version_example; // String |
        String body = body_example; // String |
        try {
            apiInstance.createOperationEnvironment(version, body);
        } catch (ApiException e) {
            System.err.println("Exception when calling OnapsoinfracloudResourcesApi#createOperationEnvironment");
            e.printStackTrace();
        }
    }
}</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-OnapsoinfracloudResources-createOperationEnvironment-0-android">
                            <pre class="prettyprint"><code class="language-java">import io.swagger.client.api.OnapsoinfracloudResourcesApi;

public class OnapsoinfracloudResourcesApiExample {

    public static void main(String[] args) {
        OnapsoinfracloudResourcesApi apiInstance = new OnapsoinfracloudResourcesApi();
        String version = version_example; // String |
        String body = body_example; // String |
        try {
            apiInstance.createOperationEnvironment(version, body);
        } catch (ApiException e) {
            System.err.println("Exception when calling OnapsoinfracloudResourcesApi#createOperationEnvironment");
            e.printStackTrace();
        }
    }
}</code></pre>
                                </div>
                                <!--
  <div class="tab-pane" id="examples-OnapsoinfracloudResources-createOperationEnvironment-0-groovy">
  <pre class="prettyprint language-json prettyprinted" data-type="json"><code>Coming Soon!</code></pre>
  </div> -->
                                <div class="tab-pane" id="examples-OnapsoinfracloudResources-createOperationEnvironment-0-objc">
                              <pre class="prettyprint"><code class="language-cpp">String *version = version_example; //
String *body = body_example; //  (optional)

OnapsoinfracloudResourcesApi *apiInstance = [[OnapsoinfracloudResourcesApi alloc] init];

// Create an Operational Environment
[apiInstance createOperationEnvironmentWith:version
    body:body
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-OnapsoinfracloudResources-createOperationEnvironment-0-javascript">
                              <pre class="prettyprint"><code class="language-js">var SoGuilinApIs = require('so_guilin_ap_is');

var api = new SoGuilinApIs.OnapsoinfracloudResourcesApi()

var version = version_example; // {String}

var opts = {
  'body': body_example // {String}
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.createOperationEnvironment(version, opts, callback);
</code></pre>
                                </div>

                                <!--<div class="tab-pane" id="examples-OnapsoinfracloudResources-createOperationEnvironment-0-angular">
              <pre class="prettyprint language-json prettyprinted" data-type="json"><code>Coming Soon!</code></pre>
            </div>-->
                                <div class="tab-pane" id="examples-OnapsoinfracloudResources-createOperationEnvironment-0-csharp">
                              <pre class="prettyprint"><code class="language-cs">using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class createOperationEnvironmentExample
    {
        public void main()
        {

            var apiInstance = new OnapsoinfracloudResourcesApi();
            var version = version_example;  // String |
            var body = body_example;  // String |  (optional)

            try
            {
                // Create an Operational Environment
                apiInstance.createOperationEnvironment(version, body);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling OnapsoinfracloudResourcesApi.createOperationEnvironment: " + e.Message );
            }
        }
    }
}
</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-OnapsoinfracloudResources-createOperationEnvironment-0-php">
                              <pre class="prettyprint"><code class="language-php"><&#63;php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\OnapsoinfracloudResourcesApi();
$version = version_example; // String |
$body = body_example; // String |

try {
    $api_instance->createOperationEnvironment($version, $body);
} catch (Exception $e) {
    echo 'Exception when calling OnapsoinfracloudResourcesApi->createOperationEnvironment: ', $e->getMessage(), PHP_EOL;
}
?></code></pre>
                                </div>

                                <div class="tab-pane" id="examples-OnapsoinfracloudResources-createOperationEnvironment-0-perl">
                              <pre class="prettyprint"><code class="language-perl">use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::OnapsoinfracloudResourcesApi;

my $api_instance = WWW::SwaggerClient::OnapsoinfracloudResourcesApi->new();
my $version = version_example; # String |
my $body = WWW::SwaggerClient::Object::String->new(); # String |

eval {
    $api_instance->createOperationEnvironment(version => $version, body => $body);
};
if ($@) {
    warn "Exception when calling OnapsoinfracloudResourcesApi->createOperationEnvironment: $@\n";
}</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-OnapsoinfracloudResources-createOperationEnvironment-0-python">
                              <pre class="prettyprint"><code class="language-python">from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.OnapsoinfracloudResourcesApi()
version = version_example # String |
body = body_example # String |  (optional)

try:
    # Create an Operational Environment
    api_instance.create_operation_environment(version, body=body)
except ApiException as e:
    print("Exception when calling OnapsoinfracloudResourcesApi->createOperationEnvironment: %s\n" % e)</code></pre>
                                </div>
                            </div>

                            <h2>Parameters</h2>

                            <div class="methodsubtabletitle">Path parameters</div>
                            <table id="methodsubtable">
                                <tr>
                                    <th width="150px">Name</th>
                                    <th>Description</th>
                                </tr>
                                <tr><td style="width:150px;">version*</td>
                                    <td>


                                        <div id="d2e199_createOperationEnvironment_version">
                                            <div class="json-schema-view">
                                                <div class="primitive">
                <span class="type">
                    String
                </span>

                                                </div>
                                                <div class="inner required">
                                                    Required
                                                </div>
                                            </div>
                                        </div>
                                    </td>
                                </tr>

                            </table>


                            <div class="methodsubtabletitle">Body parameters</div>
                            <table id="methodsubtable">
                                <tr>
                                    <th width="150px">Name</th>
                                    <th>Description</th>
                                </tr>
                                <tr><td style="width:150px;">body </td>
                                    <td>


                                        <script>
$(document).ready(function() {
  var schemaWrapper = {
  "in" : "body",
  "name" : "body",
  "required" : false,
  "schema" : {
    "type" : "string"
  }
};
  var schema = schemaWrapper.schema;
  if (schema.$ref != null) {
    schema = defsParser.$refs.get(schema.$ref);
  } else {
    schemaWrapper.definitions = Object.assign({}, defs);
    $RefParser.dereference(schemaWrapper).catch(function(err) {
      console.log(err);
    });
  }

  var view = new JSONSchemaView(schema,2,{isBodyParam: true});
  var result = $('#d2e199_createOperationEnvironment_body');
  result.empty();
  result.append(view.render());
});
</script>
                                        <div id="d2e199_createOperationEnvironment_body"></div>
                                    </td>
                                </tr>

                            </table>



                            <h2>Responses</h2>
                            <h3> Status: default - successful operation </h3>

                            <ul class="nav nav-tabs nav-tabs-examples" >
                            </ul>

                            <div class="tab-content" style='margin-bottom: 10px;'>
                            </div>

                        </article>
                    </div>
                    <hr>
                    <div id="api-OnapsoinfracloudResources-deactivateOperationEnvironment">
                        <article id="api-OnapsoinfracloudResources-deactivateOperationEnvironment-0" data-group="User" data-name="deactivateOperationEnvironment" data-version="0">
                            <div class="pull-left">
                                <h1>deactivateOperationEnvironment</h1>
                                <p>Deactivate an Operational Environment</p>
                            </div>
                            <div class="pull-right"></div>
                            <div class="clearfix"></div>
                            <p></p>
                            <p class="marked"></p>
                            <p></p>
                            <br />
                            <pre class="prettyprint language-html prettyprinted" data-type="post"><code><span class="pln">/onap/so/infra/cloudResources/{version}/operationalEnvironments/{operationalEnvironmentId}/deactivate</span></code></pre>
                            <p>
                            <h3>Usage and SDK Samples</h3>
                            </p>
                            <ul class="nav nav-tabs nav-tabs-examples">
                                <li class="active"><a href="#examples-OnapsoinfracloudResources-deactivateOperationEnvironment-0-curl">Curl</a></li>
                                <li class=""><a href="#examples-OnapsoinfracloudResources-deactivateOperationEnvironment-0-java">Java</a></li>
                                <li class=""><a href="#examples-OnapsoinfracloudResources-deactivateOperationEnvironment-0-android">Android</a></li>
                                <!--<li class=""><a href="#examples-OnapsoinfracloudResources-deactivateOperationEnvironment-0-groovy">Groovy</a></li>-->
                                <li class=""><a href="#examples-OnapsoinfracloudResources-deactivateOperationEnvironment-0-objc">Obj-C</a></li>
                                <li class=""><a href="#examples-OnapsoinfracloudResources-deactivateOperationEnvironment-0-javascript">JavaScript</a></li>
                                <!--<li class=""><a href="#examples-OnapsoinfracloudResources-deactivateOperationEnvironment-0-angular">Angular</a></li>-->
                                <li class=""><a href="#examples-OnapsoinfracloudResources-deactivateOperationEnvironment-0-csharp">C#</a></li>
                                <li class=""><a href="#examples-OnapsoinfracloudResources-deactivateOperationEnvironment-0-php">PHP</a></li>
                                <li class=""><a href="#examples-OnapsoinfracloudResources-deactivateOperationEnvironment-0-perl">Perl</a></li>
                                <li class=""><a href="#examples-OnapsoinfracloudResources-deactivateOperationEnvironment-0-python">Python</a></li>
                            </ul>

                            <div class="tab-content">
                                <div class="tab-pane active" id="examples-OnapsoinfracloudResources-deactivateOperationEnvironment-0-curl">
                                    <pre class="prettyprint"><code class="language-bsh">curl -X POST "http://localhost/onap/so/infra/cloudResources/{version}/operationalEnvironments/{operationalEnvironmentId}/deactivate"</code></pre>
                                </div>
                                <div class="tab-pane" id="examples-OnapsoinfracloudResources-deactivateOperationEnvironment-0-java">
                            <pre class="prettyprint"><code class="language-java">import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.OnapsoinfracloudResourcesApi;

import java.io.File;
import java.util.*;

public class OnapsoinfracloudResourcesApiExample {

    public static void main(String[] args) {

        OnapsoinfracloudResourcesApi apiInstance = new OnapsoinfracloudResourcesApi();
        String version = version_example; // String |
        String operationalEnvironmentId = operationalEnvironmentId_example; // String |
        String body = body_example; // String |
        try {
            apiInstance.deactivateOperationEnvironment(version, operationalEnvironmentId, body);
        } catch (ApiException e) {
            System.err.println("Exception when calling OnapsoinfracloudResourcesApi#deactivateOperationEnvironment");
            e.printStackTrace();
        }
    }
}</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-OnapsoinfracloudResources-deactivateOperationEnvironment-0-android">
                            <pre class="prettyprint"><code class="language-java">import io.swagger.client.api.OnapsoinfracloudResourcesApi;

public class OnapsoinfracloudResourcesApiExample {

    public static void main(String[] args) {
        OnapsoinfracloudResourcesApi apiInstance = new OnapsoinfracloudResourcesApi();
        String version = version_example; // String |
        String operationalEnvironmentId = operationalEnvironmentId_example; // String |
        String body = body_example; // String |
        try {
            apiInstance.deactivateOperationEnvironment(version, operationalEnvironmentId, body);
        } catch (ApiException e) {
            System.err.println("Exception when calling OnapsoinfracloudResourcesApi#deactivateOperationEnvironment");
            e.printStackTrace();
        }
    }
}</code></pre>
                                </div>
                                <!--
  <div class="tab-pane" id="examples-OnapsoinfracloudResources-deactivateOperationEnvironment-0-groovy">
  <pre class="prettyprint language-json prettyprinted" data-type="json"><code>Coming Soon!</code></pre>
  </div> -->
                                <div class="tab-pane" id="examples-OnapsoinfracloudResources-deactivateOperationEnvironment-0-objc">
                              <pre class="prettyprint"><code class="language-cpp">String *version = version_example; //
String *operationalEnvironmentId = operationalEnvironmentId_example; //
String *body = body_example; //  (optional)

OnapsoinfracloudResourcesApi *apiInstance = [[OnapsoinfracloudResourcesApi alloc] init];

// Deactivate an Operational Environment
[apiInstance deactivateOperationEnvironmentWith:version
    operationalEnvironmentId:operationalEnvironmentId
    body:body
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-OnapsoinfracloudResources-deactivateOperationEnvironment-0-javascript">
                              <pre class="prettyprint"><code class="language-js">var SoGuilinApIs = require('so_guilin_ap_is');

var api = new SoGuilinApIs.OnapsoinfracloudResourcesApi()

var version = version_example; // {String}

var operationalEnvironmentId = operationalEnvironmentId_example; // {String}

var opts = {
  'body': body_example // {String}
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.deactivateOperationEnvironment(version, operationalEnvironmentId, opts, callback);
</code></pre>
                                </div>

                                <!--<div class="tab-pane" id="examples-OnapsoinfracloudResources-deactivateOperationEnvironment-0-angular">
              <pre class="prettyprint language-json prettyprinted" data-type="json"><code>Coming Soon!</code></pre>
            </div>-->
                                <div class="tab-pane" id="examples-OnapsoinfracloudResources-deactivateOperationEnvironment-0-csharp">
                              <pre class="prettyprint"><code class="language-cs">using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class deactivateOperationEnvironmentExample
    {
        public void main()
        {

            var apiInstance = new OnapsoinfracloudResourcesApi();
            var version = version_example;  // String |
            var operationalEnvironmentId = operationalEnvironmentId_example;  // String |
            var body = body_example;  // String |  (optional)

            try
            {
                // Deactivate an Operational Environment
                apiInstance.deactivateOperationEnvironment(version, operationalEnvironmentId, body);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling OnapsoinfracloudResourcesApi.deactivateOperationEnvironment: " + e.Message );
            }
        }
    }
}
</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-OnapsoinfracloudResources-deactivateOperationEnvironment-0-php">
                              <pre class="prettyprint"><code class="language-php"><&#63;php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\OnapsoinfracloudResourcesApi();
$version = version_example; // String |
$operationalEnvironmentId = operationalEnvironmentId_example; // String |
$body = body_example; // String |

try {
    $api_instance->deactivateOperationEnvironment($version, $operationalEnvironmentId, $body);
} catch (Exception $e) {
    echo 'Exception when calling OnapsoinfracloudResourcesApi->deactivateOperationEnvironment: ', $e->getMessage(), PHP_EOL;
}
?></code></pre>
                                </div>

                                <div class="tab-pane" id="examples-OnapsoinfracloudResources-deactivateOperationEnvironment-0-perl">
                              <pre class="prettyprint"><code class="language-perl">use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::OnapsoinfracloudResourcesApi;

my $api_instance = WWW::SwaggerClient::OnapsoinfracloudResourcesApi->new();
my $version = version_example; # String |
my $operationalEnvironmentId = operationalEnvironmentId_example; # String |
my $body = WWW::SwaggerClient::Object::String->new(); # String |

eval {
    $api_instance->deactivateOperationEnvironment(version => $version, operationalEnvironmentId => $operationalEnvironmentId, body => $body);
};
if ($@) {
    warn "Exception when calling OnapsoinfracloudResourcesApi->deactivateOperationEnvironment: $@\n";
}</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-OnapsoinfracloudResources-deactivateOperationEnvironment-0-python">
                              <pre class="prettyprint"><code class="language-python">from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.OnapsoinfracloudResourcesApi()
version = version_example # String |
operationalEnvironmentId = operationalEnvironmentId_example # String |
body = body_example # String |  (optional)

try:
    # Deactivate an Operational Environment
    api_instance.deactivate_operation_environment(version, operationalEnvironmentId, body=body)
except ApiException as e:
    print("Exception when calling OnapsoinfracloudResourcesApi->deactivateOperationEnvironment: %s\n" % e)</code></pre>
                                </div>
                            </div>

                            <h2>Parameters</h2>

                            <div class="methodsubtabletitle">Path parameters</div>
                            <table id="methodsubtable">
                                <tr>
                                    <th width="150px">Name</th>
                                    <th>Description</th>
                                </tr>
                                <tr><td style="width:150px;">version*</td>
                                    <td>


                                        <div id="d2e199_deactivateOperationEnvironment_version">
                                            <div class="json-schema-view">
                                                <div class="primitive">
                <span class="type">
                    String
                </span>

                                                </div>
                                                <div class="inner required">
                                                    Required
                                                </div>
                                            </div>
                                        </div>
                                    </td>
                                </tr>

                                <tr><td style="width:150px;">operationalEnvironmentId*</td>
                                    <td>


                                        <div id="d2e199_deactivateOperationEnvironment_operationalEnvironmentId">
                                            <div class="json-schema-view">
                                                <div class="primitive">
                <span class="type">
                    String
                </span>

                                                </div>
                                                <div class="inner required">
                                                    Required
                                                </div>
                                            </div>
                                        </div>
                                    </td>
                                </tr>

                            </table>


                            <div class="methodsubtabletitle">Body parameters</div>
                            <table id="methodsubtable">
                                <tr>
                                    <th width="150px">Name</th>
                                    <th>Description</th>
                                </tr>
                                <tr><td style="width:150px;">body </td>
                                    <td>


                                        <script>
$(document).ready(function() {
  var schemaWrapper = {
  "in" : "body",
  "name" : "body",
  "required" : false,
  "schema" : {
    "type" : "string"
  }
};
  var schema = schemaWrapper.schema;
  if (schema.$ref != null) {
    schema = defsParser.$refs.get(schema.$ref);
  } else {
    schemaWrapper.definitions = Object.assign({}, defs);
    $RefParser.dereference(schemaWrapper).catch(function(err) {
      console.log(err);
    });
  }

  var view = new JSONSchemaView(schema,2,{isBodyParam: true});
  var result = $('#d2e199_deactivateOperationEnvironment_body');
  result.empty();
  result.append(view.render());
});
</script>
                                        <div id="d2e199_deactivateOperationEnvironment_body"></div>
                                    </td>
                                </tr>

                            </table>



                            <h2>Responses</h2>
                            <h3> Status: default - successful operation </h3>

                            <ul class="nav nav-tabs nav-tabs-examples" >
                            </ul>

                            <div class="tab-content" style='margin-bottom: 10px;'>
                            </div>

                        </article>
                    </div>
                    <hr>
                </section>
                <section id="api-OnapsoinfracloudResourcesRequests">
                    <h1>OnapsoinfracloudResourcesRequests</h1>
                    <div id="api-OnapsoinfracloudResourcesRequests-getOperationEnvironmentStatusFilter">
                        <article id="api-OnapsoinfracloudResourcesRequests-getOperationEnvironmentStatusFilter-0" data-group="User" data-name="getOperationEnvironmentStatusFilter" data-version="0">
                            <div class="pull-left">
                                <h1>getOperationEnvironmentStatusFilter</h1>
                                <p>Get status of an Operational Environment based on filter criteria</p>
                            </div>
                            <div class="pull-right"></div>
                            <div class="clearfix"></div>
                            <p></p>
                            <p class="marked"></p>
                            <p></p>
                            <br />
                            <pre class="prettyprint language-html prettyprinted" data-type="get"><code><span class="pln">/onap/so/infra/cloudResourcesRequests/{version}</span></code></pre>
                            <p>
                            <h3>Usage and SDK Samples</h3>
                            </p>
                            <ul class="nav nav-tabs nav-tabs-examples">
                                <li class="active"><a href="#examples-OnapsoinfracloudResourcesRequests-getOperationEnvironmentStatusFilter-0-curl">Curl</a></li>
                                <li class=""><a href="#examples-OnapsoinfracloudResourcesRequests-getOperationEnvironmentStatusFilter-0-java">Java</a></li>
                                <li class=""><a href="#examples-OnapsoinfracloudResourcesRequests-getOperationEnvironmentStatusFilter-0-android">Android</a></li>
                                <!--<li class=""><a href="#examples-OnapsoinfracloudResourcesRequests-getOperationEnvironmentStatusFilter-0-groovy">Groovy</a></li>-->
                                <li class=""><a href="#examples-OnapsoinfracloudResourcesRequests-getOperationEnvironmentStatusFilter-0-objc">Obj-C</a></li>
                                <li class=""><a href="#examples-OnapsoinfracloudResourcesRequests-getOperationEnvironmentStatusFilter-0-javascript">JavaScript</a></li>
                                <!--<li class=""><a href="#examples-OnapsoinfracloudResourcesRequests-getOperationEnvironmentStatusFilter-0-angular">Angular</a></li>-->
                                <li class=""><a href="#examples-OnapsoinfracloudResourcesRequests-getOperationEnvironmentStatusFilter-0-csharp">C#</a></li>
                                <li class=""><a href="#examples-OnapsoinfracloudResourcesRequests-getOperationEnvironmentStatusFilter-0-php">PHP</a></li>
                                <li class=""><a href="#examples-OnapsoinfracloudResourcesRequests-getOperationEnvironmentStatusFilter-0-perl">Perl</a></li>
                                <li class=""><a href="#examples-OnapsoinfracloudResourcesRequests-getOperationEnvironmentStatusFilter-0-python">Python</a></li>
                            </ul>

                            <div class="tab-content">
                                <div class="tab-pane active" id="examples-OnapsoinfracloudResourcesRequests-getOperationEnvironmentStatusFilter-0-curl">
                                    <pre class="prettyprint"><code class="language-bsh">curl -X GET "http://localhost/onap/so/infra/cloudResourcesRequests/{version}"</code></pre>
                                </div>
                                <div class="tab-pane" id="examples-OnapsoinfracloudResourcesRequests-getOperationEnvironmentStatusFilter-0-java">
                            <pre class="prettyprint"><code class="language-java">import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.OnapsoinfracloudResourcesRequestsApi;

import java.io.File;
import java.util.*;

public class OnapsoinfracloudResourcesRequestsApiExample {

    public static void main(String[] args) {

        OnapsoinfracloudResourcesRequestsApi apiInstance = new OnapsoinfracloudResourcesRequestsApi();
        String version = version_example; // String |
        try {
            apiInstance.getOperationEnvironmentStatusFilter(version);
        } catch (ApiException e) {
            System.err.println("Exception when calling OnapsoinfracloudResourcesRequestsApi#getOperationEnvironmentStatusFilter");
            e.printStackTrace();
        }
    }
}</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-OnapsoinfracloudResourcesRequests-getOperationEnvironmentStatusFilter-0-android">
                            <pre class="prettyprint"><code class="language-java">import io.swagger.client.api.OnapsoinfracloudResourcesRequestsApi;

public class OnapsoinfracloudResourcesRequestsApiExample {

    public static void main(String[] args) {
        OnapsoinfracloudResourcesRequestsApi apiInstance = new OnapsoinfracloudResourcesRequestsApi();
        String version = version_example; // String |
        try {
            apiInstance.getOperationEnvironmentStatusFilter(version);
        } catch (ApiException e) {
            System.err.println("Exception when calling OnapsoinfracloudResourcesRequestsApi#getOperationEnvironmentStatusFilter");
            e.printStackTrace();
        }
    }
}</code></pre>
                                </div>
                                <!--
  <div class="tab-pane" id="examples-OnapsoinfracloudResourcesRequests-getOperationEnvironmentStatusFilter-0-groovy">
  <pre class="prettyprint language-json prettyprinted" data-type="json"><code>Coming Soon!</code></pre>
  </div> -->
                                <div class="tab-pane" id="examples-OnapsoinfracloudResourcesRequests-getOperationEnvironmentStatusFilter-0-objc">
                              <pre class="prettyprint"><code class="language-cpp">String *version = version_example; //

OnapsoinfracloudResourcesRequestsApi *apiInstance = [[OnapsoinfracloudResourcesRequestsApi alloc] init];

// Get status of an Operational Environment based on filter criteria
[apiInstance getOperationEnvironmentStatusFilterWith:version
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-OnapsoinfracloudResourcesRequests-getOperationEnvironmentStatusFilter-0-javascript">
                              <pre class="prettyprint"><code class="language-js">var SoGuilinApIs = require('so_guilin_ap_is');

var api = new SoGuilinApIs.OnapsoinfracloudResourcesRequestsApi()

var version = version_example; // {String}


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.getOperationEnvironmentStatusFilter(version, callback);
</code></pre>
                                </div>

                                <!--<div class="tab-pane" id="examples-OnapsoinfracloudResourcesRequests-getOperationEnvironmentStatusFilter-0-angular">
              <pre class="prettyprint language-json prettyprinted" data-type="json"><code>Coming Soon!</code></pre>
            </div>-->
                                <div class="tab-pane" id="examples-OnapsoinfracloudResourcesRequests-getOperationEnvironmentStatusFilter-0-csharp">
                              <pre class="prettyprint"><code class="language-cs">using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getOperationEnvironmentStatusFilterExample
    {
        public void main()
        {

            var apiInstance = new OnapsoinfracloudResourcesRequestsApi();
            var version = version_example;  // String |

            try
            {
                // Get status of an Operational Environment based on filter criteria
                apiInstance.getOperationEnvironmentStatusFilter(version);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling OnapsoinfracloudResourcesRequestsApi.getOperationEnvironmentStatusFilter: " + e.Message );
            }
        }
    }
}
</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-OnapsoinfracloudResourcesRequests-getOperationEnvironmentStatusFilter-0-php">
                              <pre class="prettyprint"><code class="language-php"><&#63;php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\OnapsoinfracloudResourcesRequestsApi();
$version = version_example; // String |

try {
    $api_instance->getOperationEnvironmentStatusFilter($version);
} catch (Exception $e) {
    echo 'Exception when calling OnapsoinfracloudResourcesRequestsApi->getOperationEnvironmentStatusFilter: ', $e->getMessage(), PHP_EOL;
}
?></code></pre>
                                </div>

                                <div class="tab-pane" id="examples-OnapsoinfracloudResourcesRequests-getOperationEnvironmentStatusFilter-0-perl">
                              <pre class="prettyprint"><code class="language-perl">use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::OnapsoinfracloudResourcesRequestsApi;

my $api_instance = WWW::SwaggerClient::OnapsoinfracloudResourcesRequestsApi->new();
my $version = version_example; # String |

eval {
    $api_instance->getOperationEnvironmentStatusFilter(version => $version);
};
if ($@) {
    warn "Exception when calling OnapsoinfracloudResourcesRequestsApi->getOperationEnvironmentStatusFilter: $@\n";
}</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-OnapsoinfracloudResourcesRequests-getOperationEnvironmentStatusFilter-0-python">
                              <pre class="prettyprint"><code class="language-python">from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.OnapsoinfracloudResourcesRequestsApi()
version = version_example # String |

try:
    # Get status of an Operational Environment based on filter criteria
    api_instance.get_operation_environment_status_filter(version)
except ApiException as e:
    print("Exception when calling OnapsoinfracloudResourcesRequestsApi->getOperationEnvironmentStatusFilter: %s\n" % e)</code></pre>
                                </div>
                            </div>

                            <h2>Parameters</h2>

                            <div class="methodsubtabletitle">Path parameters</div>
                            <table id="methodsubtable">
                                <tr>
                                    <th width="150px">Name</th>
                                    <th>Description</th>
                                </tr>
                                <tr><td style="width:150px;">version*</td>
                                    <td>


                                        <div id="d2e199_getOperationEnvironmentStatusFilter_version">
                                            <div class="json-schema-view">
                                                <div class="primitive">
                <span class="type">
                    String
                </span>

                                                </div>
                                                <div class="inner required">
                                                    Required
                                                </div>
                                            </div>
                                        </div>
                                    </td>
                                </tr>

                            </table>





                            <h2>Responses</h2>
                            <h3> Status: default - successful operation </h3>

                            <ul class="nav nav-tabs nav-tabs-examples" >
                            </ul>

                            <div class="tab-content" style='margin-bottom: 10px;'>
                            </div>

                        </article>
                    </div>
                    <hr>
                    <div id="api-OnapsoinfracloudResourcesRequests-unlockOrchestrationRequestForReqId">
                        <article id="api-OnapsoinfracloudResourcesRequests-unlockOrchestrationRequestForReqId-0" data-group="User" data-name="unlockOrchestrationRequestForReqId" data-version="0">
                            <div class="pull-left">
                                <h1>unlockOrchestrationRequestForReqId</h1>
                                <p>Unlock CloudOrchestration requests for a specified requestId</p>
                            </div>
                            <div class="pull-right"></div>
                            <div class="clearfix"></div>
                            <p></p>
                            <p class="marked"></p>
                            <p></p>
                            <br />
                            <pre class="prettyprint language-html prettyprinted" data-type="post"><code><span class="pln">/onap/so/infra/cloudResourcesRequests/{version}/{requestId}/unlock</span></code></pre>
                            <p>
                            <h3>Usage and SDK Samples</h3>
                            </p>
                            <ul class="nav nav-tabs nav-tabs-examples">
                                <li class="active"><a href="#examples-OnapsoinfracloudResourcesRequests-unlockOrchestrationRequestForReqId-0-curl">Curl</a></li>
                                <li class=""><a href="#examples-OnapsoinfracloudResourcesRequests-unlockOrchestrationRequestForReqId-0-java">Java</a></li>
                                <li class=""><a href="#examples-OnapsoinfracloudResourcesRequests-unlockOrchestrationRequestForReqId-0-android">Android</a></li>
                                <!--<li class=""><a href="#examples-OnapsoinfracloudResourcesRequests-unlockOrchestrationRequestForReqId-0-groovy">Groovy</a></li>-->
                                <li class=""><a href="#examples-OnapsoinfracloudResourcesRequests-unlockOrchestrationRequestForReqId-0-objc">Obj-C</a></li>
                                <li class=""><a href="#examples-OnapsoinfracloudResourcesRequests-unlockOrchestrationRequestForReqId-0-javascript">JavaScript</a></li>
                                <!--<li class=""><a href="#examples-OnapsoinfracloudResourcesRequests-unlockOrchestrationRequestForReqId-0-angular">Angular</a></li>-->
                                <li class=""><a href="#examples-OnapsoinfracloudResourcesRequests-unlockOrchestrationRequestForReqId-0-csharp">C#</a></li>
                                <li class=""><a href="#examples-OnapsoinfracloudResourcesRequests-unlockOrchestrationRequestForReqId-0-php">PHP</a></li>
                                <li class=""><a href="#examples-OnapsoinfracloudResourcesRequests-unlockOrchestrationRequestForReqId-0-perl">Perl</a></li>
                                <li class=""><a href="#examples-OnapsoinfracloudResourcesRequests-unlockOrchestrationRequestForReqId-0-python">Python</a></li>
                            </ul>

                            <div class="tab-content">
                                <div class="tab-pane active" id="examples-OnapsoinfracloudResourcesRequests-unlockOrchestrationRequestForReqId-0-curl">
                                    <pre class="prettyprint"><code class="language-bsh">curl -X POST "http://localhost/onap/so/infra/cloudResourcesRequests/{version}/{requestId}/unlock"</code></pre>
                                </div>
                                <div class="tab-pane" id="examples-OnapsoinfracloudResourcesRequests-unlockOrchestrationRequestForReqId-0-java">
                            <pre class="prettyprint"><code class="language-java">import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.OnapsoinfracloudResourcesRequestsApi;

import java.io.File;
import java.util.*;

public class OnapsoinfracloudResourcesRequestsApiExample {

    public static void main(String[] args) {

        OnapsoinfracloudResourcesRequestsApi apiInstance = new OnapsoinfracloudResourcesRequestsApi();
        String requestId = requestId_example; // String |
        String version = version_example; // String |
        String body = body_example; // String |
        try {
            apiInstance.unlockOrchestrationRequestForReqId(requestId, version, body);
        } catch (ApiException e) {
            System.err.println("Exception when calling OnapsoinfracloudResourcesRequestsApi#unlockOrchestrationRequestForReqId");
            e.printStackTrace();
        }
    }
}</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-OnapsoinfracloudResourcesRequests-unlockOrchestrationRequestForReqId-0-android">
                            <pre class="prettyprint"><code class="language-java">import io.swagger.client.api.OnapsoinfracloudResourcesRequestsApi;

public class OnapsoinfracloudResourcesRequestsApiExample {

    public static void main(String[] args) {
        OnapsoinfracloudResourcesRequestsApi apiInstance = new OnapsoinfracloudResourcesRequestsApi();
        String requestId = requestId_example; // String |
        String version = version_example; // String |
        String body = body_example; // String |
        try {
            apiInstance.unlockOrchestrationRequestForReqId(requestId, version, body);
        } catch (ApiException e) {
            System.err.println("Exception when calling OnapsoinfracloudResourcesRequestsApi#unlockOrchestrationRequestForReqId");
            e.printStackTrace();
        }
    }
}</code></pre>
                                </div>
                                <!--
  <div class="tab-pane" id="examples-OnapsoinfracloudResourcesRequests-unlockOrchestrationRequestForReqId-0-groovy">
  <pre class="prettyprint language-json prettyprinted" data-type="json"><code>Coming Soon!</code></pre>
  </div> -->
                                <div class="tab-pane" id="examples-OnapsoinfracloudResourcesRequests-unlockOrchestrationRequestForReqId-0-objc">
                              <pre class="prettyprint"><code class="language-cpp">String *requestId = requestId_example; //
String *version = version_example; //
String *body = body_example; //  (optional)

OnapsoinfracloudResourcesRequestsApi *apiInstance = [[OnapsoinfracloudResourcesRequestsApi alloc] init];

// Unlock CloudOrchestration requests for a specified requestId
[apiInstance unlockOrchestrationRequestForReqIdWith:requestId
    version:version
    body:body
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-OnapsoinfracloudResourcesRequests-unlockOrchestrationRequestForReqId-0-javascript">
                              <pre class="prettyprint"><code class="language-js">var SoGuilinApIs = require('so_guilin_ap_is');

var api = new SoGuilinApIs.OnapsoinfracloudResourcesRequestsApi()

var requestId = requestId_example; // {String}

var version = version_example; // {String}

var opts = {
  'body': body_example // {String}
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.unlockOrchestrationRequestForReqId(requestId, version, opts, callback);
</code></pre>
                                </div>

                                <!--<div class="tab-pane" id="examples-OnapsoinfracloudResourcesRequests-unlockOrchestrationRequestForReqId-0-angular">
              <pre class="prettyprint language-json prettyprinted" data-type="json"><code>Coming Soon!</code></pre>
            </div>-->
                                <div class="tab-pane" id="examples-OnapsoinfracloudResourcesRequests-unlockOrchestrationRequestForReqId-0-csharp">
                              <pre class="prettyprint"><code class="language-cs">using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class unlockOrchestrationRequestForReqIdExample
    {
        public void main()
        {

            var apiInstance = new OnapsoinfracloudResourcesRequestsApi();
            var requestId = requestId_example;  // String |
            var version = version_example;  // String |
            var body = body_example;  // String |  (optional)

            try
            {
                // Unlock CloudOrchestration requests for a specified requestId
                apiInstance.unlockOrchestrationRequestForReqId(requestId, version, body);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling OnapsoinfracloudResourcesRequestsApi.unlockOrchestrationRequestForReqId: " + e.Message );
            }
        }
    }
}
</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-OnapsoinfracloudResourcesRequests-unlockOrchestrationRequestForReqId-0-php">
                              <pre class="prettyprint"><code class="language-php"><&#63;php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\OnapsoinfracloudResourcesRequestsApi();
$requestId = requestId_example; // String |
$version = version_example; // String |
$body = body_example; // String |

try {
    $api_instance->unlockOrchestrationRequestForReqId($requestId, $version, $body);
} catch (Exception $e) {
    echo 'Exception when calling OnapsoinfracloudResourcesRequestsApi->unlockOrchestrationRequestForReqId: ', $e->getMessage(), PHP_EOL;
}
?></code></pre>
                                </div>

                                <div class="tab-pane" id="examples-OnapsoinfracloudResourcesRequests-unlockOrchestrationRequestForReqId-0-perl">
                              <pre class="prettyprint"><code class="language-perl">use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::OnapsoinfracloudResourcesRequestsApi;

my $api_instance = WWW::SwaggerClient::OnapsoinfracloudResourcesRequestsApi->new();
my $requestId = requestId_example; # String |
my $version = version_example; # String |
my $body = WWW::SwaggerClient::Object::String->new(); # String |

eval {
    $api_instance->unlockOrchestrationRequestForReqId(requestId => $requestId, version => $version, body => $body);
};
if ($@) {
    warn "Exception when calling OnapsoinfracloudResourcesRequestsApi->unlockOrchestrationRequestForReqId: $@\n";
}</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-OnapsoinfracloudResourcesRequests-unlockOrchestrationRequestForReqId-0-python">
                              <pre class="prettyprint"><code class="language-python">from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.OnapsoinfracloudResourcesRequestsApi()
requestId = requestId_example # String |
version = version_example # String |
body = body_example # String |  (optional)

try:
    # Unlock CloudOrchestration requests for a specified requestId
    api_instance.unlock_orchestration_request_for_req_id(requestId, version, body=body)
except ApiException as e:
    print("Exception when calling OnapsoinfracloudResourcesRequestsApi->unlockOrchestrationRequestForReqId: %s\n" % e)</code></pre>
                                </div>
                            </div>

                            <h2>Parameters</h2>

                            <div class="methodsubtabletitle">Path parameters</div>
                            <table id="methodsubtable">
                                <tr>
                                    <th width="150px">Name</th>
                                    <th>Description</th>
                                </tr>
                                <tr><td style="width:150px;">requestId*</td>
                                    <td>


                                        <div id="d2e199_unlockOrchestrationRequestForReqId_requestId">
                                            <div class="json-schema-view">
                                                <div class="primitive">
                <span class="type">
                    String
                </span>

                                                </div>
                                                <div class="inner required">
                                                    Required
                                                </div>
                                            </div>
                                        </div>
                                    </td>
                                </tr>

                                <tr><td style="width:150px;">version*</td>
                                    <td>


                                        <div id="d2e199_unlockOrchestrationRequestForReqId_version">
                                            <div class="json-schema-view">
                                                <div class="primitive">
                <span class="type">
                    String
                </span>

                                                </div>
                                                <div class="inner required">
                                                    Required
                                                </div>
                                            </div>
                                        </div>
                                    </td>
                                </tr>

                            </table>


                            <div class="methodsubtabletitle">Body parameters</div>
                            <table id="methodsubtable">
                                <tr>
                                    <th width="150px">Name</th>
                                    <th>Description</th>
                                </tr>
                                <tr><td style="width:150px;">body </td>
                                    <td>


                                        <script>
$(document).ready(function() {
  var schemaWrapper = {
  "in" : "body",
  "name" : "body",
  "required" : false,
  "schema" : {
    "type" : "string"
  }
};
  var schema = schemaWrapper.schema;
  if (schema.$ref != null) {
    schema = defsParser.$refs.get(schema.$ref);
  } else {
    schemaWrapper.definitions = Object.assign({}, defs);
    $RefParser.dereference(schemaWrapper).catch(function(err) {
      console.log(err);
    });
  }

  var view = new JSONSchemaView(schema,2,{isBodyParam: true});
  var result = $('#d2e199_unlockOrchestrationRequestForReqId_body');
  result.empty();
  result.append(view.render());
});
</script>
                                        <div id="d2e199_unlockOrchestrationRequestForReqId_body"></div>
                                    </td>
                                </tr>

                            </table>



                            <h2>Responses</h2>
                            <h3> Status: default - successful operation </h3>

                            <ul class="nav nav-tabs nav-tabs-examples" >
                            </ul>

                            <div class="tab-content" style='margin-bottom: 10px;'>
                            </div>

                        </article>
                    </div>
                    <hr>
                </section>
                <section id="api-OnapsoinfrainstanceManagement">
                    <h1>OnapsoinfrainstanceManagement</h1>
                    <div id="api-OnapsoinfrainstanceManagement-executePNFCustomWorkflow">
                        <article id="api-OnapsoinfrainstanceManagement-executePNFCustomWorkflow-0" data-group="User" data-name="executePNFCustomWorkflow" data-version="0">
                            <div class="pull-left">
                                <h1>executePNFCustomWorkflow</h1>
                                <p>Executing download/activate custom workflow</p>
                            </div>
                            <div class="pull-right"></div>
                            <div class="clearfix"></div>
                            <p></p>
                            <p class="marked"></p>
                            <p></p>
                            <br />
                            <pre class="prettyprint language-html prettyprinted" data-type="post"><code><span class="pln">/onap/so/infra/instanceManagement/{version}/serviceInstances/{serviceInstanceId}/pnfs/${pnfName}/workflows/${workflow_UUID}</span></code></pre>
                            <p>
                            <h3>Usage and SDK Samples</h3>
                            </p>
                            <ul class="nav nav-tabs nav-tabs-examples">
                                <li class="active"><a href="#examples-OnapsoinfrainstanceManagement-executePNFCustomWorkflow-0-curl">Curl</a></li>
                                <li class=""><a href="#examples-OnapsoinfrainstanceManagement-executePNFCustomWorkflow-0-java">Java</a></li>
                                <li class=""><a href="#examples-OnapsoinfrainstanceManagement-executePNFCustomWorkflow-0-android">Android</a></li>
                                <!--<li class=""><a href="#examples-OnapsoinfrainstanceManagement-executePNFCustomWorkflow-0-groovy">Groovy</a></li>-->
                                <li class=""><a href="#examples-OnapsoinfrainstanceManagement-executePNFCustomWorkflow-0-objc">Obj-C</a></li>
                                <li class=""><a href="#examples-OnapsoinfrainstanceManagement-executePNFCustomWorkflow-0-javascript">JavaScript</a></li>
                                <!--<li class=""><a href="#examples-OnapsoinfrainstanceManagement-executePNFCustomWorkflow-0-angular">Angular</a></li>-->
                                <li class=""><a href="#examples-OnapsoinfrainstanceManagement-executePNFCustomWorkflow-0-csharp">C#</a></li>
                                <li class=""><a href="#examples-OnapsoinfrainstanceManagement-executePNFCustomWorkflow-0-php">PHP</a></li>
                                <li class=""><a href="#examples-OnapsoinfrainstanceManagement-executePNFCustomWorkflow-0-perl">Perl</a></li>
                                <li class=""><a href="#examples-OnapsoinfrainstanceManagement-executePNFCustomWorkflow-0-python">Python</a></li>
                            </ul>

                            <div class="tab-content">
                                <div class="tab-pane active" id="examples-OnapsoinfrainstanceManagement-executePNFCustomWorkflow-0-curl">
                                    <pre class="prettyprint"><code class="language-bsh">curl -X POST "http://localhost/onap/so/infra/instanceManagement/{version}/serviceInstances/{serviceInstanceId}/pnfs/${pnfName}/workflows/${workflow_UUID}"</code></pre>
                                </div>
                                <div class="tab-pane" id="examples-OnapsoinfrainstanceManagement-executePNFCustomWorkflow-0-java">
                            <pre class="prettyprint"><code class="language-java">import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.OnapsoinfrainstanceManagementApi;

import java.io.File;
import java.util.*;

public class OnapsoinfrainstanceManagementApiExample {

    public static void main(String[] args) {

        OnapsoinfrainstanceManagementApi apiInstance = new OnapsoinfrainstanceManagementApi();
        String version = version_example; // String |
        String serviceInstanceId = serviceInstanceId_example; // String |
        String pnfName = pnfName_example; // String |
        String workflowUUID = workflowUUID_example; // String |
        PNFCustomWorkflowExecution body = ; // PNFCustomWorkflowExecution |
        try {
            apiInstance.executePNFCustomWorkflow(version, serviceInstanceId, pnfName, workflowUUID, body);
        } catch (ApiException e) {
            System.err.println("Exception when calling OnapsoinfrainstanceManagementApi#executePNFCustomWorkflow");
            e.printStackTrace();
        }
    }
}</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-OnapsoinfrainstanceManagement-executePNFCustomWorkflow-0-android">
                            <pre class="prettyprint"><code class="language-java">import io.swagger.client.api.OnapsoinfrainstanceManagementApi;

public class OnapsoinfrainstanceManagementApiExample {

    public static void main(String[] args) {
        OnapsoinfrainstanceManagementApi apiInstance = new OnapsoinfrainstanceManagementApi();
        String version = version_example; // String |
        String serviceInstanceId = serviceInstanceId_example; // String |
        String pnfName = pnfName_example; // String |
        String workflowUUID = workflowUUID_example; // String |
        PNFCustomWorkflowExecution body = ; // PNFCustomWorkflowExecution |
        try {
            apiInstance.executePNFCustomWorkflow(version, serviceInstanceId, pnfName, workflowUUID, body);
        } catch (ApiException e) {
            System.err.println("Exception when calling OnapsoinfrainstanceManagementApi#executePNFCustomWorkflow");
            e.printStackTrace();
        }
    }
}</code></pre>
                                </div>
                                <!--
  <div class="tab-pane" id="examples-OnapsoinfrainstanceManagement-executePNFCustomWorkflow-0-groovy">
  <pre class="prettyprint language-json prettyprinted" data-type="json"><code>Coming Soon!</code></pre>
  </div> -->
                                <div class="tab-pane" id="examples-OnapsoinfrainstanceManagement-executePNFCustomWorkflow-0-objc">
                              <pre class="prettyprint"><code class="language-cpp">String *version = version_example; //
String *serviceInstanceId = serviceInstanceId_example; //
String *pnfName = pnfName_example; //
String *workflowUUID = workflowUUID_example; //
PNFCustomWorkflowExecution *body = ; //  (optional)

OnapsoinfrainstanceManagementApi *apiInstance = [[OnapsoinfrainstanceManagementApi alloc] init];

// Executing download/activate custom workflow
[apiInstance executePNFCustomWorkflowWith:version
    serviceInstanceId:serviceInstanceId
    pnfName:pnfName
    workflowUUID:workflowUUID
    body:body
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-OnapsoinfrainstanceManagement-executePNFCustomWorkflow-0-javascript">
                              <pre class="prettyprint"><code class="language-js">var SoGuilinApIs = require('so_guilin_ap_is');

var api = new SoGuilinApIs.OnapsoinfrainstanceManagementApi()

var version = version_example; // {String}

var serviceInstanceId = serviceInstanceId_example; // {String}

var pnfName = pnfName_example; // {String}

var workflowUUID = workflowUUID_example; // {String}

var opts = {
  'body':  // {PNFCustomWorkflowExecution}
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.executePNFCustomWorkflow(version, serviceInstanceId, pnfName, workflowUUID, opts, callback);
</code></pre>
                                </div>

                                <!--<div class="tab-pane" id="examples-OnapsoinfrainstanceManagement-executePNFCustomWorkflow-0-angular">
              <pre class="prettyprint language-json prettyprinted" data-type="json"><code>Coming Soon!</code></pre>
            </div>-->
                                <div class="tab-pane" id="examples-OnapsoinfrainstanceManagement-executePNFCustomWorkflow-0-csharp">
                              <pre class="prettyprint"><code class="language-cs">using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class executePNFCustomWorkflowExample
    {
        public void main()
        {

            var apiInstance = new OnapsoinfrainstanceManagementApi();
            var version = version_example;  // String |
            var serviceInstanceId = serviceInstanceId_example;  // String |
            var pnfName = pnfName_example;  // String |
            var workflowUUID = workflowUUID_example;  // String |
            var body = new PNFCustomWorkflowExecution(); // PNFCustomWorkflowExecution |  (optional)

            try
            {
                // Executing download/activate custom workflow
                apiInstance.executePNFCustomWorkflow(version, serviceInstanceId, pnfName, workflowUUID, body);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling OnapsoinfrainstanceManagementApi.executePNFCustomWorkflow: " + e.Message );
            }
        }
    }
}
</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-OnapsoinfrainstanceManagement-executePNFCustomWorkflow-0-php">
                              <pre class="prettyprint"><code class="language-php"><&#63;php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\OnapsoinfrainstanceManagementApi();
$version = version_example; // String |
$serviceInstanceId = serviceInstanceId_example; // String |
$pnfName = pnfName_example; // String |
$workflowUUID = workflowUUID_example; // String |
$body = ; // PNFCustomWorkflowExecution |

try {
    $api_instance->executePNFCustomWorkflow($version, $serviceInstanceId, $pnfName, $workflowUUID, $body);
} catch (Exception $e) {
    echo 'Exception when calling OnapsoinfrainstanceManagementApi->executePNFCustomWorkflow: ', $e->getMessage(), PHP_EOL;
}
?></code></pre>
                                </div>

                                <div class="tab-pane" id="examples-OnapsoinfrainstanceManagement-executePNFCustomWorkflow-0-perl">
                              <pre class="prettyprint"><code class="language-perl">use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::OnapsoinfrainstanceManagementApi;

my $api_instance = WWW::SwaggerClient::OnapsoinfrainstanceManagementApi->new();
my $version = version_example; # String |
my $serviceInstanceId = serviceInstanceId_example; # String |
my $pnfName = pnfName_example; # String |
my $workflowUUID = workflowUUID_example; # String |
my $body = WWW::SwaggerClient::Object::PNFCustomWorkflowExecution->new(); # PNFCustomWorkflowExecution |

eval {
    $api_instance->executePNFCustomWorkflow(version => $version, serviceInstanceId => $serviceInstanceId, pnfName => $pnfName, workflowUUID => $workflowUUID, body => $body);
};
if ($@) {
    warn "Exception when calling OnapsoinfrainstanceManagementApi->executePNFCustomWorkflow: $@\n";
}</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-OnapsoinfrainstanceManagement-executePNFCustomWorkflow-0-python">
                              <pre class="prettyprint"><code class="language-python">from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.OnapsoinfrainstanceManagementApi()
version = version_example # String |
serviceInstanceId = serviceInstanceId_example # String |
pnfName = pnfName_example # String |
workflowUUID = workflowUUID_example # String |
body =  # PNFCustomWorkflowExecution |  (optional)

try:
    # Executing download/activate custom workflow
    api_instance.execute_pnf_custom_workflow(version, serviceInstanceId, pnfName, workflowUUID, body=body)
except ApiException as e:
    print("Exception when calling OnapsoinfrainstanceManagementApi->executePNFCustomWorkflow: %s\n" % e)</code></pre>
                                </div>
                            </div>

                            <h2>Parameters</h2>

                            <div class="methodsubtabletitle">Path parameters</div>
                            <table id="methodsubtable">
                                <tr>
                                    <th width="150px">Name</th>
                                    <th>Description</th>
                                </tr>
                                <tr><td style="width:150px;">version*</td>
                                    <td>


                                        <div id="d2e199_executePNFCustomWorkflow_version">
                                            <div class="json-schema-view">
                                                <div class="primitive">
                <span class="type">
                    String
                </span>

                                                </div>
                                                <div class="inner required">
                                                    Required
                                                </div>
                                            </div>
                                        </div>
                                    </td>
                                </tr>

                                <tr><td style="width:150px;">serviceInstanceId*</td>
                                    <td>


                                        <div id="d2e199_executePNFCustomWorkflow_serviceInstanceId">
                                            <div class="json-schema-view">
                                                <div class="primitive">
                <span class="type">
                    String
                </span>

                                                </div>
                                                <div class="inner required">
                                                    Required
                                                </div>
                                            </div>
                                        </div>
                                    </td>
                                </tr>

                                <tr><td style="width:150px;">pnfName*</td>
                                    <td>


                                        <div id="d2e199_executePNFCustomWorkflow_pnfName">
                                            <div class="json-schema-view">
                                                <div class="primitive">
                <span class="type">
                    String
                </span>

                                                </div>
                                                <div class="inner required">
                                                    Required
                                                </div>
                                            </div>
                                        </div>
                                    </td>
                                </tr>

                                <tr><td style="width:150px;">workflow_UUID*</td>
                                    <td>


                                        <div id="d2e199_executePNFCustomWorkflow_workflowUUID">
                                            <div class="json-schema-view">
                                                <div class="primitive">
                <span class="type">
                    String
                </span>

                                                </div>
                                                <div class="inner required">
                                                    Required
                                                </div>
                                            </div>
                                        </div>
                                    </td>
                                </tr>

                            </table>


                            <div class="methodsubtabletitle">Body parameters</div>
                            <table id="methodsubtable">
                                <tr>
                                    <th width="150px">Name</th>
                                    <th>Description</th>
                                </tr>
                                <tr><td style="width:150px;">body </td>
                                    <td>


                                        <script>
$(document).ready(function() {
  var schemaWrapper = {
  "in" : "body",
  "name" : "body",
  "required" : false,
  "schema" : {
    "$ref" : "#/definitions/PNFCustomWorkflowExecution"
  }
};
  var schema = schemaWrapper.schema;
  if (schema.$ref != null) {
    schema = defsParser.$refs.get(schema.$ref);
  } else {
    schemaWrapper.definitions = Object.assign({}, defs);
    $RefParser.dereference(schemaWrapper).catch(function(err) {
      console.log(err);
    });
  }

  var view = new JSONSchemaView(schema,2,{isBodyParam: true});
  var result = $('#d2e199_executePNFCustomWorkflow_body');
  result.empty();
  result.append(view.render());
});
</script>
                                        <div id="d2e199_executePNFCustomWorkflow_body"></div>
                                    </td>
                                </tr>

                            </table>



                            <h2>Responses</h2>
                            <h3> Status: default - successful operation </h3>

                            <ul class="nav nav-tabs nav-tabs-examples" >
                            </ul>

                            <div class="tab-content" style='margin-bottom: 10px;'>
                            </div>

                        </article>
                    </div>
                    <hr>
                    <div id="api-OnapsoinfrainstanceManagement-executeServiceLevelCustomWorkflow">
                        <article id="api-OnapsoinfrainstanceManagement-executeServiceLevelCustomWorkflow-0" data-group="User" data-name="executeServiceLevelCustomWorkflow" data-version="0">
                            <div class="pull-left">
                                <h1>executeServiceLevelCustomWorkflow</h1>
                                <p>Executing service level custom workflow</p>
                            </div>
                            <div class="pull-right"></div>
                            <div class="clearfix"></div>
                            <p></p>
                            <p class="marked"></p>
                            <p></p>
                            <br />
                            <pre class="prettyprint language-html prettyprinted" data-type="post"><code><span class="pln">/onap/so/infra/instanceManagement/{version}/serviceInstances/{serviceInstanceId}/workflows/{workflow_UUID}</span></code></pre>
                            <p>
                            <h3>Usage and SDK Samples</h3>
                            </p>
                            <ul class="nav nav-tabs nav-tabs-examples">
                                <li class="active"><a href="#examples-OnapsoinfrainstanceManagement-executeServiceLevelCustomWorkflow-0-curl">Curl</a></li>
                                <li class=""><a href="#examples-OnapsoinfrainstanceManagement-executeServiceLevelCustomWorkflow-0-java">Java</a></li>
                                <li class=""><a href="#examples-OnapsoinfrainstanceManagement-executeServiceLevelCustomWorkflow-0-android">Android</a></li>
                                <!--<li class=""><a href="#examples-OnapsoinfrainstanceManagement-executeServiceLevelCustomWorkflow-0-groovy">Groovy</a></li>-->
                                <li class=""><a href="#examples-OnapsoinfrainstanceManagement-executeServiceLevelCustomWorkflow-0-objc">Obj-C</a></li>
                                <li class=""><a href="#examples-OnapsoinfrainstanceManagement-executeServiceLevelCustomWorkflow-0-javascript">JavaScript</a></li>
                                <!--<li class=""><a href="#examples-OnapsoinfrainstanceManagement-executeServiceLevelCustomWorkflow-0-angular">Angular</a></li>-->
                                <li class=""><a href="#examples-OnapsoinfrainstanceManagement-executeServiceLevelCustomWorkflow-0-csharp">C#</a></li>
                                <li class=""><a href="#examples-OnapsoinfrainstanceManagement-executeServiceLevelCustomWorkflow-0-php">PHP</a></li>
                                <li class=""><a href="#examples-OnapsoinfrainstanceManagement-executeServiceLevelCustomWorkflow-0-perl">Perl</a></li>
                                <li class=""><a href="#examples-OnapsoinfrainstanceManagement-executeServiceLevelCustomWorkflow-0-python">Python</a></li>
                            </ul>

                            <div class="tab-content">
                                <div class="tab-pane active" id="examples-OnapsoinfrainstanceManagement-executeServiceLevelCustomWorkflow-0-curl">
                                    <pre class="prettyprint"><code class="language-bsh">curl -X POST "http://localhost/onap/so/infra/instanceManagement/{version}/serviceInstances/{serviceInstanceId}/workflows/{workflow_UUID}"</code></pre>
                                </div>
                                <div class="tab-pane" id="examples-OnapsoinfrainstanceManagement-executeServiceLevelCustomWorkflow-0-java">
                            <pre class="prettyprint"><code class="language-java">import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.OnapsoinfrainstanceManagementApi;

import java.io.File;
import java.util.*;

public class OnapsoinfrainstanceManagementApiExample {

    public static void main(String[] args) {

        OnapsoinfrainstanceManagementApi apiInstance = new OnapsoinfrainstanceManagementApi();
        String version = version_example; // String |
        String serviceInstanceId = serviceInstanceId_example; // String |
        String workflowUUID = workflowUUID_example; // String |
        ServiceLevelWorkflowExecution body = ; // ServiceLevelWorkflowExecution |
        try {
            apiInstance.executeServiceLevelCustomWorkflow(version, serviceInstanceId, workflowUUID, body);
        } catch (ApiException e) {
            System.err.println("Exception when calling OnapsoinfrainstanceManagementApi#executeServiceLevelCustomWorkflow");
            e.printStackTrace();
        }
    }
}</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-OnapsoinfrainstanceManagement-executeServiceLevelCustomWorkflow-0-android">
                            <pre class="prettyprint"><code class="language-java">import io.swagger.client.api.OnapsoinfrainstanceManagementApi;

public class OnapsoinfrainstanceManagementApiExample {

    public static void main(String[] args) {
        OnapsoinfrainstanceManagementApi apiInstance = new OnapsoinfrainstanceManagementApi();
        String version = version_example; // String |
        String serviceInstanceId = serviceInstanceId_example; // String |
        String workflowUUID = workflowUUID_example; // String |
        ServiceLevelWorkflowExecution body = ; // ServiceLevelWorkflowExecution |
        try {
            apiInstance.executeServiceLevelCustomWorkflow(version, serviceInstanceId, workflowUUID, body);
        } catch (ApiException e) {
            System.err.println("Exception when calling OnapsoinfrainstanceManagementApi#executeServiceLevelCustomWorkflow");
            e.printStackTrace();
        }
    }
}</code></pre>
                                </div>
                                <!--
  <div class="tab-pane" id="examples-OnapsoinfrainstanceManagement-executeServiceLevelCustomWorkflow-0-groovy">
  <pre class="prettyprint language-json prettyprinted" data-type="json"><code>Coming Soon!</code></pre>
  </div> -->
                                <div class="tab-pane" id="examples-OnapsoinfrainstanceManagement-executeServiceLevelCustomWorkflow-0-objc">
                              <pre class="prettyprint"><code class="language-cpp">String *version = version_example; //
String *serviceInstanceId = serviceInstanceId_example; //
String *workflowUUID = workflowUUID_example; //
ServiceLevelWorkflowExecution *body = ; //  (optional)

OnapsoinfrainstanceManagementApi *apiInstance = [[OnapsoinfrainstanceManagementApi alloc] init];

// Executing service level custom workflow
[apiInstance executeServiceLevelCustomWorkflowWith:version
    serviceInstanceId:serviceInstanceId
    workflowUUID:workflowUUID
    body:body
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-OnapsoinfrainstanceManagement-executeServiceLevelCustomWorkflow-0-javascript">
                              <pre class="prettyprint"><code class="language-js">var SoGuilinApIs = require('so_guilin_ap_is');

var api = new SoGuilinApIs.OnapsoinfrainstanceManagementApi()

var version = version_example; // {String}

var serviceInstanceId = serviceInstanceId_example; // {String}

var workflowUUID = workflowUUID_example; // {String}

var opts = {
  'body':  // {ServiceLevelWorkflowExecution}
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.executeServiceLevelCustomWorkflow(version, serviceInstanceId, workflowUUID, opts, callback);
</code></pre>
                                </div>

                                <!--<div class="tab-pane" id="examples-OnapsoinfrainstanceManagement-executeServiceLevelCustomWorkflow-0-angular">
              <pre class="prettyprint language-json prettyprinted" data-type="json"><code>Coming Soon!</code></pre>
            </div>-->
                                <div class="tab-pane" id="examples-OnapsoinfrainstanceManagement-executeServiceLevelCustomWorkflow-0-csharp">
                              <pre class="prettyprint"><code class="language-cs">using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class executeServiceLevelCustomWorkflowExample
    {
        public void main()
        {

            var apiInstance = new OnapsoinfrainstanceManagementApi();
            var version = version_example;  // String |
            var serviceInstanceId = serviceInstanceId_example;  // String |
            var workflowUUID = workflowUUID_example;  // String |
            var body = new ServiceLevelWorkflowExecution(); // ServiceLevelWorkflowExecution |  (optional)

            try
            {
                // Executing service level custom workflow
                apiInstance.executeServiceLevelCustomWorkflow(version, serviceInstanceId, workflowUUID, body);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling OnapsoinfrainstanceManagementApi.executeServiceLevelCustomWorkflow: " + e.Message );
            }
        }
    }
}
</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-OnapsoinfrainstanceManagement-executeServiceLevelCustomWorkflow-0-php">
                              <pre class="prettyprint"><code class="language-php"><&#63;php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\OnapsoinfrainstanceManagementApi();
$version = version_example; // String |
$serviceInstanceId = serviceInstanceId_example; // String |
$workflowUUID = workflowUUID_example; // String |
$body = ; // ServiceLevelWorkflowExecution |

try {
    $api_instance->executeServiceLevelCustomWorkflow($version, $serviceInstanceId, $workflowUUID, $body);
} catch (Exception $e) {
    echo 'Exception when calling OnapsoinfrainstanceManagementApi->executeServiceLevelCustomWorkflow: ', $e->getMessage(), PHP_EOL;
}
?></code></pre>
                                </div>

                                <div class="tab-pane" id="examples-OnapsoinfrainstanceManagement-executeServiceLevelCustomWorkflow-0-perl">
                              <pre class="prettyprint"><code class="language-perl">use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::OnapsoinfrainstanceManagementApi;

my $api_instance = WWW::SwaggerClient::OnapsoinfrainstanceManagementApi->new();
my $version = version_example; # String |
my $serviceInstanceId = serviceInstanceId_example; # String |
my $workflowUUID = workflowUUID_example; # String |
my $body = WWW::SwaggerClient::Object::ServiceLevelWorkflowExecution->new(); # ServiceLevelWorkflowExecution |

eval {
    $api_instance->executeServiceLevelCustomWorkflow(version => $version, serviceInstanceId => $serviceInstanceId, workflowUUID => $workflowUUID, body => $body);
};
if ($@) {
    warn "Exception when calling OnapsoinfrainstanceManagementApi->executeServiceLevelCustomWorkflow: $@\n";
}</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-OnapsoinfrainstanceManagement-executeServiceLevelCustomWorkflow-0-python">
                              <pre class="prettyprint"><code class="language-python">from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.OnapsoinfrainstanceManagementApi()
version = version_example # String |
serviceInstanceId = serviceInstanceId_example # String |
workflowUUID = workflowUUID_example # String |
body =  # ServiceLevelWorkflowExecution |  (optional)

try:
    # Executing service level custom workflow
    api_instance.execute_service_level_custom_workflow(version, serviceInstanceId, workflowUUID, body=body)
except ApiException as e:
    print("Exception when calling OnapsoinfrainstanceManagementApi->executeServiceLevelCustomWorkflow: %s\n" % e)</code></pre>
                                </div>
                            </div>

                            <h2>Parameters</h2>

                            <div class="methodsubtabletitle">Path parameters</div>
                            <table id="methodsubtable">
                                <tr>
                                    <th width="150px">Name</th>
                                    <th>Description</th>
                                </tr>
                                <tr><td style="width:150px;">version*</td>
                                    <td>


                                        <div id="d2e199_executeServiceLevelCustomWorkflow_version">
                                            <div class="json-schema-view">
                                                <div class="primitive">
                <span class="type">
                    String
                </span>

                                                </div>
                                                <div class="inner required">
                                                    Required
                                                </div>
                                            </div>
                                        </div>
                                    </td>
                                </tr>

                                <tr><td style="width:150px;">serviceInstanceId*</td>
                                    <td>


                                        <div id="d2e199_executeServiceLevelCustomWorkflow_serviceInstanceId">
                                            <div class="json-schema-view">
                                                <div class="primitive">
                <span class="type">
                    String
                </span>

                                                </div>
                                                <div class="inner required">
                                                    Required
                                                </div>
                                            </div>
                                        </div>
                                    </td>
                                </tr>

                                <tr><td style="width:150px;">workflow_UUID*</td>
                                    <td>


                                        <div id="d2e199_executeServiceLevelCustomWorkflow_workflowUUID">
                                            <div class="json-schema-view">
                                                <div class="primitive">
                <span class="type">
                    String
                </span>

                                                </div>
                                                <div class="inner required">
                                                    Required
                                                </div>
                                            </div>
                                        </div>
                                    </td>
                                </tr>

                            </table>


                            <div class="methodsubtabletitle">Body parameters</div>
                            <table id="methodsubtable">
                                <tr>
                                    <th width="150px">Name</th>
                                    <th>Description</th>
                                </tr>
                                <tr><td style="width:150px;">body </td>
                                    <td>


                                        <script>
$(document).ready(function() {
  var schemaWrapper = {
  "in" : "body",
  "name" : "body",
  "required" : false,
  "schema" : {
    "$ref" : "#/definitions/ServiceLevelWorkflowExecution"
  }
};
  var schema = schemaWrapper.schema;
  if (schema.$ref != null) {
    schema = defsParser.$refs.get(schema.$ref);
  } else {
    schemaWrapper.definitions = Object.assign({}, defs);
    $RefParser.dereference(schemaWrapper).catch(function(err) {
      console.log(err);
    });
  }

  var view = new JSONSchemaView(schema,2,{isBodyParam: true});
  var result = $('#d2e199_executeServiceLevelCustomWorkflow_body');
  result.empty();
  result.append(view.render());
});
</script>
                                        <div id="d2e199_executeServiceLevelCustomWorkflow_body"></div>
                                    </td>
                                </tr>

                            </table>



                            <h2>Responses</h2>
                            <h3> Status: default - successful operation </h3>

                            <ul class="nav nav-tabs nav-tabs-examples" >
                            </ul>

                            <div class="tab-content" style='margin-bottom: 10px;'>
                            </div>

                        </article>
                    </div>
                    <hr>
                </section>
                <section id="api-OnapsoinframodelDistributions">
                    <h1>OnapsoinframodelDistributions</h1>
                    <div id="api-OnapsoinframodelDistributions-updateModelDistributionStatus">
                        <article id="api-OnapsoinframodelDistributions-updateModelDistributionStatus-0" data-group="User" data-name="updateModelDistributionStatus" data-version="0">
                            <div class="pull-left">
                                <h1>updateModelDistributionStatus</h1>
                                <p>Update model distribution status</p>
                            </div>
                            <div class="pull-right"></div>
                            <div class="clearfix"></div>
                            <p></p>
                            <p class="marked"></p>
                            <p></p>
                            <br />
                            <pre class="prettyprint language-html prettyprinted" data-type="post"><code><span class="pln">/onap/so/infra/modelDistributions/{version}/distributions/{distributionId}</span></code></pre>
                            <p>
                            <h3>Usage and SDK Samples</h3>
                            </p>
                            <ul class="nav nav-tabs nav-tabs-examples">
                                <li class="active"><a href="#examples-OnapsoinframodelDistributions-updateModelDistributionStatus-0-curl">Curl</a></li>
                                <li class=""><a href="#examples-OnapsoinframodelDistributions-updateModelDistributionStatus-0-java">Java</a></li>
                                <li class=""><a href="#examples-OnapsoinframodelDistributions-updateModelDistributionStatus-0-android">Android</a></li>
                                <!--<li class=""><a href="#examples-OnapsoinframodelDistributions-updateModelDistributionStatus-0-groovy">Groovy</a></li>-->
                                <li class=""><a href="#examples-OnapsoinframodelDistributions-updateModelDistributionStatus-0-objc">Obj-C</a></li>
                                <li class=""><a href="#examples-OnapsoinframodelDistributions-updateModelDistributionStatus-0-javascript">JavaScript</a></li>
                                <!--<li class=""><a href="#examples-OnapsoinframodelDistributions-updateModelDistributionStatus-0-angular">Angular</a></li>-->
                                <li class=""><a href="#examples-OnapsoinframodelDistributions-updateModelDistributionStatus-0-csharp">C#</a></li>
                                <li class=""><a href="#examples-OnapsoinframodelDistributions-updateModelDistributionStatus-0-php">PHP</a></li>
                                <li class=""><a href="#examples-OnapsoinframodelDistributions-updateModelDistributionStatus-0-perl">Perl</a></li>
                                <li class=""><a href="#examples-OnapsoinframodelDistributions-updateModelDistributionStatus-0-python">Python</a></li>
                            </ul>

                            <div class="tab-content">
                                <div class="tab-pane active" id="examples-OnapsoinframodelDistributions-updateModelDistributionStatus-0-curl">
                                    <pre class="prettyprint"><code class="language-bsh">curl -X POST "http://localhost/onap/so/infra/modelDistributions/{version}/distributions/{distributionId}"</code></pre>
                                </div>
                                <div class="tab-pane" id="examples-OnapsoinframodelDistributions-updateModelDistributionStatus-0-java">
                            <pre class="prettyprint"><code class="language-java">import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.OnapsoinframodelDistributionsApi;

import java.io.File;
import java.util.*;

public class OnapsoinframodelDistributionsApiExample {

    public static void main(String[] args) {

        OnapsoinframodelDistributionsApi apiInstance = new OnapsoinframodelDistributionsApi();
        String version = version_example; // String |
        String distributionId = distributionId_example; // String |
        String body = body_example; // String |
        try {
            apiInstance.updateModelDistributionStatus(version, distributionId, body);
        } catch (ApiException e) {
            System.err.println("Exception when calling OnapsoinframodelDistributionsApi#updateModelDistributionStatus");
            e.printStackTrace();
        }
    }
}</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-OnapsoinframodelDistributions-updateModelDistributionStatus-0-android">
                            <pre class="prettyprint"><code class="language-java">import io.swagger.client.api.OnapsoinframodelDistributionsApi;

public class OnapsoinframodelDistributionsApiExample {

    public static void main(String[] args) {
        OnapsoinframodelDistributionsApi apiInstance = new OnapsoinframodelDistributionsApi();
        String version = version_example; // String |
        String distributionId = distributionId_example; // String |
        String body = body_example; // String |
        try {
            apiInstance.updateModelDistributionStatus(version, distributionId, body);
        } catch (ApiException e) {
            System.err.println("Exception when calling OnapsoinframodelDistributionsApi#updateModelDistributionStatus");
            e.printStackTrace();
        }
    }
}</code></pre>
                                </div>
                                <!--
  <div class="tab-pane" id="examples-OnapsoinframodelDistributions-updateModelDistributionStatus-0-groovy">
  <pre class="prettyprint language-json prettyprinted" data-type="json"><code>Coming Soon!</code></pre>
  </div> -->
                                <div class="tab-pane" id="examples-OnapsoinframodelDistributions-updateModelDistributionStatus-0-objc">
                              <pre class="prettyprint"><code class="language-cpp">String *version = version_example; //
String *distributionId = distributionId_example; //
String *body = body_example; //  (optional)

OnapsoinframodelDistributionsApi *apiInstance = [[OnapsoinframodelDistributionsApi alloc] init];

// Update model distribution status
[apiInstance updateModelDistributionStatusWith:version
    distributionId:distributionId
    body:body
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-OnapsoinframodelDistributions-updateModelDistributionStatus-0-javascript">
                              <pre class="prettyprint"><code class="language-js">var SoGuilinApIs = require('so_guilin_ap_is');

var api = new SoGuilinApIs.OnapsoinframodelDistributionsApi()

var version = version_example; // {String}

var distributionId = distributionId_example; // {String}

var opts = {
  'body': body_example // {String}
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.updateModelDistributionStatus(version, distributionId, opts, callback);
</code></pre>
                                </div>

                                <!--<div class="tab-pane" id="examples-OnapsoinframodelDistributions-updateModelDistributionStatus-0-angular">
              <pre class="prettyprint language-json prettyprinted" data-type="json"><code>Coming Soon!</code></pre>
            </div>-->
                                <div class="tab-pane" id="examples-OnapsoinframodelDistributions-updateModelDistributionStatus-0-csharp">
                              <pre class="prettyprint"><code class="language-cs">using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class updateModelDistributionStatusExample
    {
        public void main()
        {

            var apiInstance = new OnapsoinframodelDistributionsApi();
            var version = version_example;  // String |
            var distributionId = distributionId_example;  // String |
            var body = body_example;  // String |  (optional)

            try
            {
                // Update model distribution status
                apiInstance.updateModelDistributionStatus(version, distributionId, body);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling OnapsoinframodelDistributionsApi.updateModelDistributionStatus: " + e.Message );
            }
        }
    }
}
</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-OnapsoinframodelDistributions-updateModelDistributionStatus-0-php">
                              <pre class="prettyprint"><code class="language-php"><&#63;php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\OnapsoinframodelDistributionsApi();
$version = version_example; // String |
$distributionId = distributionId_example; // String |
$body = body_example; // String |

try {
    $api_instance->updateModelDistributionStatus($version, $distributionId, $body);
} catch (Exception $e) {
    echo 'Exception when calling OnapsoinframodelDistributionsApi->updateModelDistributionStatus: ', $e->getMessage(), PHP_EOL;
}
?></code></pre>
                                </div>

                                <div class="tab-pane" id="examples-OnapsoinframodelDistributions-updateModelDistributionStatus-0-perl">
                              <pre class="prettyprint"><code class="language-perl">use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::OnapsoinframodelDistributionsApi;

my $api_instance = WWW::SwaggerClient::OnapsoinframodelDistributionsApi->new();
my $version = version_example; # String |
my $distributionId = distributionId_example; # String |
my $body = WWW::SwaggerClient::Object::String->new(); # String |

eval {
    $api_instance->updateModelDistributionStatus(version => $version, distributionId => $distributionId, body => $body);
};
if ($@) {
    warn "Exception when calling OnapsoinframodelDistributionsApi->updateModelDistributionStatus: $@\n";
}</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-OnapsoinframodelDistributions-updateModelDistributionStatus-0-python">
                              <pre class="prettyprint"><code class="language-python">from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.OnapsoinframodelDistributionsApi()
version = version_example # String |
distributionId = distributionId_example # String |
body = body_example # String |  (optional)

try:
    # Update model distribution status
    api_instance.update_model_distribution_status(version, distributionId, body=body)
except ApiException as e:
    print("Exception when calling OnapsoinframodelDistributionsApi->updateModelDistributionStatus: %s\n" % e)</code></pre>
                                </div>
                            </div>

                            <h2>Parameters</h2>

                            <div class="methodsubtabletitle">Path parameters</div>
                            <table id="methodsubtable">
                                <tr>
                                    <th width="150px">Name</th>
                                    <th>Description</th>
                                </tr>
                                <tr><td style="width:150px;">version*</td>
                                    <td>


                                        <div id="d2e199_updateModelDistributionStatus_version">
                                            <div class="json-schema-view">
                                                <div class="primitive">
                <span class="type">
                    String
                </span>

                                                </div>
                                                <div class="inner required">
                                                    Required
                                                </div>
                                            </div>
                                        </div>
                                    </td>
                                </tr>

                                <tr><td style="width:150px;">distributionId*</td>
                                    <td>


                                        <div id="d2e199_updateModelDistributionStatus_distributionId">
                                            <div class="json-schema-view">
                                                <div class="primitive">
                <span class="type">
                    String
                </span>

                                                </div>
                                                <div class="inner required">
                                                    Required
                                                </div>
                                            </div>
                                        </div>
                                    </td>
                                </tr>

                            </table>


                            <div class="methodsubtabletitle">Body parameters</div>
                            <table id="methodsubtable">
                                <tr>
                                    <th width="150px">Name</th>
                                    <th>Description</th>
                                </tr>
                                <tr><td style="width:150px;">body </td>
                                    <td>


                                        <script>
$(document).ready(function() {
  var schemaWrapper = {
  "in" : "body",
  "name" : "body",
  "required" : false,
  "schema" : {
    "type" : "string"
  }
};
  var schema = schemaWrapper.schema;
  if (schema.$ref != null) {
    schema = defsParser.$refs.get(schema.$ref);
  } else {
    schemaWrapper.definitions = Object.assign({}, defs);
    $RefParser.dereference(schemaWrapper).catch(function(err) {
      console.log(err);
    });
  }

  var view = new JSONSchemaView(schema,2,{isBodyParam: true});
  var result = $('#d2e199_updateModelDistributionStatus_body');
  result.empty();
  result.append(view.render());
});
</script>
                                        <div id="d2e199_updateModelDistributionStatus_body"></div>
                                    </td>
                                </tr>

                            </table>



                            <h2>Responses</h2>
                            <h3> Status: default - successful operation </h3>

                            <ul class="nav nav-tabs nav-tabs-examples" >
                            </ul>

                            <div class="tab-content" style='margin-bottom: 10px;'>
                            </div>

                        </article>
                    </div>
                    <hr>
                </section>
                <section id="api-OnapsoinfraorchestrationRequests">
                    <h1>OnapsoinfraorchestrationRequests</h1>
                    <div id="api-OnapsoinfraorchestrationRequests-getOrchestrationRequest">
                        <article id="api-OnapsoinfraorchestrationRequests-getOrchestrationRequest-0" data-group="User" data-name="getOrchestrationRequest" data-version="0">
                            <div class="pull-left">
                                <h1>getOrchestrationRequest</h1>
                                <p>Find Orchestrated Requests for a URI Information</p>
                            </div>
                            <div class="pull-right"></div>
                            <div class="clearfix"></div>
                            <p></p>
                            <p class="marked"></p>
                            <p></p>
                            <br />
                            <pre class="prettyprint language-html prettyprinted" data-type="get"><code><span class="pln">/onap/so/infra/orchestrationRequests/{version}</span></code></pre>
                            <p>
                            <h3>Usage and SDK Samples</h3>
                            </p>
                            <ul class="nav nav-tabs nav-tabs-examples">
                                <li class="active"><a href="#examples-OnapsoinfraorchestrationRequests-getOrchestrationRequest-0-curl">Curl</a></li>
                                <li class=""><a href="#examples-OnapsoinfraorchestrationRequests-getOrchestrationRequest-0-java">Java</a></li>
                                <li class=""><a href="#examples-OnapsoinfraorchestrationRequests-getOrchestrationRequest-0-android">Android</a></li>
                                <!--<li class=""><a href="#examples-OnapsoinfraorchestrationRequests-getOrchestrationRequest-0-groovy">Groovy</a></li>-->
                                <li class=""><a href="#examples-OnapsoinfraorchestrationRequests-getOrchestrationRequest-0-objc">Obj-C</a></li>
                                <li class=""><a href="#examples-OnapsoinfraorchestrationRequests-getOrchestrationRequest-0-javascript">JavaScript</a></li>
                                <!--<li class=""><a href="#examples-OnapsoinfraorchestrationRequests-getOrchestrationRequest-0-angular">Angular</a></li>-->
                                <li class=""><a href="#examples-OnapsoinfraorchestrationRequests-getOrchestrationRequest-0-csharp">C#</a></li>
                                <li class=""><a href="#examples-OnapsoinfraorchestrationRequests-getOrchestrationRequest-0-php">PHP</a></li>
                                <li class=""><a href="#examples-OnapsoinfraorchestrationRequests-getOrchestrationRequest-0-perl">Perl</a></li>
                                <li class=""><a href="#examples-OnapsoinfraorchestrationRequests-getOrchestrationRequest-0-python">Python</a></li>
                            </ul>

                            <div class="tab-content">
                                <div class="tab-pane active" id="examples-OnapsoinfraorchestrationRequests-getOrchestrationRequest-0-curl">
                                    <pre class="prettyprint"><code class="language-bsh">curl -X GET "http://localhost/onap/so/infra/orchestrationRequests/{version}"</code></pre>
                                </div>
                                <div class="tab-pane" id="examples-OnapsoinfraorchestrationRequests-getOrchestrationRequest-0-java">
                            <pre class="prettyprint"><code class="language-java">import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.OnapsoinfraorchestrationRequestsApi;

import java.io.File;
import java.util.*;

public class OnapsoinfraorchestrationRequestsApiExample {

    public static void main(String[] args) {

        OnapsoinfraorchestrationRequestsApi apiInstance = new OnapsoinfraorchestrationRequestsApi();
        String version = version_example; // String |
        try {
            apiInstance.getOrchestrationRequest(version);
        } catch (ApiException e) {
            System.err.println("Exception when calling OnapsoinfraorchestrationRequestsApi#getOrchestrationRequest");
            e.printStackTrace();
        }
    }
}</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-OnapsoinfraorchestrationRequests-getOrchestrationRequest-0-android">
                            <pre class="prettyprint"><code class="language-java">import io.swagger.client.api.OnapsoinfraorchestrationRequestsApi;

public class OnapsoinfraorchestrationRequestsApiExample {

    public static void main(String[] args) {
        OnapsoinfraorchestrationRequestsApi apiInstance = new OnapsoinfraorchestrationRequestsApi();
        String version = version_example; // String |
        try {
            apiInstance.getOrchestrationRequest(version);
        } catch (ApiException e) {
            System.err.println("Exception when calling OnapsoinfraorchestrationRequestsApi#getOrchestrationRequest");
            e.printStackTrace();
        }
    }
}</code></pre>
                                </div>
                                <!--
  <div class="tab-pane" id="examples-OnapsoinfraorchestrationRequests-getOrchestrationRequest-0-groovy">
  <pre class="prettyprint language-json prettyprinted" data-type="json"><code>Coming Soon!</code></pre>
  </div> -->
                                <div class="tab-pane" id="examples-OnapsoinfraorchestrationRequests-getOrchestrationRequest-0-objc">
                              <pre class="prettyprint"><code class="language-cpp">String *version = version_example; //

OnapsoinfraorchestrationRequestsApi *apiInstance = [[OnapsoinfraorchestrationRequestsApi alloc] init];

// Find Orchestrated Requests for a URI Information
[apiInstance getOrchestrationRequestWith:version
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-OnapsoinfraorchestrationRequests-getOrchestrationRequest-0-javascript">
                              <pre class="prettyprint"><code class="language-js">var SoGuilinApIs = require('so_guilin_ap_is');

var api = new SoGuilinApIs.OnapsoinfraorchestrationRequestsApi()

var version = version_example; // {String}


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.getOrchestrationRequest(version, callback);
</code></pre>
                                </div>

                                <!--<div class="tab-pane" id="examples-OnapsoinfraorchestrationRequests-getOrchestrationRequest-0-angular">
              <pre class="prettyprint language-json prettyprinted" data-type="json"><code>Coming Soon!</code></pre>
            </div>-->
                                <div class="tab-pane" id="examples-OnapsoinfraorchestrationRequests-getOrchestrationRequest-0-csharp">
                              <pre class="prettyprint"><code class="language-cs">using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getOrchestrationRequestExample
    {
        public void main()
        {

            var apiInstance = new OnapsoinfraorchestrationRequestsApi();
            var version = version_example;  // String |

            try
            {
                // Find Orchestrated Requests for a URI Information
                apiInstance.getOrchestrationRequest(version);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling OnapsoinfraorchestrationRequestsApi.getOrchestrationRequest: " + e.Message );
            }
        }
    }
}
</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-OnapsoinfraorchestrationRequests-getOrchestrationRequest-0-php">
                              <pre class="prettyprint"><code class="language-php"><&#63;php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\OnapsoinfraorchestrationRequestsApi();
$version = version_example; // String |

try {
    $api_instance->getOrchestrationRequest($version);
} catch (Exception $e) {
    echo 'Exception when calling OnapsoinfraorchestrationRequestsApi->getOrchestrationRequest: ', $e->getMessage(), PHP_EOL;
}
?></code></pre>
                                </div>

                                <div class="tab-pane" id="examples-OnapsoinfraorchestrationRequests-getOrchestrationRequest-0-perl">
                              <pre class="prettyprint"><code class="language-perl">use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::OnapsoinfraorchestrationRequestsApi;

my $api_instance = WWW::SwaggerClient::OnapsoinfraorchestrationRequestsApi->new();
my $version = version_example; # String |

eval {
    $api_instance->getOrchestrationRequest(version => $version);
};
if ($@) {
    warn "Exception when calling OnapsoinfraorchestrationRequestsApi->getOrchestrationRequest: $@\n";
}</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-OnapsoinfraorchestrationRequests-getOrchestrationRequest-0-python">
                              <pre class="prettyprint"><code class="language-python">from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.OnapsoinfraorchestrationRequestsApi()
version = version_example # String |

try:
    # Find Orchestrated Requests for a URI Information
    api_instance.get_orchestration_request(version)
except ApiException as e:
    print("Exception when calling OnapsoinfraorchestrationRequestsApi->getOrchestrationRequest: %s\n" % e)</code></pre>
                                </div>
                            </div>

                            <h2>Parameters</h2>

                            <div class="methodsubtabletitle">Path parameters</div>
                            <table id="methodsubtable">
                                <tr>
                                    <th width="150px">Name</th>
                                    <th>Description</th>
                                </tr>
                                <tr><td style="width:150px;">version*</td>
                                    <td>


                                        <div id="d2e199_getOrchestrationRequest_version">
                                            <div class="json-schema-view">
                                                <div class="primitive">
                <span class="type">
                    String
                </span>

                                                </div>
                                                <div class="inner required">
                                                    Required
                                                </div>
                                            </div>
                                        </div>
                                    </td>
                                </tr>

                            </table>





                            <h2>Responses</h2>
                            <h3> Status: default - successful operation </h3>

                            <ul class="nav nav-tabs nav-tabs-examples" >
                            </ul>

                            <div class="tab-content" style='margin-bottom: 10px;'>
                            </div>

                        </article>
                    </div>
                    <hr>
                    <div id="api-OnapsoinfraorchestrationRequests-getOrchestrationRequestForReqId">
                        <article id="api-OnapsoinfraorchestrationRequests-getOrchestrationRequestForReqId-0" data-group="User" data-name="getOrchestrationRequestForReqId" data-version="0">
                            <div class="pull-left">
                                <h1>getOrchestrationRequestForReqId</h1>
                                <p>Find Orchestrated Requests for a given requestId</p>
                            </div>
                            <div class="pull-right"></div>
                            <div class="clearfix"></div>
                            <p></p>
                            <p class="marked"></p>
                            <p></p>
                            <br />
                            <pre class="prettyprint language-html prettyprinted" data-type="get"><code><span class="pln">/onap/so/infra/orchestrationRequests/{version}/{requestId}</span></code></pre>
                            <p>
                            <h3>Usage and SDK Samples</h3>
                            </p>
                            <ul class="nav nav-tabs nav-tabs-examples">
                                <li class="active"><a href="#examples-OnapsoinfraorchestrationRequests-getOrchestrationRequestForReqId-0-curl">Curl</a></li>
                                <li class=""><a href="#examples-OnapsoinfraorchestrationRequests-getOrchestrationRequestForReqId-0-java">Java</a></li>
                                <li class=""><a href="#examples-OnapsoinfraorchestrationRequests-getOrchestrationRequestForReqId-0-android">Android</a></li>
                                <!--<li class=""><a href="#examples-OnapsoinfraorchestrationRequests-getOrchestrationRequestForReqId-0-groovy">Groovy</a></li>-->
                                <li class=""><a href="#examples-OnapsoinfraorchestrationRequests-getOrchestrationRequestForReqId-0-objc">Obj-C</a></li>
                                <li class=""><a href="#examples-OnapsoinfraorchestrationRequests-getOrchestrationRequestForReqId-0-javascript">JavaScript</a></li>
                                <!--<li class=""><a href="#examples-OnapsoinfraorchestrationRequests-getOrchestrationRequestForReqId-0-angular">Angular</a></li>-->
                                <li class=""><a href="#examples-OnapsoinfraorchestrationRequests-getOrchestrationRequestForReqId-0-csharp">C#</a></li>
                                <li class=""><a href="#examples-OnapsoinfraorchestrationRequests-getOrchestrationRequestForReqId-0-php">PHP</a></li>
                                <li class=""><a href="#examples-OnapsoinfraorchestrationRequests-getOrchestrationRequestForReqId-0-perl">Perl</a></li>
                                <li class=""><a href="#examples-OnapsoinfraorchestrationRequests-getOrchestrationRequestForReqId-0-python">Python</a></li>
                            </ul>

                            <div class="tab-content">
                                <div class="tab-pane active" id="examples-OnapsoinfraorchestrationRequests-getOrchestrationRequestForReqId-0-curl">
                                    <pre class="prettyprint"><code class="language-bsh">curl -X GET "http://localhost/onap/so/infra/orchestrationRequests/{version}/{requestId}"</code></pre>
                                </div>
                                <div class="tab-pane" id="examples-OnapsoinfraorchestrationRequests-getOrchestrationRequestForReqId-0-java">
                            <pre class="prettyprint"><code class="language-java">import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.OnapsoinfraorchestrationRequestsApi;

import java.io.File;
import java.util.*;

public class OnapsoinfraorchestrationRequestsApiExample {

    public static void main(String[] args) {

        OnapsoinfraorchestrationRequestsApi apiInstance = new OnapsoinfraorchestrationRequestsApi();
        String requestId = requestId_example; // String |
        String version = version_example; // String |
        try {
            apiInstance.getOrchestrationRequestForReqId(requestId, version);
        } catch (ApiException e) {
            System.err.println("Exception when calling OnapsoinfraorchestrationRequestsApi#getOrchestrationRequestForReqId");
            e.printStackTrace();
        }
    }
}</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-OnapsoinfraorchestrationRequests-getOrchestrationRequestForReqId-0-android">
                            <pre class="prettyprint"><code class="language-java">import io.swagger.client.api.OnapsoinfraorchestrationRequestsApi;

public class OnapsoinfraorchestrationRequestsApiExample {

    public static void main(String[] args) {
        OnapsoinfraorchestrationRequestsApi apiInstance = new OnapsoinfraorchestrationRequestsApi();
        String requestId = requestId_example; // String |
        String version = version_example; // String |
        try {
            apiInstance.getOrchestrationRequestForReqId(requestId, version);
        } catch (ApiException e) {
            System.err.println("Exception when calling OnapsoinfraorchestrationRequestsApi#getOrchestrationRequestForReqId");
            e.printStackTrace();
        }
    }
}</code></pre>
                                </div>
                                <!--
  <div class="tab-pane" id="examples-OnapsoinfraorchestrationRequests-getOrchestrationRequestForReqId-0-groovy">
  <pre class="prettyprint language-json prettyprinted" data-type="json"><code>Coming Soon!</code></pre>
  </div> -->
                                <div class="tab-pane" id="examples-OnapsoinfraorchestrationRequests-getOrchestrationRequestForReqId-0-objc">
                              <pre class="prettyprint"><code class="language-cpp">String *requestId = requestId_example; //
String *version = version_example; //

OnapsoinfraorchestrationRequestsApi *apiInstance = [[OnapsoinfraorchestrationRequestsApi alloc] init];

// Find Orchestrated Requests for a given requestId
[apiInstance getOrchestrationRequestForReqIdWith:requestId
    version:version
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-OnapsoinfraorchestrationRequests-getOrchestrationRequestForReqId-0-javascript">
                              <pre class="prettyprint"><code class="language-js">var SoGuilinApIs = require('so_guilin_ap_is');

var api = new SoGuilinApIs.OnapsoinfraorchestrationRequestsApi()

var requestId = requestId_example; // {String}

var version = version_example; // {String}


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.getOrchestrationRequestForReqId(requestId, version, callback);
</code></pre>
                                </div>

                                <!--<div class="tab-pane" id="examples-OnapsoinfraorchestrationRequests-getOrchestrationRequestForReqId-0-angular">
              <pre class="prettyprint language-json prettyprinted" data-type="json"><code>Coming Soon!</code></pre>
            </div>-->
                                <div class="tab-pane" id="examples-OnapsoinfraorchestrationRequests-getOrchestrationRequestForReqId-0-csharp">
                              <pre class="prettyprint"><code class="language-cs">using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getOrchestrationRequestForReqIdExample
    {
        public void main()
        {

            var apiInstance = new OnapsoinfraorchestrationRequestsApi();
            var requestId = requestId_example;  // String |
            var version = version_example;  // String |

            try
            {
                // Find Orchestrated Requests for a given requestId
                apiInstance.getOrchestrationRequestForReqId(requestId, version);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling OnapsoinfraorchestrationRequestsApi.getOrchestrationRequestForReqId: " + e.Message );
            }
        }
    }
}
</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-OnapsoinfraorchestrationRequests-getOrchestrationRequestForReqId-0-php">
                              <pre class="prettyprint"><code class="language-php"><&#63;php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\OnapsoinfraorchestrationRequestsApi();
$requestId = requestId_example; // String |
$version = version_example; // String |

try {
    $api_instance->getOrchestrationRequestForReqId($requestId, $version);
} catch (Exception $e) {
    echo 'Exception when calling OnapsoinfraorchestrationRequestsApi->getOrchestrationRequestForReqId: ', $e->getMessage(), PHP_EOL;
}
?></code></pre>
                                </div>

                                <div class="tab-pane" id="examples-OnapsoinfraorchestrationRequests-getOrchestrationRequestForReqId-0-perl">
                              <pre class="prettyprint"><code class="language-perl">use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::OnapsoinfraorchestrationRequestsApi;

my $api_instance = WWW::SwaggerClient::OnapsoinfraorchestrationRequestsApi->new();
my $requestId = requestId_example; # String |
my $version = version_example; # String |

eval {
    $api_instance->getOrchestrationRequestForReqId(requestId => $requestId, version => $version);
};
if ($@) {
    warn "Exception when calling OnapsoinfraorchestrationRequestsApi->getOrchestrationRequestForReqId: $@\n";
}</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-OnapsoinfraorchestrationRequests-getOrchestrationRequestForReqId-0-python">
                              <pre class="prettyprint"><code class="language-python">from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.OnapsoinfraorchestrationRequestsApi()
requestId = requestId_example # String |
version = version_example # String |

try:
    # Find Orchestrated Requests for a given requestId
    api_instance.get_orchestration_request_for_req_id(requestId, version)
except ApiException as e:
    print("Exception when calling OnapsoinfraorchestrationRequestsApi->getOrchestrationRequestForReqId: %s\n" % e)</code></pre>
                                </div>
                            </div>

                            <h2>Parameters</h2>

                            <div class="methodsubtabletitle">Path parameters</div>
                            <table id="methodsubtable">
                                <tr>
                                    <th width="150px">Name</th>
                                    <th>Description</th>
                                </tr>
                                <tr><td style="width:150px;">requestId*</td>
                                    <td>


                                        <div id="d2e199_getOrchestrationRequestForReqId_requestId">
                                            <div class="json-schema-view">
                                                <div class="primitive">
                <span class="type">
                    String
                </span>

                                                </div>
                                                <div class="inner required">
                                                    Required
                                                </div>
                                            </div>
                                        </div>
                                    </td>
                                </tr>

                                <tr><td style="width:150px;">version*</td>
                                    <td>


                                        <div id="d2e199_getOrchestrationRequestForReqId_version">
                                            <div class="json-schema-view">
                                                <div class="primitive">
                <span class="type">
                    String
                </span>

                                                </div>
                                                <div class="inner required">
                                                    Required
                                                </div>
                                            </div>
                                        </div>
                                    </td>
                                </tr>

                            </table>





                            <h2>Responses</h2>
                            <h3> Status: default - successful operation </h3>

                            <ul class="nav nav-tabs nav-tabs-examples" >
                            </ul>

                            <div class="tab-content" style='margin-bottom: 10px;'>
                            </div>

                        </article>
                    </div>
                    <hr>
                    <div id="api-OnapsoinfraorchestrationRequests-unlockOrchestrationRequest">
                        <article id="api-OnapsoinfraorchestrationRequests-unlockOrchestrationRequest-0" data-group="User" data-name="unlockOrchestrationRequest" data-version="0">
                            <div class="pull-left">
                                <h1>unlockOrchestrationRequest</h1>
                                <p>Unlock Orchestrated Requests for a given requestId</p>
                            </div>
                            <div class="pull-right"></div>
                            <div class="clearfix"></div>
                            <p></p>
                            <p class="marked"></p>
                            <p></p>
                            <br />
                            <pre class="prettyprint language-html prettyprinted" data-type="post"><code><span class="pln">/onap/so/infra/orchestrationRequests/{version}/{requestId}/unlock</span></code></pre>
                            <p>
                            <h3>Usage and SDK Samples</h3>
                            </p>
                            <ul class="nav nav-tabs nav-tabs-examples">
                                <li class="active"><a href="#examples-OnapsoinfraorchestrationRequests-unlockOrchestrationRequest-0-curl">Curl</a></li>
                                <li class=""><a href="#examples-OnapsoinfraorchestrationRequests-unlockOrchestrationRequest-0-java">Java</a></li>
                                <li class=""><a href="#examples-OnapsoinfraorchestrationRequests-unlockOrchestrationRequest-0-android">Android</a></li>
                                <!--<li class=""><a href="#examples-OnapsoinfraorchestrationRequests-unlockOrchestrationRequest-0-groovy">Groovy</a></li>-->
                                <li class=""><a href="#examples-OnapsoinfraorchestrationRequests-unlockOrchestrationRequest-0-objc">Obj-C</a></li>
                                <li class=""><a href="#examples-OnapsoinfraorchestrationRequests-unlockOrchestrationRequest-0-javascript">JavaScript</a></li>
                                <!--<li class=""><a href="#examples-OnapsoinfraorchestrationRequests-unlockOrchestrationRequest-0-angular">Angular</a></li>-->
                                <li class=""><a href="#examples-OnapsoinfraorchestrationRequests-unlockOrchestrationRequest-0-csharp">C#</a></li>
                                <li class=""><a href="#examples-OnapsoinfraorchestrationRequests-unlockOrchestrationRequest-0-php">PHP</a></li>
                                <li class=""><a href="#examples-OnapsoinfraorchestrationRequests-unlockOrchestrationRequest-0-perl">Perl</a></li>
                                <li class=""><a href="#examples-OnapsoinfraorchestrationRequests-unlockOrchestrationRequest-0-python">Python</a></li>
                            </ul>

                            <div class="tab-content">
                                <div class="tab-pane active" id="examples-OnapsoinfraorchestrationRequests-unlockOrchestrationRequest-0-curl">
                                    <pre class="prettyprint"><code class="language-bsh">curl -X POST "http://localhost/onap/so/infra/orchestrationRequests/{version}/{requestId}/unlock"</code></pre>
                                </div>
                                <div class="tab-pane" id="examples-OnapsoinfraorchestrationRequests-unlockOrchestrationRequest-0-java">
                            <pre class="prettyprint"><code class="language-java">import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.OnapsoinfraorchestrationRequestsApi;

import java.io.File;
import java.util.*;

public class OnapsoinfraorchestrationRequestsApiExample {

    public static void main(String[] args) {

        OnapsoinfraorchestrationRequestsApi apiInstance = new OnapsoinfraorchestrationRequestsApi();
        String requestId = requestId_example; // String |
        String version = version_example; // String |
        String body = body_example; // String |
        try {
            apiInstance.unlockOrchestrationRequest(requestId, version, body);
        } catch (ApiException e) {
            System.err.println("Exception when calling OnapsoinfraorchestrationRequestsApi#unlockOrchestrationRequest");
            e.printStackTrace();
        }
    }
}</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-OnapsoinfraorchestrationRequests-unlockOrchestrationRequest-0-android">
                            <pre class="prettyprint"><code class="language-java">import io.swagger.client.api.OnapsoinfraorchestrationRequestsApi;

public class OnapsoinfraorchestrationRequestsApiExample {

    public static void main(String[] args) {
        OnapsoinfraorchestrationRequestsApi apiInstance = new OnapsoinfraorchestrationRequestsApi();
        String requestId = requestId_example; // String |
        String version = version_example; // String |
        String body = body_example; // String |
        try {
            apiInstance.unlockOrchestrationRequest(requestId, version, body);
        } catch (ApiException e) {
            System.err.println("Exception when calling OnapsoinfraorchestrationRequestsApi#unlockOrchestrationRequest");
            e.printStackTrace();
        }
    }
}</code></pre>
                                </div>
                                <!--
  <div class="tab-pane" id="examples-OnapsoinfraorchestrationRequests-unlockOrchestrationRequest-0-groovy">
  <pre class="prettyprint language-json prettyprinted" data-type="json"><code>Coming Soon!</code></pre>
  </div> -->
                                <div class="tab-pane" id="examples-OnapsoinfraorchestrationRequests-unlockOrchestrationRequest-0-objc">
                              <pre class="prettyprint"><code class="language-cpp">String *requestId = requestId_example; //
String *version = version_example; //
String *body = body_example; //  (optional)

OnapsoinfraorchestrationRequestsApi *apiInstance = [[OnapsoinfraorchestrationRequestsApi alloc] init];

// Unlock Orchestrated Requests for a given requestId
[apiInstance unlockOrchestrationRequestWith:requestId
    version:version
    body:body
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-OnapsoinfraorchestrationRequests-unlockOrchestrationRequest-0-javascript">
                              <pre class="prettyprint"><code class="language-js">var SoGuilinApIs = require('so_guilin_ap_is');

var api = new SoGuilinApIs.OnapsoinfraorchestrationRequestsApi()

var requestId = requestId_example; // {String}

var version = version_example; // {String}

var opts = {
  'body': body_example // {String}
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.unlockOrchestrationRequest(requestId, version, opts, callback);
</code></pre>
                                </div>

                                <!--<div class="tab-pane" id="examples-OnapsoinfraorchestrationRequests-unlockOrchestrationRequest-0-angular">
              <pre class="prettyprint language-json prettyprinted" data-type="json"><code>Coming Soon!</code></pre>
            </div>-->
                                <div class="tab-pane" id="examples-OnapsoinfraorchestrationRequests-unlockOrchestrationRequest-0-csharp">
                              <pre class="prettyprint"><code class="language-cs">using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class unlockOrchestrationRequestExample
    {
        public void main()
        {

            var apiInstance = new OnapsoinfraorchestrationRequestsApi();
            var requestId = requestId_example;  // String |
            var version = version_example;  // String |
            var body = body_example;  // String |  (optional)

            try
            {
                // Unlock Orchestrated Requests for a given requestId
                apiInstance.unlockOrchestrationRequest(requestId, version, body);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling OnapsoinfraorchestrationRequestsApi.unlockOrchestrationRequest: " + e.Message );
            }
        }
    }
}
</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-OnapsoinfraorchestrationRequests-unlockOrchestrationRequest-0-php">
                              <pre class="prettyprint"><code class="language-php"><&#63;php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\OnapsoinfraorchestrationRequestsApi();
$requestId = requestId_example; // String |
$version = version_example; // String |
$body = body_example; // String |

try {
    $api_instance->unlockOrchestrationRequest($requestId, $version, $body);
} catch (Exception $e) {
    echo 'Exception when calling OnapsoinfraorchestrationRequestsApi->unlockOrchestrationRequest: ', $e->getMessage(), PHP_EOL;
}
?></code></pre>
                                </div>

                                <div class="tab-pane" id="examples-OnapsoinfraorchestrationRequests-unlockOrchestrationRequest-0-perl">
                              <pre class="prettyprint"><code class="language-perl">use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::OnapsoinfraorchestrationRequestsApi;

my $api_instance = WWW::SwaggerClient::OnapsoinfraorchestrationRequestsApi->new();
my $requestId = requestId_example; # String |
my $version = version_example; # String |
my $body = WWW::SwaggerClient::Object::String->new(); # String |

eval {
    $api_instance->unlockOrchestrationRequest(requestId => $requestId, version => $version, body => $body);
};
if ($@) {
    warn "Exception when calling OnapsoinfraorchestrationRequestsApi->unlockOrchestrationRequest: $@\n";
}</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-OnapsoinfraorchestrationRequests-unlockOrchestrationRequest-0-python">
                              <pre class="prettyprint"><code class="language-python">from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.OnapsoinfraorchestrationRequestsApi()
requestId = requestId_example # String |
version = version_example # String |
body = body_example # String |  (optional)

try:
    # Unlock Orchestrated Requests for a given requestId
    api_instance.unlock_orchestration_request(requestId, version, body=body)
except ApiException as e:
    print("Exception when calling OnapsoinfraorchestrationRequestsApi->unlockOrchestrationRequest: %s\n" % e)</code></pre>
                                </div>
                            </div>

                            <h2>Parameters</h2>

                            <div class="methodsubtabletitle">Path parameters</div>
                            <table id="methodsubtable">
                                <tr>
                                    <th width="150px">Name</th>
                                    <th>Description</th>
                                </tr>
                                <tr><td style="width:150px;">requestId*</td>
                                    <td>


                                        <div id="d2e199_unlockOrchestrationRequest_requestId">
                                            <div class="json-schema-view">
                                                <div class="primitive">
                <span class="type">
                    String
                </span>

                                                </div>
                                                <div class="inner required">
                                                    Required
                                                </div>
                                            </div>
                                        </div>
                                    </td>
                                </tr>

                                <tr><td style="width:150px;">version*</td>
                                    <td>


                                        <div id="d2e199_unlockOrchestrationRequest_version">
                                            <div class="json-schema-view">
                                                <div class="primitive">
                <span class="type">
                    String
                </span>

                                                </div>
                                                <div class="inner required">
                                                    Required
                                                </div>
                                            </div>
                                        </div>
                                    </td>
                                </tr>

                            </table>


                            <div class="methodsubtabletitle">Body parameters</div>
                            <table id="methodsubtable">
                                <tr>
                                    <th width="150px">Name</th>
                                    <th>Description</th>
                                </tr>
                                <tr><td style="width:150px;">body </td>
                                    <td>


                                        <script>
$(document).ready(function() {
  var schemaWrapper = {
  "in" : "body",
  "name" : "body",
  "required" : false,
  "schema" : {
    "type" : "string"
  }
};
  var schema = schemaWrapper.schema;
  if (schema.$ref != null) {
    schema = defsParser.$refs.get(schema.$ref);
  } else {
    schemaWrapper.definitions = Object.assign({}, defs);
    $RefParser.dereference(schemaWrapper).catch(function(err) {
      console.log(err);
    });
  }

  var view = new JSONSchemaView(schema,2,{isBodyParam: true});
  var result = $('#d2e199_unlockOrchestrationRequest_body');
  result.empty();
  result.append(view.render());
});
</script>
                                        <div id="d2e199_unlockOrchestrationRequest_body"></div>
                                    </td>
                                </tr>

                            </table>



                            <h2>Responses</h2>
                            <h3> Status: default - successful operation </h3>

                            <ul class="nav nav-tabs nav-tabs-examples" >
                            </ul>

                            <div class="tab-content" style='margin-bottom: 10px;'>
                            </div>

                        </article>
                    </div>
                    <hr>
                </section>
                <section id="api-OnapsoinfraorchestrationTasks">
                    <h1>OnapsoinfraorchestrationTasks</h1>
                    <div id="api-OnapsoinfraorchestrationTasks-abortOrchestrationTask">
                        <article id="api-OnapsoinfraorchestrationTasks-abortOrchestrationTask-0" data-group="User" data-name="abortOrchestrationTask" data-version="0">
                            <div class="pull-left">
                                <h1>abortOrchestrationTask</h1>
                                <p>abort orchestrationTask for a given taskId</p>
                            </div>
                            <div class="pull-right"></div>
                            <div class="clearfix"></div>
                            <p></p>
                            <p class="marked"></p>
                            <p></p>
                            <br />
                            <pre class="prettyprint language-html prettyprinted" data-type="post"><code><span class="pln">/onap/so/infra/orchestrationTasks/{version}/{taskId}/abort</span></code></pre>
                            <p>
                            <h3>Usage and SDK Samples</h3>
                            </p>
                            <ul class="nav nav-tabs nav-tabs-examples">
                                <li class="active"><a href="#examples-OnapsoinfraorchestrationTasks-abortOrchestrationTask-0-curl">Curl</a></li>
                                <li class=""><a href="#examples-OnapsoinfraorchestrationTasks-abortOrchestrationTask-0-java">Java</a></li>
                                <li class=""><a href="#examples-OnapsoinfraorchestrationTasks-abortOrchestrationTask-0-android">Android</a></li>
                                <!--<li class=""><a href="#examples-OnapsoinfraorchestrationTasks-abortOrchestrationTask-0-groovy">Groovy</a></li>-->
                                <li class=""><a href="#examples-OnapsoinfraorchestrationTasks-abortOrchestrationTask-0-objc">Obj-C</a></li>
                                <li class=""><a href="#examples-OnapsoinfraorchestrationTasks-abortOrchestrationTask-0-javascript">JavaScript</a></li>
                                <!--<li class=""><a href="#examples-OnapsoinfraorchestrationTasks-abortOrchestrationTask-0-angular">Angular</a></li>-->
                                <li class=""><a href="#examples-OnapsoinfraorchestrationTasks-abortOrchestrationTask-0-csharp">C#</a></li>
                                <li class=""><a href="#examples-OnapsoinfraorchestrationTasks-abortOrchestrationTask-0-php">PHP</a></li>
                                <li class=""><a href="#examples-OnapsoinfraorchestrationTasks-abortOrchestrationTask-0-perl">Perl</a></li>
                                <li class=""><a href="#examples-OnapsoinfraorchestrationTasks-abortOrchestrationTask-0-python">Python</a></li>
                            </ul>

                            <div class="tab-content">
                                <div class="tab-pane active" id="examples-OnapsoinfraorchestrationTasks-abortOrchestrationTask-0-curl">
                                    <pre class="prettyprint"><code class="language-bsh">curl -X POST "http://localhost/onap/so/infra/orchestrationTasks/{version}/{taskId}/abort"</code></pre>
                                </div>
                                <div class="tab-pane" id="examples-OnapsoinfraorchestrationTasks-abortOrchestrationTask-0-java">
                            <pre class="prettyprint"><code class="language-java">import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.OnapsoinfraorchestrationTasksApi;

import java.io.File;
import java.util.*;

public class OnapsoinfraorchestrationTasksApiExample {

    public static void main(String[] args) {

        OnapsoinfraorchestrationTasksApi apiInstance = new OnapsoinfraorchestrationTasksApi();
        String taskId = taskId_example; // String |
        String version = version_example; // String |
        String body = body_example; // String |
        try {
            apiInstance.abortOrchestrationTask(taskId, version, body);
        } catch (ApiException e) {
            System.err.println("Exception when calling OnapsoinfraorchestrationTasksApi#abortOrchestrationTask");
            e.printStackTrace();
        }
    }
}</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-OnapsoinfraorchestrationTasks-abortOrchestrationTask-0-android">
                            <pre class="prettyprint"><code class="language-java">import io.swagger.client.api.OnapsoinfraorchestrationTasksApi;

public class OnapsoinfraorchestrationTasksApiExample {

    public static void main(String[] args) {
        OnapsoinfraorchestrationTasksApi apiInstance = new OnapsoinfraorchestrationTasksApi();
        String taskId = taskId_example; // String |
        String version = version_example; // String |
        String body = body_example; // String |
        try {
            apiInstance.abortOrchestrationTask(taskId, version, body);
        } catch (ApiException e) {
            System.err.println("Exception when calling OnapsoinfraorchestrationTasksApi#abortOrchestrationTask");
            e.printStackTrace();
        }
    }
}</code></pre>
                                </div>
                                <!--
  <div class="tab-pane" id="examples-OnapsoinfraorchestrationTasks-abortOrchestrationTask-0-groovy">
  <pre class="prettyprint language-json prettyprinted" data-type="json"><code>Coming Soon!</code></pre>
  </div> -->
                                <div class="tab-pane" id="examples-OnapsoinfraorchestrationTasks-abortOrchestrationTask-0-objc">
                              <pre class="prettyprint"><code class="language-cpp">String *taskId = taskId_example; //
String *version = version_example; //
String *body = body_example; //  (optional)

OnapsoinfraorchestrationTasksApi *apiInstance = [[OnapsoinfraorchestrationTasksApi alloc] init];

// abort orchestrationTask for a given taskId
[apiInstance abortOrchestrationTaskWith:taskId
    version:version
    body:body
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-OnapsoinfraorchestrationTasks-abortOrchestrationTask-0-javascript">
                              <pre class="prettyprint"><code class="language-js">var SoGuilinApIs = require('so_guilin_ap_is');

var api = new SoGuilinApIs.OnapsoinfraorchestrationTasksApi()

var taskId = taskId_example; // {String}

var version = version_example; // {String}

var opts = {
  'body': body_example // {String}
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.abortOrchestrationTask(taskId, version, opts, callback);
</code></pre>
                                </div>

                                <!--<div class="tab-pane" id="examples-OnapsoinfraorchestrationTasks-abortOrchestrationTask-0-angular">
              <pre class="prettyprint language-json prettyprinted" data-type="json"><code>Coming Soon!</code></pre>
            </div>-->
                                <div class="tab-pane" id="examples-OnapsoinfraorchestrationTasks-abortOrchestrationTask-0-csharp">
                              <pre class="prettyprint"><code class="language-cs">using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class abortOrchestrationTaskExample
    {
        public void main()
        {

            var apiInstance = new OnapsoinfraorchestrationTasksApi();
            var taskId = taskId_example;  // String |
            var version = version_example;  // String |
            var body = body_example;  // String |  (optional)

            try
            {
                // abort orchestrationTask for a given taskId
                apiInstance.abortOrchestrationTask(taskId, version, body);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling OnapsoinfraorchestrationTasksApi.abortOrchestrationTask: " + e.Message );
            }
        }
    }
}
</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-OnapsoinfraorchestrationTasks-abortOrchestrationTask-0-php">
                              <pre class="prettyprint"><code class="language-php"><&#63;php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\OnapsoinfraorchestrationTasksApi();
$taskId = taskId_example; // String |
$version = version_example; // String |
$body = body_example; // String |

try {
    $api_instance->abortOrchestrationTask($taskId, $version, $body);
} catch (Exception $e) {
    echo 'Exception when calling OnapsoinfraorchestrationTasksApi->abortOrchestrationTask: ', $e->getMessage(), PHP_EOL;
}
?></code></pre>
                                </div>

                                <div class="tab-pane" id="examples-OnapsoinfraorchestrationTasks-abortOrchestrationTask-0-perl">
                              <pre class="prettyprint"><code class="language-perl">use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::OnapsoinfraorchestrationTasksApi;

my $api_instance = WWW::SwaggerClient::OnapsoinfraorchestrationTasksApi->new();
my $taskId = taskId_example; # String |
my $version = version_example; # String |
my $body = WWW::SwaggerClient::Object::String->new(); # String |

eval {
    $api_instance->abortOrchestrationTask(taskId => $taskId, version => $version, body => $body);
};
if ($@) {
    warn "Exception when calling OnapsoinfraorchestrationTasksApi->abortOrchestrationTask: $@\n";
}</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-OnapsoinfraorchestrationTasks-abortOrchestrationTask-0-python">
                              <pre class="prettyprint"><code class="language-python">from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.OnapsoinfraorchestrationTasksApi()
taskId = taskId_example # String |
version = version_example # String |
body = body_example # String |  (optional)

try:
    # abort orchestrationTask for a given taskId
    api_instance.abort_orchestration_task(taskId, version, body=body)
except ApiException as e:
    print("Exception when calling OnapsoinfraorchestrationTasksApi->abortOrchestrationTask: %s\n" % e)</code></pre>
                                </div>
                            </div>

                            <h2>Parameters</h2>

                            <div class="methodsubtabletitle">Path parameters</div>
                            <table id="methodsubtable">
                                <tr>
                                    <th width="150px">Name</th>
                                    <th>Description</th>
                                </tr>
                                <tr><td style="width:150px;">taskId*</td>
                                    <td>


                                        <div id="d2e199_abortOrchestrationTask_taskId">
                                            <div class="json-schema-view">
                                                <div class="primitive">
                <span class="type">
                    String
                </span>

                                                </div>
                                                <div class="inner required">
                                                    Required
                                                </div>
                                            </div>
                                        </div>
                                    </td>
                                </tr>

                                <tr><td style="width:150px;">version*</td>
                                    <td>


                                        <div id="d2e199_abortOrchestrationTask_version">
                                            <div class="json-schema-view">
                                                <div class="primitive">
                <span class="type">
                    String
                </span>

                                                </div>
                                                <div class="inner required">
                                                    Required
                                                </div>
                                            </div>
                                        </div>
                                    </td>
                                </tr>

                            </table>


                            <div class="methodsubtabletitle">Body parameters</div>
                            <table id="methodsubtable">
                                <tr>
                                    <th width="150px">Name</th>
                                    <th>Description</th>
                                </tr>
                                <tr><td style="width:150px;">body </td>
                                    <td>


                                        <script>
$(document).ready(function() {
  var schemaWrapper = {
  "in" : "body",
  "name" : "body",
  "required" : false,
  "schema" : {
    "type" : "string"
  }
};
  var schema = schemaWrapper.schema;
  if (schema.$ref != null) {
    schema = defsParser.$refs.get(schema.$ref);
  } else {
    schemaWrapper.definitions = Object.assign({}, defs);
    $RefParser.dereference(schemaWrapper).catch(function(err) {
      console.log(err);
    });
  }

  var view = new JSONSchemaView(schema,2,{isBodyParam: true});
  var result = $('#d2e199_abortOrchestrationTask_body');
  result.empty();
  result.append(view.render());
});
</script>
                                        <div id="d2e199_abortOrchestrationTask_body"></div>
                                    </td>
                                </tr>

                            </table>



                            <h2>Responses</h2>
                            <h3> Status: default - successful operation </h3>

                            <ul class="nav nav-tabs nav-tabs-examples" >
                            </ul>

                            <div class="tab-content" style='margin-bottom: 10px;'>
                            </div>

                        </article>
                    </div>
                    <hr>
                    <div id="api-OnapsoinfraorchestrationTasks-commitOrchestrationTask">
                        <article id="api-OnapsoinfraorchestrationTasks-commitOrchestrationTask-0" data-group="User" data-name="commitOrchestrationTask" data-version="0">
                            <div class="pull-left">
                                <h1>commitOrchestrationTask</h1>
                                <p>commit orchestrationTask for a given taskId</p>
                            </div>
                            <div class="pull-right"></div>
                            <div class="clearfix"></div>
                            <p></p>
                            <p class="marked"></p>
                            <p></p>
                            <br />
                            <pre class="prettyprint language-html prettyprinted" data-type="post"><code><span class="pln">/onap/so/infra/orchestrationTasks/{version}/{taskId}/commit</span></code></pre>
                            <p>
                            <h3>Usage and SDK Samples</h3>
                            </p>
                            <ul class="nav nav-tabs nav-tabs-examples">
                                <li class="active"><a href="#examples-OnapsoinfraorchestrationTasks-commitOrchestrationTask-0-curl">Curl</a></li>
                                <li class=""><a href="#examples-OnapsoinfraorchestrationTasks-commitOrchestrationTask-0-java">Java</a></li>
                                <li class=""><a href="#examples-OnapsoinfraorchestrationTasks-commitOrchestrationTask-0-android">Android</a></li>
                                <!--<li class=""><a href="#examples-OnapsoinfraorchestrationTasks-commitOrchestrationTask-0-groovy">Groovy</a></li>-->
                                <li class=""><a href="#examples-OnapsoinfraorchestrationTasks-commitOrchestrationTask-0-objc">Obj-C</a></li>
                                <li class=""><a href="#examples-OnapsoinfraorchestrationTasks-commitOrchestrationTask-0-javascript">JavaScript</a></li>
                                <!--<li class=""><a href="#examples-OnapsoinfraorchestrationTasks-commitOrchestrationTask-0-angular">Angular</a></li>-->
                                <li class=""><a href="#examples-OnapsoinfraorchestrationTasks-commitOrchestrationTask-0-csharp">C#</a></li>
                                <li class=""><a href="#examples-OnapsoinfraorchestrationTasks-commitOrchestrationTask-0-php">PHP</a></li>
                                <li class=""><a href="#examples-OnapsoinfraorchestrationTasks-commitOrchestrationTask-0-perl">Perl</a></li>
                                <li class=""><a href="#examples-OnapsoinfraorchestrationTasks-commitOrchestrationTask-0-python">Python</a></li>
                            </ul>

                            <div class="tab-content">
                                <div class="tab-pane active" id="examples-OnapsoinfraorchestrationTasks-commitOrchestrationTask-0-curl">
                                    <pre class="prettyprint"><code class="language-bsh">curl -X POST "http://localhost/onap/so/infra/orchestrationTasks/{version}/{taskId}/commit"</code></pre>
                                </div>
                                <div class="tab-pane" id="examples-OnapsoinfraorchestrationTasks-commitOrchestrationTask-0-java">
                            <pre class="prettyprint"><code class="language-java">import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.OnapsoinfraorchestrationTasksApi;

import java.io.File;
import java.util.*;

public class OnapsoinfraorchestrationTasksApiExample {

    public static void main(String[] args) {

        OnapsoinfraorchestrationTasksApi apiInstance = new OnapsoinfraorchestrationTasksApi();
        String taskId = taskId_example; // String |
        String version = version_example; // String |
        String body = body_example; // String |
        try {
            apiInstance.commitOrchestrationTask(taskId, version, body);
        } catch (ApiException e) {
            System.err.println("Exception when calling OnapsoinfraorchestrationTasksApi#commitOrchestrationTask");
            e.printStackTrace();
        }
    }
}</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-OnapsoinfraorchestrationTasks-commitOrchestrationTask-0-android">
                            <pre class="prettyprint"><code class="language-java">import io.swagger.client.api.OnapsoinfraorchestrationTasksApi;

public class OnapsoinfraorchestrationTasksApiExample {

    public static void main(String[] args) {
        OnapsoinfraorchestrationTasksApi apiInstance = new OnapsoinfraorchestrationTasksApi();
        String taskId = taskId_example; // String |
        String version = version_example; // String |
        String body = body_example; // String |
        try {
            apiInstance.commitOrchestrationTask(taskId, version, body);
        } catch (ApiException e) {
            System.err.println("Exception when calling OnapsoinfraorchestrationTasksApi#commitOrchestrationTask");
            e.printStackTrace();
        }
    }
}</code></pre>
                                </div>
                                <!--
  <div class="tab-pane" id="examples-OnapsoinfraorchestrationTasks-commitOrchestrationTask-0-groovy">
  <pre class="prettyprint language-json prettyprinted" data-type="json"><code>Coming Soon!</code></pre>
  </div> -->
                                <div class="tab-pane" id="examples-OnapsoinfraorchestrationTasks-commitOrchestrationTask-0-objc">
                              <pre class="prettyprint"><code class="language-cpp">String *taskId = taskId_example; //
String *version = version_example; //
String *body = body_example; //  (optional)

OnapsoinfraorchestrationTasksApi *apiInstance = [[OnapsoinfraorchestrationTasksApi alloc] init];

// commit orchestrationTask for a given taskId
[apiInstance commitOrchestrationTaskWith:taskId
    version:version
    body:body
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-OnapsoinfraorchestrationTasks-commitOrchestrationTask-0-javascript">
                              <pre class="prettyprint"><code class="language-js">var SoGuilinApIs = require('so_guilin_ap_is');

var api = new SoGuilinApIs.OnapsoinfraorchestrationTasksApi()

var taskId = taskId_example; // {String}

var version = version_example; // {String}

var opts = {
  'body': body_example // {String}
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.commitOrchestrationTask(taskId, version, opts, callback);
</code></pre>
                                </div>

                                <!--<div class="tab-pane" id="examples-OnapsoinfraorchestrationTasks-commitOrchestrationTask-0-angular">
              <pre class="prettyprint language-json prettyprinted" data-type="json"><code>Coming Soon!</code></pre>
            </div>-->
                                <div class="tab-pane" id="examples-OnapsoinfraorchestrationTasks-commitOrchestrationTask-0-csharp">
                              <pre class="prettyprint"><code class="language-cs">using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class commitOrchestrationTaskExample
    {
        public void main()
        {

            var apiInstance = new OnapsoinfraorchestrationTasksApi();
            var taskId = taskId_example;  // String |
            var version = version_example;  // String |
            var body = body_example;  // String |  (optional)

            try
            {
                // commit orchestrationTask for a given taskId
                apiInstance.commitOrchestrationTask(taskId, version, body);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling OnapsoinfraorchestrationTasksApi.commitOrchestrationTask: " + e.Message );
            }
        }
    }
}
</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-OnapsoinfraorchestrationTasks-commitOrchestrationTask-0-php">
                              <pre class="prettyprint"><code class="language-php"><&#63;php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\OnapsoinfraorchestrationTasksApi();
$taskId = taskId_example; // String |
$version = version_example; // String |
$body = body_example; // String |

try {
    $api_instance->commitOrchestrationTask($taskId, $version, $body);
} catch (Exception $e) {
    echo 'Exception when calling OnapsoinfraorchestrationTasksApi->commitOrchestrationTask: ', $e->getMessage(), PHP_EOL;
}
?></code></pre>
                                </div>

                                <div class="tab-pane" id="examples-OnapsoinfraorchestrationTasks-commitOrchestrationTask-0-perl">
                              <pre class="prettyprint"><code class="language-perl">use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::OnapsoinfraorchestrationTasksApi;

my $api_instance = WWW::SwaggerClient::OnapsoinfraorchestrationTasksApi->new();
my $taskId = taskId_example; # String |
my $version = version_example; # String |
my $body = WWW::SwaggerClient::Object::String->new(); # String |

eval {
    $api_instance->commitOrchestrationTask(taskId => $taskId, version => $version, body => $body);
};
if ($@) {
    warn "Exception when calling OnapsoinfraorchestrationTasksApi->commitOrchestrationTask: $@\n";
}</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-OnapsoinfraorchestrationTasks-commitOrchestrationTask-0-python">
                              <pre class="prettyprint"><code class="language-python">from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.OnapsoinfraorchestrationTasksApi()
taskId = taskId_example # String |
version = version_example # String |
body = body_example # String |  (optional)

try:
    # commit orchestrationTask for a given taskId
    api_instance.commit_orchestration_task(taskId, version, body=body)
except ApiException as e:
    print("Exception when calling OnapsoinfraorchestrationTasksApi->commitOrchestrationTask: %s\n" % e)</code></pre>
                                </div>
                            </div>

                            <h2>Parameters</h2>

                            <div class="methodsubtabletitle">Path parameters</div>
                            <table id="methodsubtable">
                                <tr>
                                    <th width="150px">Name</th>
                                    <th>Description</th>
                                </tr>
                                <tr><td style="width:150px;">taskId*</td>
                                    <td>


                                        <div id="d2e199_commitOrchestrationTask_taskId">
                                            <div class="json-schema-view">
                                                <div class="primitive">
                <span class="type">
                    String
                </span>

                                                </div>
                                                <div class="inner required">
                                                    Required
                                                </div>
                                            </div>
                                        </div>
                                    </td>
                                </tr>

                                <tr><td style="width:150px;">version*</td>
                                    <td>


                                        <div id="d2e199_commitOrchestrationTask_version">
                                            <div class="json-schema-view">
                                                <div class="primitive">
                <span class="type">
                    String
                </span>

                                                </div>
                                                <div class="inner required">
                                                    Required
                                                </div>
                                            </div>
                                        </div>
                                    </td>
                                </tr>

                            </table>


                            <div class="methodsubtabletitle">Body parameters</div>
                            <table id="methodsubtable">
                                <tr>
                                    <th width="150px">Name</th>
                                    <th>Description</th>
                                </tr>
                                <tr><td style="width:150px;">body </td>
                                    <td>


                                        <script>
$(document).ready(function() {
  var schemaWrapper = {
  "in" : "body",
  "name" : "body",
  "required" : false,
  "schema" : {
    "type" : "string"
  }
};
  var schema = schemaWrapper.schema;
  if (schema.$ref != null) {
    schema = defsParser.$refs.get(schema.$ref);
  } else {
    schemaWrapper.definitions = Object.assign({}, defs);
    $RefParser.dereference(schemaWrapper).catch(function(err) {
      console.log(err);
    });
  }

  var view = new JSONSchemaView(schema,2,{isBodyParam: true});
  var result = $('#d2e199_commitOrchestrationTask_body');
  result.empty();
  result.append(view.render());
});
</script>
                                        <div id="d2e199_commitOrchestrationTask_body"></div>
                                    </td>
                                </tr>

                            </table>



                            <h2>Responses</h2>
                            <h3> Status: default - successful operation </h3>

                            <ul class="nav nav-tabs nav-tabs-examples" >
                            </ul>

                            <div class="tab-content" style='margin-bottom: 10px;'>
                            </div>

                        </article>
                    </div>
                    <hr>
                    <div id="api-OnapsoinfraorchestrationTasks-createOrchestrationTask">
                        <article id="api-OnapsoinfraorchestrationTasks-createOrchestrationTask-0" data-group="User" data-name="createOrchestrationTask" data-version="0">
                            <div class="pull-left">
                                <h1>createOrchestrationTask</h1>
                                <p>Create an orchestrationTask</p>
                            </div>
                            <div class="pull-right"></div>
                            <div class="clearfix"></div>
                            <p></p>
                            <p class="marked"></p>
                            <p></p>
                            <br />
                            <pre class="prettyprint language-html prettyprinted" data-type="post"><code><span class="pln">/onap/so/infra/orchestrationTasks/{version}</span></code></pre>
                            <p>
                            <h3>Usage and SDK Samples</h3>
                            </p>
                            <ul class="nav nav-tabs nav-tabs-examples">
                                <li class="active"><a href="#examples-OnapsoinfraorchestrationTasks-createOrchestrationTask-0-curl">Curl</a></li>
                                <li class=""><a href="#examples-OnapsoinfraorchestrationTasks-createOrchestrationTask-0-java">Java</a></li>
                                <li class=""><a href="#examples-OnapsoinfraorchestrationTasks-createOrchestrationTask-0-android">Android</a></li>
                                <!--<li class=""><a href="#examples-OnapsoinfraorchestrationTasks-createOrchestrationTask-0-groovy">Groovy</a></li>-->
                                <li class=""><a href="#examples-OnapsoinfraorchestrationTasks-createOrchestrationTask-0-objc">Obj-C</a></li>
                                <li class=""><a href="#examples-OnapsoinfraorchestrationTasks-createOrchestrationTask-0-javascript">JavaScript</a></li>
                                <!--<li class=""><a href="#examples-OnapsoinfraorchestrationTasks-createOrchestrationTask-0-angular">Angular</a></li>-->
                                <li class=""><a href="#examples-OnapsoinfraorchestrationTasks-createOrchestrationTask-0-csharp">C#</a></li>
                                <li class=""><a href="#examples-OnapsoinfraorchestrationTasks-createOrchestrationTask-0-php">PHP</a></li>
                                <li class=""><a href="#examples-OnapsoinfraorchestrationTasks-createOrchestrationTask-0-perl">Perl</a></li>
                                <li class=""><a href="#examples-OnapsoinfraorchestrationTasks-createOrchestrationTask-0-python">Python</a></li>
                            </ul>

                            <div class="tab-content">
                                <div class="tab-pane active" id="examples-OnapsoinfraorchestrationTasks-createOrchestrationTask-0-curl">
                                    <pre class="prettyprint"><code class="language-bsh">curl -X POST "http://localhost/onap/so/infra/orchestrationTasks/{version}"</code></pre>
                                </div>
                                <div class="tab-pane" id="examples-OnapsoinfraorchestrationTasks-createOrchestrationTask-0-java">
                            <pre class="prettyprint"><code class="language-java">import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.OnapsoinfraorchestrationTasksApi;

import java.io.File;
import java.util.*;

public class OnapsoinfraorchestrationTasksApiExample {

    public static void main(String[] args) {

        OnapsoinfraorchestrationTasksApi apiInstance = new OnapsoinfraorchestrationTasksApi();
        String version = version_example; // String |
        String body = body_example; // String |
        try {
            apiInstance.createOrchestrationTask(version, body);
        } catch (ApiException e) {
            System.err.println("Exception when calling OnapsoinfraorchestrationTasksApi#createOrchestrationTask");
            e.printStackTrace();
        }
    }
}</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-OnapsoinfraorchestrationTasks-createOrchestrationTask-0-android">
                            <pre class="prettyprint"><code class="language-java">import io.swagger.client.api.OnapsoinfraorchestrationTasksApi;

public class OnapsoinfraorchestrationTasksApiExample {

    public static void main(String[] args) {
        OnapsoinfraorchestrationTasksApi apiInstance = new OnapsoinfraorchestrationTasksApi();
        String version = version_example; // String |
        String body = body_example; // String |
        try {
            apiInstance.createOrchestrationTask(version, body);
        } catch (ApiException e) {
            System.err.println("Exception when calling OnapsoinfraorchestrationTasksApi#createOrchestrationTask");
            e.printStackTrace();
        }
    }
}</code></pre>
                                </div>
                                <!--
  <div class="tab-pane" id="examples-OnapsoinfraorchestrationTasks-createOrchestrationTask-0-groovy">
  <pre class="prettyprint language-json prettyprinted" data-type="json"><code>Coming Soon!</code></pre>
  </div> -->
                                <div class="tab-pane" id="examples-OnapsoinfraorchestrationTasks-createOrchestrationTask-0-objc">
                              <pre class="prettyprint"><code class="language-cpp">String *version = version_example; //
String *body = body_example; //  (optional)

OnapsoinfraorchestrationTasksApi *apiInstance = [[OnapsoinfraorchestrationTasksApi alloc] init];

// Create an orchestrationTask
[apiInstance createOrchestrationTaskWith:version
    body:body
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-OnapsoinfraorchestrationTasks-createOrchestrationTask-0-javascript">
                              <pre class="prettyprint"><code class="language-js">var SoGuilinApIs = require('so_guilin_ap_is');

var api = new SoGuilinApIs.OnapsoinfraorchestrationTasksApi()

var version = version_example; // {String}

var opts = {
  'body': body_example // {String}
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.createOrchestrationTask(version, opts, callback);
</code></pre>
                                </div>

                                <!--<div class="tab-pane" id="examples-OnapsoinfraorchestrationTasks-createOrchestrationTask-0-angular">
              <pre class="prettyprint language-json prettyprinted" data-type="json"><code>Coming Soon!</code></pre>
            </div>-->
                                <div class="tab-pane" id="examples-OnapsoinfraorchestrationTasks-createOrchestrationTask-0-csharp">
                              <pre class="prettyprint"><code class="language-cs">using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class createOrchestrationTaskExample
    {
        public void main()
        {

            var apiInstance = new OnapsoinfraorchestrationTasksApi();
            var version = version_example;  // String |
            var body = body_example;  // String |  (optional)

            try
            {
                // Create an orchestrationTask
                apiInstance.createOrchestrationTask(version, body);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling OnapsoinfraorchestrationTasksApi.createOrchestrationTask: " + e.Message );
            }
        }
    }
}
</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-OnapsoinfraorchestrationTasks-createOrchestrationTask-0-php">
                              <pre class="prettyprint"><code class="language-php"><&#63;php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\OnapsoinfraorchestrationTasksApi();
$version = version_example; // String |
$body = body_example; // String |

try {
    $api_instance->createOrchestrationTask($version, $body);
} catch (Exception $e) {
    echo 'Exception when calling OnapsoinfraorchestrationTasksApi->createOrchestrationTask: ', $e->getMessage(), PHP_EOL;
}
?></code></pre>
                                </div>

                                <div class="tab-pane" id="examples-OnapsoinfraorchestrationTasks-createOrchestrationTask-0-perl">
                              <pre class="prettyprint"><code class="language-perl">use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::OnapsoinfraorchestrationTasksApi;

my $api_instance = WWW::SwaggerClient::OnapsoinfraorchestrationTasksApi->new();
my $version = version_example; # String |
my $body = WWW::SwaggerClient::Object::String->new(); # String |

eval {
    $api_instance->createOrchestrationTask(version => $version, body => $body);
};
if ($@) {
    warn "Exception when calling OnapsoinfraorchestrationTasksApi->createOrchestrationTask: $@\n";
}</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-OnapsoinfraorchestrationTasks-createOrchestrationTask-0-python">
                              <pre class="prettyprint"><code class="language-python">from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.OnapsoinfraorchestrationTasksApi()
version = version_example # String |
body = body_example # String |  (optional)

try:
    # Create an orchestrationTask
    api_instance.create_orchestration_task(version, body=body)
except ApiException as e:
    print("Exception when calling OnapsoinfraorchestrationTasksApi->createOrchestrationTask: %s\n" % e)</code></pre>
                                </div>
                            </div>

                            <h2>Parameters</h2>

                            <div class="methodsubtabletitle">Path parameters</div>
                            <table id="methodsubtable">
                                <tr>
                                    <th width="150px">Name</th>
                                    <th>Description</th>
                                </tr>
                                <tr><td style="width:150px;">version*</td>
                                    <td>


                                        <div id="d2e199_createOrchestrationTask_version">
                                            <div class="json-schema-view">
                                                <div class="primitive">
                <span class="type">
                    String
                </span>

                                                </div>
                                                <div class="inner required">
                                                    Required
                                                </div>
                                            </div>
                                        </div>
                                    </td>
                                </tr>

                            </table>


                            <div class="methodsubtabletitle">Body parameters</div>
                            <table id="methodsubtable">
                                <tr>
                                    <th width="150px">Name</th>
                                    <th>Description</th>
                                </tr>
                                <tr><td style="width:150px;">body </td>
                                    <td>


                                        <script>
$(document).ready(function() {
  var schemaWrapper = {
  "in" : "body",
  "name" : "body",
  "required" : false,
  "schema" : {
    "type" : "string"
  }
};
  var schema = schemaWrapper.schema;
  if (schema.$ref != null) {
    schema = defsParser.$refs.get(schema.$ref);
  } else {
    schemaWrapper.definitions = Object.assign({}, defs);
    $RefParser.dereference(schemaWrapper).catch(function(err) {
      console.log(err);
    });
  }

  var view = new JSONSchemaView(schema,2,{isBodyParam: true});
  var result = $('#d2e199_createOrchestrationTask_body');
  result.empty();
  result.append(view.render());
});
</script>
                                        <div id="d2e199_createOrchestrationTask_body"></div>
                                    </td>
                                </tr>

                            </table>



                            <h2>Responses</h2>
                            <h3> Status: default - successful operation </h3>

                            <ul class="nav nav-tabs nav-tabs-examples" >
                            </ul>

                            <div class="tab-content" style='margin-bottom: 10px;'>
                            </div>

                        </article>
                    </div>
                    <hr>
                    <div id="api-OnapsoinfraorchestrationTasks-deleteOrchestrationTask">
                        <article id="api-OnapsoinfraorchestrationTasks-deleteOrchestrationTask-0" data-group="User" data-name="deleteOrchestrationTask" data-version="0">
                            <div class="pull-left">
                                <h1>deleteOrchestrationTask</h1>
                                <p>delete orchestrationTask for a given taskId</p>
                            </div>
                            <div class="pull-right"></div>
                            <div class="clearfix"></div>
                            <p></p>
                            <p class="marked"></p>
                            <p></p>
                            <br />
                            <pre class="prettyprint language-html prettyprinted" data-type="delete"><code><span class="pln">/onap/so/infra/orchestrationTasks/{version}/{taskId}</span></code></pre>
                            <p>
                            <h3>Usage and SDK Samples</h3>
                            </p>
                            <ul class="nav nav-tabs nav-tabs-examples">
                                <li class="active"><a href="#examples-OnapsoinfraorchestrationTasks-deleteOrchestrationTask-0-curl">Curl</a></li>
                                <li class=""><a href="#examples-OnapsoinfraorchestrationTasks-deleteOrchestrationTask-0-java">Java</a></li>
                                <li class=""><a href="#examples-OnapsoinfraorchestrationTasks-deleteOrchestrationTask-0-android">Android</a></li>
                                <!--<li class=""><a href="#examples-OnapsoinfraorchestrationTasks-deleteOrchestrationTask-0-groovy">Groovy</a></li>-->
                                <li class=""><a href="#examples-OnapsoinfraorchestrationTasks-deleteOrchestrationTask-0-objc">Obj-C</a></li>
                                <li class=""><a href="#examples-OnapsoinfraorchestrationTasks-deleteOrchestrationTask-0-javascript">JavaScript</a></li>
                                <!--<li class=""><a href="#examples-OnapsoinfraorchestrationTasks-deleteOrchestrationTask-0-angular">Angular</a></li>-->
                                <li class=""><a href="#examples-OnapsoinfraorchestrationTasks-deleteOrchestrationTask-0-csharp">C#</a></li>
                                <li class=""><a href="#examples-OnapsoinfraorchestrationTasks-deleteOrchestrationTask-0-php">PHP</a></li>
                                <li class=""><a href="#examples-OnapsoinfraorchestrationTasks-deleteOrchestrationTask-0-perl">Perl</a></li>
                                <li class=""><a href="#examples-OnapsoinfraorchestrationTasks-deleteOrchestrationTask-0-python">Python</a></li>
                            </ul>

                            <div class="tab-content">
                                <div class="tab-pane active" id="examples-OnapsoinfraorchestrationTasks-deleteOrchestrationTask-0-curl">
                                    <pre class="prettyprint"><code class="language-bsh">curl -X DELETE "http://localhost/onap/so/infra/orchestrationTasks/{version}/{taskId}"</code></pre>
                                </div>
                                <div class="tab-pane" id="examples-OnapsoinfraorchestrationTasks-deleteOrchestrationTask-0-java">
                            <pre class="prettyprint"><code class="language-java">import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.OnapsoinfraorchestrationTasksApi;

import java.io.File;
import java.util.*;

public class OnapsoinfraorchestrationTasksApiExample {

    public static void main(String[] args) {

        OnapsoinfraorchestrationTasksApi apiInstance = new OnapsoinfraorchestrationTasksApi();
        String taskId = taskId_example; // String |
        String version = version_example; // String |
        try {
            apiInstance.deleteOrchestrationTask(taskId, version);
        } catch (ApiException e) {
            System.err.println("Exception when calling OnapsoinfraorchestrationTasksApi#deleteOrchestrationTask");
            e.printStackTrace();
        }
    }
}</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-OnapsoinfraorchestrationTasks-deleteOrchestrationTask-0-android">
                            <pre class="prettyprint"><code class="language-java">import io.swagger.client.api.OnapsoinfraorchestrationTasksApi;

public class OnapsoinfraorchestrationTasksApiExample {

    public static void main(String[] args) {
        OnapsoinfraorchestrationTasksApi apiInstance = new OnapsoinfraorchestrationTasksApi();
        String taskId = taskId_example; // String |
        String version = version_example; // String |
        try {
            apiInstance.deleteOrchestrationTask(taskId, version);
        } catch (ApiException e) {
            System.err.println("Exception when calling OnapsoinfraorchestrationTasksApi#deleteOrchestrationTask");
            e.printStackTrace();
        }
    }
}</code></pre>
                                </div>
                                <!--
  <div class="tab-pane" id="examples-OnapsoinfraorchestrationTasks-deleteOrchestrationTask-0-groovy">
  <pre class="prettyprint language-json prettyprinted" data-type="json"><code>Coming Soon!</code></pre>
  </div> -->
                                <div class="tab-pane" id="examples-OnapsoinfraorchestrationTasks-deleteOrchestrationTask-0-objc">
                              <pre class="prettyprint"><code class="language-cpp">String *taskId = taskId_example; //
String *version = version_example; //

OnapsoinfraorchestrationTasksApi *apiInstance = [[OnapsoinfraorchestrationTasksApi alloc] init];

// delete orchestrationTask for a given taskId
[apiInstance deleteOrchestrationTaskWith:taskId
    version:version
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-OnapsoinfraorchestrationTasks-deleteOrchestrationTask-0-javascript">
                              <pre class="prettyprint"><code class="language-js">var SoGuilinApIs = require('so_guilin_ap_is');

var api = new SoGuilinApIs.OnapsoinfraorchestrationTasksApi()

var taskId = taskId_example; // {String}

var version = version_example; // {String}


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.deleteOrchestrationTask(taskId, version, callback);
</code></pre>
                                </div>

                                <!--<div class="tab-pane" id="examples-OnapsoinfraorchestrationTasks-deleteOrchestrationTask-0-angular">
              <pre class="prettyprint language-json prettyprinted" data-type="json"><code>Coming Soon!</code></pre>
            </div>-->
                                <div class="tab-pane" id="examples-OnapsoinfraorchestrationTasks-deleteOrchestrationTask-0-csharp">
                              <pre class="prettyprint"><code class="language-cs">using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class deleteOrchestrationTaskExample
    {
        public void main()
        {

            var apiInstance = new OnapsoinfraorchestrationTasksApi();
            var taskId = taskId_example;  // String |
            var version = version_example;  // String |

            try
            {
                // delete orchestrationTask for a given taskId
                apiInstance.deleteOrchestrationTask(taskId, version);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling OnapsoinfraorchestrationTasksApi.deleteOrchestrationTask: " + e.Message );
            }
        }
    }
}
</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-OnapsoinfraorchestrationTasks-deleteOrchestrationTask-0-php">
                              <pre class="prettyprint"><code class="language-php"><&#63;php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\OnapsoinfraorchestrationTasksApi();
$taskId = taskId_example; // String |
$version = version_example; // String |

try {
    $api_instance->deleteOrchestrationTask($taskId, $version);
} catch (Exception $e) {
    echo 'Exception when calling OnapsoinfraorchestrationTasksApi->deleteOrchestrationTask: ', $e->getMessage(), PHP_EOL;
}
?></code></pre>
                                </div>

                                <div class="tab-pane" id="examples-OnapsoinfraorchestrationTasks-deleteOrchestrationTask-0-perl">
                              <pre class="prettyprint"><code class="language-perl">use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::OnapsoinfraorchestrationTasksApi;

my $api_instance = WWW::SwaggerClient::OnapsoinfraorchestrationTasksApi->new();
my $taskId = taskId_example; # String |
my $version = version_example; # String |

eval {
    $api_instance->deleteOrchestrationTask(taskId => $taskId, version => $version);
};
if ($@) {
    warn "Exception when calling OnapsoinfraorchestrationTasksApi->deleteOrchestrationTask: $@\n";
}</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-OnapsoinfraorchestrationTasks-deleteOrchestrationTask-0-python">
                              <pre class="prettyprint"><code class="language-python">from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.OnapsoinfraorchestrationTasksApi()
taskId = taskId_example # String |
version = version_example # String |

try:
    # delete orchestrationTask for a given taskId
    api_instance.delete_orchestration_task(taskId, version)
except ApiException as e:
    print("Exception when calling OnapsoinfraorchestrationTasksApi->deleteOrchestrationTask: %s\n" % e)</code></pre>
                                </div>
                            </div>

                            <h2>Parameters</h2>

                            <div class="methodsubtabletitle">Path parameters</div>
                            <table id="methodsubtable">
                                <tr>
                                    <th width="150px">Name</th>
                                    <th>Description</th>
                                </tr>
                                <tr><td style="width:150px;">taskId*</td>
                                    <td>


                                        <div id="d2e199_deleteOrchestrationTask_taskId">
                                            <div class="json-schema-view">
                                                <div class="primitive">
                <span class="type">
                    String
                </span>

                                                </div>
                                                <div class="inner required">
                                                    Required
                                                </div>
                                            </div>
                                        </div>
                                    </td>
                                </tr>

                                <tr><td style="width:150px;">version*</td>
                                    <td>


                                        <div id="d2e199_deleteOrchestrationTask_version">
                                            <div class="json-schema-view">
                                                <div class="primitive">
                <span class="type">
                    String
                </span>

                                                </div>
                                                <div class="inner required">
                                                    Required
                                                </div>
                                            </div>
                                        </div>
                                    </td>
                                </tr>

                            </table>





                            <h2>Responses</h2>
                            <h3> Status: default - successful operation </h3>

                            <ul class="nav nav-tabs nav-tabs-examples" >
                            </ul>

                            <div class="tab-content" style='margin-bottom: 10px;'>
                            </div>

                        </article>
                    </div>
                    <hr>
                    <div id="api-OnapsoinfraorchestrationTasks-getAllOrchestrationTasks">
                        <article id="api-OnapsoinfraorchestrationTasks-getAllOrchestrationTasks-0" data-group="User" data-name="getAllOrchestrationTasks" data-version="0">
                            <div class="pull-left">
                                <h1>getAllOrchestrationTasks</h1>
                                <p>Get all orchestrationTasks</p>
                            </div>
                            <div class="pull-right"></div>
                            <div class="clearfix"></div>
                            <p></p>
                            <p class="marked"></p>
                            <p></p>
                            <br />
                            <pre class="prettyprint language-html prettyprinted" data-type="get"><code><span class="pln">/onap/so/infra/orchestrationTasks/{version}</span></code></pre>
                            <p>
                            <h3>Usage and SDK Samples</h3>
                            </p>
                            <ul class="nav nav-tabs nav-tabs-examples">
                                <li class="active"><a href="#examples-OnapsoinfraorchestrationTasks-getAllOrchestrationTasks-0-curl">Curl</a></li>
                                <li class=""><a href="#examples-OnapsoinfraorchestrationTasks-getAllOrchestrationTasks-0-java">Java</a></li>
                                <li class=""><a href="#examples-OnapsoinfraorchestrationTasks-getAllOrchestrationTasks-0-android">Android</a></li>
                                <!--<li class=""><a href="#examples-OnapsoinfraorchestrationTasks-getAllOrchestrationTasks-0-groovy">Groovy</a></li>-->
                                <li class=""><a href="#examples-OnapsoinfraorchestrationTasks-getAllOrchestrationTasks-0-objc">Obj-C</a></li>
                                <li class=""><a href="#examples-OnapsoinfraorchestrationTasks-getAllOrchestrationTasks-0-javascript">JavaScript</a></li>
                                <!--<li class=""><a href="#examples-OnapsoinfraorchestrationTasks-getAllOrchestrationTasks-0-angular">Angular</a></li>-->
                                <li class=""><a href="#examples-OnapsoinfraorchestrationTasks-getAllOrchestrationTasks-0-csharp">C#</a></li>
                                <li class=""><a href="#examples-OnapsoinfraorchestrationTasks-getAllOrchestrationTasks-0-php">PHP</a></li>
                                <li class=""><a href="#examples-OnapsoinfraorchestrationTasks-getAllOrchestrationTasks-0-perl">Perl</a></li>
                                <li class=""><a href="#examples-OnapsoinfraorchestrationTasks-getAllOrchestrationTasks-0-python">Python</a></li>
                            </ul>

                            <div class="tab-content">
                                <div class="tab-pane active" id="examples-OnapsoinfraorchestrationTasks-getAllOrchestrationTasks-0-curl">
                                    <pre class="prettyprint"><code class="language-bsh">curl -X GET "http://localhost/onap/so/infra/orchestrationTasks/{version}"</code></pre>
                                </div>
                                <div class="tab-pane" id="examples-OnapsoinfraorchestrationTasks-getAllOrchestrationTasks-0-java">
                            <pre class="prettyprint"><code class="language-java">import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.OnapsoinfraorchestrationTasksApi;

import java.io.File;
import java.util.*;

public class OnapsoinfraorchestrationTasksApiExample {

    public static void main(String[] args) {

        OnapsoinfraorchestrationTasksApi apiInstance = new OnapsoinfraorchestrationTasksApi();
        String version = version_example; // String |
        try {
            apiInstance.getAllOrchestrationTasks(version);
        } catch (ApiException e) {
            System.err.println("Exception when calling OnapsoinfraorchestrationTasksApi#getAllOrchestrationTasks");
            e.printStackTrace();
        }
    }
}</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-OnapsoinfraorchestrationTasks-getAllOrchestrationTasks-0-android">
                            <pre class="prettyprint"><code class="language-java">import io.swagger.client.api.OnapsoinfraorchestrationTasksApi;

public class OnapsoinfraorchestrationTasksApiExample {

    public static void main(String[] args) {
        OnapsoinfraorchestrationTasksApi apiInstance = new OnapsoinfraorchestrationTasksApi();
        String version = version_example; // String |
        try {
            apiInstance.getAllOrchestrationTasks(version);
        } catch (ApiException e) {
            System.err.println("Exception when calling OnapsoinfraorchestrationTasksApi#getAllOrchestrationTasks");
            e.printStackTrace();
        }
    }
}</code></pre>
                                </div>
                                <!--
  <div class="tab-pane" id="examples-OnapsoinfraorchestrationTasks-getAllOrchestrationTasks-0-groovy">
  <pre class="prettyprint language-json prettyprinted" data-type="json"><code>Coming Soon!</code></pre>
  </div> -->
                                <div class="tab-pane" id="examples-OnapsoinfraorchestrationTasks-getAllOrchestrationTasks-0-objc">
                              <pre class="prettyprint"><code class="language-cpp">String *version = version_example; //

OnapsoinfraorchestrationTasksApi *apiInstance = [[OnapsoinfraorchestrationTasksApi alloc] init];

// Get all orchestrationTasks
[apiInstance getAllOrchestrationTasksWith:version
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-OnapsoinfraorchestrationTasks-getAllOrchestrationTasks-0-javascript">
                              <pre class="prettyprint"><code class="language-js">var SoGuilinApIs = require('so_guilin_ap_is');

var api = new SoGuilinApIs.OnapsoinfraorchestrationTasksApi()

var version = version_example; // {String}


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.getAllOrchestrationTasks(version, callback);
</code></pre>
                                </div>

                                <!--<div class="tab-pane" id="examples-OnapsoinfraorchestrationTasks-getAllOrchestrationTasks-0-angular">
              <pre class="prettyprint language-json prettyprinted" data-type="json"><code>Coming Soon!</code></pre>
            </div>-->
                                <div class="tab-pane" id="examples-OnapsoinfraorchestrationTasks-getAllOrchestrationTasks-0-csharp">
                              <pre class="prettyprint"><code class="language-cs">using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getAllOrchestrationTasksExample
    {
        public void main()
        {

            var apiInstance = new OnapsoinfraorchestrationTasksApi();
            var version = version_example;  // String |

            try
            {
                // Get all orchestrationTasks
                apiInstance.getAllOrchestrationTasks(version);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling OnapsoinfraorchestrationTasksApi.getAllOrchestrationTasks: " + e.Message );
            }
        }
    }
}
</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-OnapsoinfraorchestrationTasks-getAllOrchestrationTasks-0-php">
                              <pre class="prettyprint"><code class="language-php"><&#63;php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\OnapsoinfraorchestrationTasksApi();
$version = version_example; // String |

try {
    $api_instance->getAllOrchestrationTasks($version);
} catch (Exception $e) {
    echo 'Exception when calling OnapsoinfraorchestrationTasksApi->getAllOrchestrationTasks: ', $e->getMessage(), PHP_EOL;
}
?></code></pre>
                                </div>

                                <div class="tab-pane" id="examples-OnapsoinfraorchestrationTasks-getAllOrchestrationTasks-0-perl">
                              <pre class="prettyprint"><code class="language-perl">use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::OnapsoinfraorchestrationTasksApi;

my $api_instance = WWW::SwaggerClient::OnapsoinfraorchestrationTasksApi->new();
my $version = version_example; # String |

eval {
    $api_instance->getAllOrchestrationTasks(version => $version);
};
if ($@) {
    warn "Exception when calling OnapsoinfraorchestrationTasksApi->getAllOrchestrationTasks: $@\n";
}</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-OnapsoinfraorchestrationTasks-getAllOrchestrationTasks-0-python">
                              <pre class="prettyprint"><code class="language-python">from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.OnapsoinfraorchestrationTasksApi()
version = version_example # String |

try:
    # Get all orchestrationTasks
    api_instance.get_all_orchestration_tasks(version)
except ApiException as e:
    print("Exception when calling OnapsoinfraorchestrationTasksApi->getAllOrchestrationTasks: %s\n" % e)</code></pre>
                                </div>
                            </div>

                            <h2>Parameters</h2>

                            <div class="methodsubtabletitle">Path parameters</div>
                            <table id="methodsubtable">
                                <tr>
                                    <th width="150px">Name</th>
                                    <th>Description</th>
                                </tr>
                                <tr><td style="width:150px;">version*</td>
                                    <td>


                                        <div id="d2e199_getAllOrchestrationTasks_version">
                                            <div class="json-schema-view">
                                                <div class="primitive">
                <span class="type">
                    String
                </span>

                                                </div>
                                                <div class="inner required">
                                                    Required
                                                </div>
                                            </div>
                                        </div>
                                    </td>
                                </tr>

                            </table>





                            <h2>Responses</h2>
                            <h3> Status: default - successful operation </h3>

                            <ul class="nav nav-tabs nav-tabs-examples" >
                            </ul>

                            <div class="tab-content" style='margin-bottom: 10px;'>
                            </div>

                        </article>
                    </div>
                    <hr>
                    <div id="api-OnapsoinfraorchestrationTasks-getOrchestrationTask">
                        <article id="api-OnapsoinfraorchestrationTasks-getOrchestrationTask-0" data-group="User" data-name="getOrchestrationTask" data-version="0">
                            <div class="pull-left">
                                <h1>getOrchestrationTask</h1>
                                <p>Get orchestrationTask for a given taskId</p>
                            </div>
                            <div class="pull-right"></div>
                            <div class="clearfix"></div>
                            <p></p>
                            <p class="marked"></p>
                            <p></p>
                            <br />
                            <pre class="prettyprint language-html prettyprinted" data-type="get"><code><span class="pln">/onap/so/infra/orchestrationTasks/{version}/{taskId}</span></code></pre>
                            <p>
                            <h3>Usage and SDK Samples</h3>
                            </p>
                            <ul class="nav nav-tabs nav-tabs-examples">
                                <li class="active"><a href="#examples-OnapsoinfraorchestrationTasks-getOrchestrationTask-0-curl">Curl</a></li>
                                <li class=""><a href="#examples-OnapsoinfraorchestrationTasks-getOrchestrationTask-0-java">Java</a></li>
                                <li class=""><a href="#examples-OnapsoinfraorchestrationTasks-getOrchestrationTask-0-android">Android</a></li>
                                <!--<li class=""><a href="#examples-OnapsoinfraorchestrationTasks-getOrchestrationTask-0-groovy">Groovy</a></li>-->
                                <li class=""><a href="#examples-OnapsoinfraorchestrationTasks-getOrchestrationTask-0-objc">Obj-C</a></li>
                                <li class=""><a href="#examples-OnapsoinfraorchestrationTasks-getOrchestrationTask-0-javascript">JavaScript</a></li>
                                <!--<li class=""><a href="#examples-OnapsoinfraorchestrationTasks-getOrchestrationTask-0-angular">Angular</a></li>-->
                                <li class=""><a href="#examples-OnapsoinfraorchestrationTasks-getOrchestrationTask-0-csharp">C#</a></li>
                                <li class=""><a href="#examples-OnapsoinfraorchestrationTasks-getOrchestrationTask-0-php">PHP</a></li>
                                <li class=""><a href="#examples-OnapsoinfraorchestrationTasks-getOrchestrationTask-0-perl">Perl</a></li>
                                <li class=""><a href="#examples-OnapsoinfraorchestrationTasks-getOrchestrationTask-0-python">Python</a></li>
                            </ul>

                            <div class="tab-content">
                                <div class="tab-pane active" id="examples-OnapsoinfraorchestrationTasks-getOrchestrationTask-0-curl">
                                    <pre class="prettyprint"><code class="language-bsh">curl -X GET "http://localhost/onap/so/infra/orchestrationTasks/{version}/{taskId}"</code></pre>
                                </div>
                                <div class="tab-pane" id="examples-OnapsoinfraorchestrationTasks-getOrchestrationTask-0-java">
                            <pre class="prettyprint"><code class="language-java">import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.OnapsoinfraorchestrationTasksApi;

import java.io.File;
import java.util.*;

public class OnapsoinfraorchestrationTasksApiExample {

    public static void main(String[] args) {

        OnapsoinfraorchestrationTasksApi apiInstance = new OnapsoinfraorchestrationTasksApi();
        String taskId = taskId_example; // String |
        String version = version_example; // String |
        try {
            apiInstance.getOrchestrationTask(taskId, version);
        } catch (ApiException e) {
            System.err.println("Exception when calling OnapsoinfraorchestrationTasksApi#getOrchestrationTask");
            e.printStackTrace();
        }
    }
}</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-OnapsoinfraorchestrationTasks-getOrchestrationTask-0-android">
                            <pre class="prettyprint"><code class="language-java">import io.swagger.client.api.OnapsoinfraorchestrationTasksApi;

public class OnapsoinfraorchestrationTasksApiExample {

    public static void main(String[] args) {
        OnapsoinfraorchestrationTasksApi apiInstance = new OnapsoinfraorchestrationTasksApi();
        String taskId = taskId_example; // String |
        String version = version_example; // String |
        try {
            apiInstance.getOrchestrationTask(taskId, version);
        } catch (ApiException e) {
            System.err.println("Exception when calling OnapsoinfraorchestrationTasksApi#getOrchestrationTask");
            e.printStackTrace();
        }
    }
}</code></pre>
                                </div>
                                <!--
  <div class="tab-pane" id="examples-OnapsoinfraorchestrationTasks-getOrchestrationTask-0-groovy">
  <pre class="prettyprint language-json prettyprinted" data-type="json"><code>Coming Soon!</code></pre>
  </div> -->
                                <div class="tab-pane" id="examples-OnapsoinfraorchestrationTasks-getOrchestrationTask-0-objc">
                              <pre class="prettyprint"><code class="language-cpp">String *taskId = taskId_example; //
String *version = version_example; //

OnapsoinfraorchestrationTasksApi *apiInstance = [[OnapsoinfraorchestrationTasksApi alloc] init];

// Get orchestrationTask for a given taskId
[apiInstance getOrchestrationTaskWith:taskId
    version:version
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-OnapsoinfraorchestrationTasks-getOrchestrationTask-0-javascript">
                              <pre class="prettyprint"><code class="language-js">var SoGuilinApIs = require('so_guilin_ap_is');

var api = new SoGuilinApIs.OnapsoinfraorchestrationTasksApi()

var taskId = taskId_example; // {String}

var version = version_example; // {String}


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.getOrchestrationTask(taskId, version, callback);
</code></pre>
                                </div>

                                <!--<div class="tab-pane" id="examples-OnapsoinfraorchestrationTasks-getOrchestrationTask-0-angular">
              <pre class="prettyprint language-json prettyprinted" data-type="json"><code>Coming Soon!</code></pre>
            </div>-->
                                <div class="tab-pane" id="examples-OnapsoinfraorchestrationTasks-getOrchestrationTask-0-csharp">
                              <pre class="prettyprint"><code class="language-cs">using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getOrchestrationTaskExample
    {
        public void main()
        {

            var apiInstance = new OnapsoinfraorchestrationTasksApi();
            var taskId = taskId_example;  // String |
            var version = version_example;  // String |

            try
            {
                // Get orchestrationTask for a given taskId
                apiInstance.getOrchestrationTask(taskId, version);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling OnapsoinfraorchestrationTasksApi.getOrchestrationTask: " + e.Message );
            }
        }
    }
}
</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-OnapsoinfraorchestrationTasks-getOrchestrationTask-0-php">
                              <pre class="prettyprint"><code class="language-php"><&#63;php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\OnapsoinfraorchestrationTasksApi();
$taskId = taskId_example; // String |
$version = version_example; // String |

try {
    $api_instance->getOrchestrationTask($taskId, $version);
} catch (Exception $e) {
    echo 'Exception when calling OnapsoinfraorchestrationTasksApi->getOrchestrationTask: ', $e->getMessage(), PHP_EOL;
}
?></code></pre>
                                </div>

                                <div class="tab-pane" id="examples-OnapsoinfraorchestrationTasks-getOrchestrationTask-0-perl">
                              <pre class="prettyprint"><code class="language-perl">use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::OnapsoinfraorchestrationTasksApi;

my $api_instance = WWW::SwaggerClient::OnapsoinfraorchestrationTasksApi->new();
my $taskId = taskId_example; # String |
my $version = version_example; # String |

eval {
    $api_instance->getOrchestrationTask(taskId => $taskId, version => $version);
};
if ($@) {
    warn "Exception when calling OnapsoinfraorchestrationTasksApi->getOrchestrationTask: $@\n";
}</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-OnapsoinfraorchestrationTasks-getOrchestrationTask-0-python">
                              <pre class="prettyprint"><code class="language-python">from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.OnapsoinfraorchestrationTasksApi()
taskId = taskId_example # String |
version = version_example # String |

try:
    # Get orchestrationTask for a given taskId
    api_instance.get_orchestration_task(taskId, version)
except ApiException as e:
    print("Exception when calling OnapsoinfraorchestrationTasksApi->getOrchestrationTask: %s\n" % e)</code></pre>
                                </div>
                            </div>

                            <h2>Parameters</h2>

                            <div class="methodsubtabletitle">Path parameters</div>
                            <table id="methodsubtable">
                                <tr>
                                    <th width="150px">Name</th>
                                    <th>Description</th>
                                </tr>
                                <tr><td style="width:150px;">taskId*</td>
                                    <td>


                                        <div id="d2e199_getOrchestrationTask_taskId">
                                            <div class="json-schema-view">
                                                <div class="primitive">
                <span class="type">
                    String
                </span>

                                                </div>
                                                <div class="inner required">
                                                    Required
                                                </div>
                                            </div>
                                        </div>
                                    </td>
                                </tr>

                                <tr><td style="width:150px;">version*</td>
                                    <td>


                                        <div id="d2e199_getOrchestrationTask_version">
                                            <div class="json-schema-view">
                                                <div class="primitive">
                <span class="type">
                    String
                </span>

                                                </div>
                                                <div class="inner required">
                                                    Required
                                                </div>
                                            </div>
                                        </div>
                                    </td>
                                </tr>

                            </table>





                            <h2>Responses</h2>
                            <h3> Status: default - successful operation </h3>

                            <ul class="nav nav-tabs nav-tabs-examples" >
                            </ul>

                            <div class="tab-content" style='margin-bottom: 10px;'>
                            </div>

                        </article>
                    </div>
                    <hr>
                    <div id="api-OnapsoinfraorchestrationTasks-updateOrchestrationTask">
                        <article id="api-OnapsoinfraorchestrationTasks-updateOrchestrationTask-0" data-group="User" data-name="updateOrchestrationTask" data-version="0">
                            <div class="pull-left">
                                <h1>updateOrchestrationTask</h1>
                                <p>update orchestrationTask for a given taskId</p>
                            </div>
                            <div class="pull-right"></div>
                            <div class="clearfix"></div>
                            <p></p>
                            <p class="marked"></p>
                            <p></p>
                            <br />
                            <pre class="prettyprint language-html prettyprinted" data-type="put"><code><span class="pln">/onap/so/infra/orchestrationTasks/{version}/{taskId}</span></code></pre>
                            <p>
                            <h3>Usage and SDK Samples</h3>
                            </p>
                            <ul class="nav nav-tabs nav-tabs-examples">
                                <li class="active"><a href="#examples-OnapsoinfraorchestrationTasks-updateOrchestrationTask-0-curl">Curl</a></li>
                                <li class=""><a href="#examples-OnapsoinfraorchestrationTasks-updateOrchestrationTask-0-java">Java</a></li>
                                <li class=""><a href="#examples-OnapsoinfraorchestrationTasks-updateOrchestrationTask-0-android">Android</a></li>
                                <!--<li class=""><a href="#examples-OnapsoinfraorchestrationTasks-updateOrchestrationTask-0-groovy">Groovy</a></li>-->
                                <li class=""><a href="#examples-OnapsoinfraorchestrationTasks-updateOrchestrationTask-0-objc">Obj-C</a></li>
                                <li class=""><a href="#examples-OnapsoinfraorchestrationTasks-updateOrchestrationTask-0-javascript">JavaScript</a></li>
                                <!--<li class=""><a href="#examples-OnapsoinfraorchestrationTasks-updateOrchestrationTask-0-angular">Angular</a></li>-->
                                <li class=""><a href="#examples-OnapsoinfraorchestrationTasks-updateOrchestrationTask-0-csharp">C#</a></li>
                                <li class=""><a href="#examples-OnapsoinfraorchestrationTasks-updateOrchestrationTask-0-php">PHP</a></li>
                                <li class=""><a href="#examples-OnapsoinfraorchestrationTasks-updateOrchestrationTask-0-perl">Perl</a></li>
                                <li class=""><a href="#examples-OnapsoinfraorchestrationTasks-updateOrchestrationTask-0-python">Python</a></li>
                            </ul>

                            <div class="tab-content">
                                <div class="tab-pane active" id="examples-OnapsoinfraorchestrationTasks-updateOrchestrationTask-0-curl">
                                    <pre class="prettyprint"><code class="language-bsh">curl -X PUT "http://localhost/onap/so/infra/orchestrationTasks/{version}/{taskId}"</code></pre>
                                </div>
                                <div class="tab-pane" id="examples-OnapsoinfraorchestrationTasks-updateOrchestrationTask-0-java">
                            <pre class="prettyprint"><code class="language-java">import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.OnapsoinfraorchestrationTasksApi;

import java.io.File;
import java.util.*;

public class OnapsoinfraorchestrationTasksApiExample {

    public static void main(String[] args) {

        OnapsoinfraorchestrationTasksApi apiInstance = new OnapsoinfraorchestrationTasksApi();
        String taskId = taskId_example; // String |
        String version = version_example; // String |
        String body = body_example; // String |
        try {
            apiInstance.updateOrchestrationTask(taskId, version, body);
        } catch (ApiException e) {
            System.err.println("Exception when calling OnapsoinfraorchestrationTasksApi#updateOrchestrationTask");
            e.printStackTrace();
        }
    }
}</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-OnapsoinfraorchestrationTasks-updateOrchestrationTask-0-android">
                            <pre class="prettyprint"><code class="language-java">import io.swagger.client.api.OnapsoinfraorchestrationTasksApi;

public class OnapsoinfraorchestrationTasksApiExample {

    public static void main(String[] args) {
        OnapsoinfraorchestrationTasksApi apiInstance = new OnapsoinfraorchestrationTasksApi();
        String taskId = taskId_example; // String |
        String version = version_example; // String |
        String body = body_example; // String |
        try {
            apiInstance.updateOrchestrationTask(taskId, version, body);
        } catch (ApiException e) {
            System.err.println("Exception when calling OnapsoinfraorchestrationTasksApi#updateOrchestrationTask");
            e.printStackTrace();
        }
    }
}</code></pre>
                                </div>
                                <!--
  <div class="tab-pane" id="examples-OnapsoinfraorchestrationTasks-updateOrchestrationTask-0-groovy">
  <pre class="prettyprint language-json prettyprinted" data-type="json"><code>Coming Soon!</code></pre>
  </div> -->
                                <div class="tab-pane" id="examples-OnapsoinfraorchestrationTasks-updateOrchestrationTask-0-objc">
                              <pre class="prettyprint"><code class="language-cpp">String *taskId = taskId_example; //
String *version = version_example; //
String *body = body_example; //  (optional)

OnapsoinfraorchestrationTasksApi *apiInstance = [[OnapsoinfraorchestrationTasksApi alloc] init];

// update orchestrationTask for a given taskId
[apiInstance updateOrchestrationTaskWith:taskId
    version:version
    body:body
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-OnapsoinfraorchestrationTasks-updateOrchestrationTask-0-javascript">
                              <pre class="prettyprint"><code class="language-js">var SoGuilinApIs = require('so_guilin_ap_is');

var api = new SoGuilinApIs.OnapsoinfraorchestrationTasksApi()

var taskId = taskId_example; // {String}

var version = version_example; // {String}

var opts = {
  'body': body_example // {String}
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.updateOrchestrationTask(taskId, version, opts, callback);
</code></pre>
                                </div>

                                <!--<div class="tab-pane" id="examples-OnapsoinfraorchestrationTasks-updateOrchestrationTask-0-angular">
              <pre class="prettyprint language-json prettyprinted" data-type="json"><code>Coming Soon!</code></pre>
            </div>-->
                                <div class="tab-pane" id="examples-OnapsoinfraorchestrationTasks-updateOrchestrationTask-0-csharp">
                              <pre class="prettyprint"><code class="language-cs">using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class updateOrchestrationTaskExample
    {
        public void main()
        {

            var apiInstance = new OnapsoinfraorchestrationTasksApi();
            var taskId = taskId_example;  // String |
            var version = version_example;  // String |
            var body = body_example;  // String |  (optional)

            try
            {
                // update orchestrationTask for a given taskId
                apiInstance.updateOrchestrationTask(taskId, version, body);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling OnapsoinfraorchestrationTasksApi.updateOrchestrationTask: " + e.Message );
            }
        }
    }
}
</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-OnapsoinfraorchestrationTasks-updateOrchestrationTask-0-php">
                              <pre class="prettyprint"><code class="language-php"><&#63;php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\OnapsoinfraorchestrationTasksApi();
$taskId = taskId_example; // String |
$version = version_example; // String |
$body = body_example; // String |

try {
    $api_instance->updateOrchestrationTask($taskId, $version, $body);
} catch (Exception $e) {
    echo 'Exception when calling OnapsoinfraorchestrationTasksApi->updateOrchestrationTask: ', $e->getMessage(), PHP_EOL;
}
?></code></pre>
                                </div>

                                <div class="tab-pane" id="examples-OnapsoinfraorchestrationTasks-updateOrchestrationTask-0-perl">
                              <pre class="prettyprint"><code class="language-perl">use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::OnapsoinfraorchestrationTasksApi;

my $api_instance = WWW::SwaggerClient::OnapsoinfraorchestrationTasksApi->new();
my $taskId = taskId_example; # String |
my $version = version_example; # String |
my $body = WWW::SwaggerClient::Object::String->new(); # String |

eval {
    $api_instance->updateOrchestrationTask(taskId => $taskId, version => $version, body => $body);
};
if ($@) {
    warn "Exception when calling OnapsoinfraorchestrationTasksApi->updateOrchestrationTask: $@\n";
}</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-OnapsoinfraorchestrationTasks-updateOrchestrationTask-0-python">
                              <pre class="prettyprint"><code class="language-python">from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.OnapsoinfraorchestrationTasksApi()
taskId = taskId_example # String |
version = version_example # String |
body = body_example # String |  (optional)

try:
    # update orchestrationTask for a given taskId
    api_instance.update_orchestration_task(taskId, version, body=body)
except ApiException as e:
    print("Exception when calling OnapsoinfraorchestrationTasksApi->updateOrchestrationTask: %s\n" % e)</code></pre>
                                </div>
                            </div>

                            <h2>Parameters</h2>

                            <div class="methodsubtabletitle">Path parameters</div>
                            <table id="methodsubtable">
                                <tr>
                                    <th width="150px">Name</th>
                                    <th>Description</th>
                                </tr>
                                <tr><td style="width:150px;">taskId*</td>
                                    <td>


                                        <div id="d2e199_updateOrchestrationTask_taskId">
                                            <div class="json-schema-view">
                                                <div class="primitive">
                <span class="type">
                    String
                </span>

                                                </div>
                                                <div class="inner required">
                                                    Required
                                                </div>
                                            </div>
                                        </div>
                                    </td>
                                </tr>

                                <tr><td style="width:150px;">version*</td>
                                    <td>


                                        <div id="d2e199_updateOrchestrationTask_version">
                                            <div class="json-schema-view">
                                                <div class="primitive">
                <span class="type">
                    String
                </span>

                                                </div>
                                                <div class="inner required">
                                                    Required
                                                </div>
                                            </div>
                                        </div>
                                    </td>
                                </tr>

                            </table>


                            <div class="methodsubtabletitle">Body parameters</div>
                            <table id="methodsubtable">
                                <tr>
                                    <th width="150px">Name</th>
                                    <th>Description</th>
                                </tr>
                                <tr><td style="width:150px;">body </td>
                                    <td>


                                        <script>
$(document).ready(function() {
  var schemaWrapper = {
  "in" : "body",
  "name" : "body",
  "required" : false,
  "schema" : {
    "type" : "string"
  }
};
  var schema = schemaWrapper.schema;
  if (schema.$ref != null) {
    schema = defsParser.$refs.get(schema.$ref);
  } else {
    schemaWrapper.definitions = Object.assign({}, defs);
    $RefParser.dereference(schemaWrapper).catch(function(err) {
      console.log(err);
    });
  }

  var view = new JSONSchemaView(schema,2,{isBodyParam: true});
  var result = $('#d2e199_updateOrchestrationTask_body');
  result.empty();
  result.append(view.render());
});
</script>
                                        <div id="d2e199_updateOrchestrationTask_body"></div>
                                    </td>
                                </tr>

                            </table>



                            <h2>Responses</h2>
                            <h3> Status: default - successful operation </h3>

                            <ul class="nav nav-tabs nav-tabs-examples" >
                            </ul>

                            <div class="tab-content" style='margin-bottom: 10px;'>
                            </div>

                        </article>
                    </div>
                    <hr>
                </section>
                <section id="api-OnapsoinfraserviceInstantiation">
                    <h1>OnapsoinfraserviceInstantiation</h1>
                    <div id="api-OnapsoinfraserviceInstantiation-activatePort">
                        <article id="api-OnapsoinfraserviceInstantiation-activatePort-0" data-group="User" data-name="activatePort" data-version="0">
                            <div class="pull-left">
                                <h1>activatePort</h1>
                                <p>Activate Port Mirroring</p>
                            </div>
                            <div class="pull-right"></div>
                            <div class="clearfix"></div>
                            <p></p>
                            <p class="marked"></p>
                            <p></p>
                            <br />
                            <pre class="prettyprint language-html prettyprinted" data-type="post"><code><span class="pln">/onap/so/infra/serviceInstantiation/{version}/serviceInstances/{serviceInstanceId}/configurations/{configurationInstanceId}/activate</span></code></pre>
                            <p>
                            <h3>Usage and SDK Samples</h3>
                            </p>
                            <ul class="nav nav-tabs nav-tabs-examples">
                                <li class="active"><a href="#examples-OnapsoinfraserviceInstantiation-activatePort-0-curl">Curl</a></li>
                                <li class=""><a href="#examples-OnapsoinfraserviceInstantiation-activatePort-0-java">Java</a></li>
                                <li class=""><a href="#examples-OnapsoinfraserviceInstantiation-activatePort-0-android">Android</a></li>
                                <!--<li class=""><a href="#examples-OnapsoinfraserviceInstantiation-activatePort-0-groovy">Groovy</a></li>-->
                                <li class=""><a href="#examples-OnapsoinfraserviceInstantiation-activatePort-0-objc">Obj-C</a></li>
                                <li class=""><a href="#examples-OnapsoinfraserviceInstantiation-activatePort-0-javascript">JavaScript</a></li>
                                <!--<li class=""><a href="#examples-OnapsoinfraserviceInstantiation-activatePort-0-angular">Angular</a></li>-->
                                <li class=""><a href="#examples-OnapsoinfraserviceInstantiation-activatePort-0-csharp">C#</a></li>
                                <li class=""><a href="#examples-OnapsoinfraserviceInstantiation-activatePort-0-php">PHP</a></li>
                                <li class=""><a href="#examples-OnapsoinfraserviceInstantiation-activatePort-0-perl">Perl</a></li>
                                <li class=""><a href="#examples-OnapsoinfraserviceInstantiation-activatePort-0-python">Python</a></li>
                            </ul>

                            <div class="tab-content">
                                <div class="tab-pane active" id="examples-OnapsoinfraserviceInstantiation-activatePort-0-curl">
                                    <pre class="prettyprint"><code class="language-bsh">curl -X POST "http://localhost/onap/so/infra/serviceInstantiation/{version}/serviceInstances/{serviceInstanceId}/configurations/{configurationInstanceId}/activate"</code></pre>
                                </div>
                                <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-activatePort-0-java">
                            <pre class="prettyprint"><code class="language-java">import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.OnapsoinfraserviceInstantiationApi;

import java.io.File;
import java.util.*;

public class OnapsoinfraserviceInstantiationApiExample {

    public static void main(String[] args) {

        OnapsoinfraserviceInstantiationApi apiInstance = new OnapsoinfraserviceInstantiationApi();
        String version = version_example; // String |
        String serviceInstanceId = serviceInstanceId_example; // String |
        String configurationInstanceId = configurationInstanceId_example; // String |
        String body = body_example; // String |
        try {
            apiInstance.activatePort(version, serviceInstanceId, configurationInstanceId, body);
        } catch (ApiException e) {
            System.err.println("Exception when calling OnapsoinfraserviceInstantiationApi#activatePort");
            e.printStackTrace();
        }
    }
}</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-activatePort-0-android">
                            <pre class="prettyprint"><code class="language-java">import io.swagger.client.api.OnapsoinfraserviceInstantiationApi;

public class OnapsoinfraserviceInstantiationApiExample {

    public static void main(String[] args) {
        OnapsoinfraserviceInstantiationApi apiInstance = new OnapsoinfraserviceInstantiationApi();
        String version = version_example; // String |
        String serviceInstanceId = serviceInstanceId_example; // String |
        String configurationInstanceId = configurationInstanceId_example; // String |
        String body = body_example; // String |
        try {
            apiInstance.activatePort(version, serviceInstanceId, configurationInstanceId, body);
        } catch (ApiException e) {
            System.err.println("Exception when calling OnapsoinfraserviceInstantiationApi#activatePort");
            e.printStackTrace();
        }
    }
}</code></pre>
                                </div>
                                <!--
  <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-activatePort-0-groovy">
  <pre class="prettyprint language-json prettyprinted" data-type="json"><code>Coming Soon!</code></pre>
  </div> -->
                                <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-activatePort-0-objc">
                              <pre class="prettyprint"><code class="language-cpp">String *version = version_example; //
String *serviceInstanceId = serviceInstanceId_example; //
String *configurationInstanceId = configurationInstanceId_example; //
String *body = body_example; //  (optional)

OnapsoinfraserviceInstantiationApi *apiInstance = [[OnapsoinfraserviceInstantiationApi alloc] init];

// Activate Port Mirroring
[apiInstance activatePortWith:version
    serviceInstanceId:serviceInstanceId
    configurationInstanceId:configurationInstanceId
    body:body
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-activatePort-0-javascript">
                              <pre class="prettyprint"><code class="language-js">var SoGuilinApIs = require('so_guilin_ap_is');

var api = new SoGuilinApIs.OnapsoinfraserviceInstantiationApi()

var version = version_example; // {String}

var serviceInstanceId = serviceInstanceId_example; // {String}

var configurationInstanceId = configurationInstanceId_example; // {String}

var opts = {
  'body': body_example // {String}
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.activatePort(version, serviceInstanceId, configurationInstanceId, opts, callback);
</code></pre>
                                </div>

                                <!--<div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-activatePort-0-angular">
              <pre class="prettyprint language-json prettyprinted" data-type="json"><code>Coming Soon!</code></pre>
            </div>-->
                                <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-activatePort-0-csharp">
                              <pre class="prettyprint"><code class="language-cs">using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class activatePortExample
    {
        public void main()
        {

            var apiInstance = new OnapsoinfraserviceInstantiationApi();
            var version = version_example;  // String |
            var serviceInstanceId = serviceInstanceId_example;  // String |
            var configurationInstanceId = configurationInstanceId_example;  // String |
            var body = body_example;  // String |  (optional)

            try
            {
                // Activate Port Mirroring
                apiInstance.activatePort(version, serviceInstanceId, configurationInstanceId, body);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling OnapsoinfraserviceInstantiationApi.activatePort: " + e.Message );
            }
        }
    }
}
</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-activatePort-0-php">
                              <pre class="prettyprint"><code class="language-php"><&#63;php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\OnapsoinfraserviceInstantiationApi();
$version = version_example; // String |
$serviceInstanceId = serviceInstanceId_example; // String |
$configurationInstanceId = configurationInstanceId_example; // String |
$body = body_example; // String |

try {
    $api_instance->activatePort($version, $serviceInstanceId, $configurationInstanceId, $body);
} catch (Exception $e) {
    echo 'Exception when calling OnapsoinfraserviceInstantiationApi->activatePort: ', $e->getMessage(), PHP_EOL;
}
?></code></pre>
                                </div>

                                <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-activatePort-0-perl">
                              <pre class="prettyprint"><code class="language-perl">use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::OnapsoinfraserviceInstantiationApi;

my $api_instance = WWW::SwaggerClient::OnapsoinfraserviceInstantiationApi->new();
my $version = version_example; # String |
my $serviceInstanceId = serviceInstanceId_example; # String |
my $configurationInstanceId = configurationInstanceId_example; # String |
my $body = WWW::SwaggerClient::Object::String->new(); # String |

eval {
    $api_instance->activatePort(version => $version, serviceInstanceId => $serviceInstanceId, configurationInstanceId => $configurationInstanceId, body => $body);
};
if ($@) {
    warn "Exception when calling OnapsoinfraserviceInstantiationApi->activatePort: $@\n";
}</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-activatePort-0-python">
                              <pre class="prettyprint"><code class="language-python">from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.OnapsoinfraserviceInstantiationApi()
version = version_example # String |
serviceInstanceId = serviceInstanceId_example # String |
configurationInstanceId = configurationInstanceId_example # String |
body = body_example # String |  (optional)

try:
    # Activate Port Mirroring
    api_instance.activate_port(version, serviceInstanceId, configurationInstanceId, body=body)
except ApiException as e:
    print("Exception when calling OnapsoinfraserviceInstantiationApi->activatePort: %s\n" % e)</code></pre>
                                </div>
                            </div>

                            <h2>Parameters</h2>

                            <div class="methodsubtabletitle">Path parameters</div>
                            <table id="methodsubtable">
                                <tr>
                                    <th width="150px">Name</th>
                                    <th>Description</th>
                                </tr>
                                <tr><td style="width:150px;">version*</td>
                                    <td>


                                        <div id="d2e199_activatePort_version">
                                            <div class="json-schema-view">
                                                <div class="primitive">
                <span class="type">
                    String
                </span>

                                                </div>
                                                <div class="inner required">
                                                    Required
                                                </div>
                                            </div>
                                        </div>
                                    </td>
                                </tr>

                                <tr><td style="width:150px;">serviceInstanceId*</td>
                                    <td>


                                        <div id="d2e199_activatePort_serviceInstanceId">
                                            <div class="json-schema-view">
                                                <div class="primitive">
                <span class="type">
                    String
                </span>

                                                </div>
                                                <div class="inner required">
                                                    Required
                                                </div>
                                            </div>
                                        </div>
                                    </td>
                                </tr>

                                <tr><td style="width:150px;">configurationInstanceId*</td>
                                    <td>


                                        <div id="d2e199_activatePort_configurationInstanceId">
                                            <div class="json-schema-view">
                                                <div class="primitive">
                <span class="type">
                    String
                </span>

                                                </div>
                                                <div class="inner required">
                                                    Required
                                                </div>
                                            </div>
                                        </div>
                                    </td>
                                </tr>

                            </table>


                            <div class="methodsubtabletitle">Body parameters</div>
                            <table id="methodsubtable">
                                <tr>
                                    <th width="150px">Name</th>
                                    <th>Description</th>
                                </tr>
                                <tr><td style="width:150px;">body </td>
                                    <td>


                                        <script>
$(document).ready(function() {
  var schemaWrapper = {
  "in" : "body",
  "name" : "body",
  "required" : false,
  "schema" : {
    "type" : "string"
  }
};
  var schema = schemaWrapper.schema;
  if (schema.$ref != null) {
    schema = defsParser.$refs.get(schema.$ref);
  } else {
    schemaWrapper.definitions = Object.assign({}, defs);
    $RefParser.dereference(schemaWrapper).catch(function(err) {
      console.log(err);
    });
  }

  var view = new JSONSchemaView(schema,2,{isBodyParam: true});
  var result = $('#d2e199_activatePort_body');
  result.empty();
  result.append(view.render());
});
</script>
                                        <div id="d2e199_activatePort_body"></div>
                                    </td>
                                </tr>

                            </table>



                            <h2>Responses</h2>
                            <h3> Status: default - successful operation </h3>

                            <ul class="nav nav-tabs nav-tabs-examples" >
                            </ul>

                            <div class="tab-content" style='margin-bottom: 10px;'>
                            </div>

                        </article>
                    </div>
                    <hr>
                    <div id="api-OnapsoinfraserviceInstantiation-activateServiceInstance">
                        <article id="api-OnapsoinfraserviceInstantiation-activateServiceInstance-0" data-group="User" data-name="activateServiceInstance" data-version="0">
                            <div class="pull-left">
                                <h1>activateServiceInstance</h1>
                                <p>Activate provided Service Instance</p>
                            </div>
                            <div class="pull-right"></div>
                            <div class="clearfix"></div>
                            <p></p>
                            <p class="marked"></p>
                            <p></p>
                            <br />
                            <pre class="prettyprint language-html prettyprinted" data-type="post"><code><span class="pln">/onap/so/infra/serviceInstantiation/{version}/serviceInstances/{serviceInstanceId}/activate</span></code></pre>
                            <p>
                            <h3>Usage and SDK Samples</h3>
                            </p>
                            <ul class="nav nav-tabs nav-tabs-examples">
                                <li class="active"><a href="#examples-OnapsoinfraserviceInstantiation-activateServiceInstance-0-curl">Curl</a></li>
                                <li class=""><a href="#examples-OnapsoinfraserviceInstantiation-activateServiceInstance-0-java">Java</a></li>
                                <li class=""><a href="#examples-OnapsoinfraserviceInstantiation-activateServiceInstance-0-android">Android</a></li>
                                <!--<li class=""><a href="#examples-OnapsoinfraserviceInstantiation-activateServiceInstance-0-groovy">Groovy</a></li>-->
                                <li class=""><a href="#examples-OnapsoinfraserviceInstantiation-activateServiceInstance-0-objc">Obj-C</a></li>
                                <li class=""><a href="#examples-OnapsoinfraserviceInstantiation-activateServiceInstance-0-javascript">JavaScript</a></li>
                                <!--<li class=""><a href="#examples-OnapsoinfraserviceInstantiation-activateServiceInstance-0-angular">Angular</a></li>-->
                                <li class=""><a href="#examples-OnapsoinfraserviceInstantiation-activateServiceInstance-0-csharp">C#</a></li>
                                <li class=""><a href="#examples-OnapsoinfraserviceInstantiation-activateServiceInstance-0-php">PHP</a></li>
                                <li class=""><a href="#examples-OnapsoinfraserviceInstantiation-activateServiceInstance-0-perl">Perl</a></li>
                                <li class=""><a href="#examples-OnapsoinfraserviceInstantiation-activateServiceInstance-0-python">Python</a></li>
                            </ul>

                            <div class="tab-content">
                                <div class="tab-pane active" id="examples-OnapsoinfraserviceInstantiation-activateServiceInstance-0-curl">
                                    <pre class="prettyprint"><code class="language-bsh">curl -X POST "http://localhost/onap/so/infra/serviceInstantiation/{version}/serviceInstances/{serviceInstanceId}/activate"</code></pre>
                                </div>
                                <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-activateServiceInstance-0-java">
                            <pre class="prettyprint"><code class="language-java">import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.OnapsoinfraserviceInstantiationApi;

import java.io.File;
import java.util.*;

public class OnapsoinfraserviceInstantiationApiExample {

    public static void main(String[] args) {

        OnapsoinfraserviceInstantiationApi apiInstance = new OnapsoinfraserviceInstantiationApi();
        String version = version_example; // String |
        String serviceInstanceId = serviceInstanceId_example; // String |
        String body = body_example; // String |
        try {
            apiInstance.activateServiceInstance(version, serviceInstanceId, body);
        } catch (ApiException e) {
            System.err.println("Exception when calling OnapsoinfraserviceInstantiationApi#activateServiceInstance");
            e.printStackTrace();
        }
    }
}</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-activateServiceInstance-0-android">
                            <pre class="prettyprint"><code class="language-java">import io.swagger.client.api.OnapsoinfraserviceInstantiationApi;

public class OnapsoinfraserviceInstantiationApiExample {

    public static void main(String[] args) {
        OnapsoinfraserviceInstantiationApi apiInstance = new OnapsoinfraserviceInstantiationApi();
        String version = version_example; // String |
        String serviceInstanceId = serviceInstanceId_example; // String |
        String body = body_example; // String |
        try {
            apiInstance.activateServiceInstance(version, serviceInstanceId, body);
        } catch (ApiException e) {
            System.err.println("Exception when calling OnapsoinfraserviceInstantiationApi#activateServiceInstance");
            e.printStackTrace();
        }
    }
}</code></pre>
                                </div>
                                <!--
  <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-activateServiceInstance-0-groovy">
  <pre class="prettyprint language-json prettyprinted" data-type="json"><code>Coming Soon!</code></pre>
  </div> -->
                                <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-activateServiceInstance-0-objc">
                              <pre class="prettyprint"><code class="language-cpp">String *version = version_example; //
String *serviceInstanceId = serviceInstanceId_example; //
String *body = body_example; //  (optional)

OnapsoinfraserviceInstantiationApi *apiInstance = [[OnapsoinfraserviceInstantiationApi alloc] init];

// Activate provided Service Instance
[apiInstance activateServiceInstanceWith:version
    serviceInstanceId:serviceInstanceId
    body:body
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-activateServiceInstance-0-javascript">
                              <pre class="prettyprint"><code class="language-js">var SoGuilinApIs = require('so_guilin_ap_is');

var api = new SoGuilinApIs.OnapsoinfraserviceInstantiationApi()

var version = version_example; // {String}

var serviceInstanceId = serviceInstanceId_example; // {String}

var opts = {
  'body': body_example // {String}
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.activateServiceInstance(version, serviceInstanceId, opts, callback);
</code></pre>
                                </div>

                                <!--<div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-activateServiceInstance-0-angular">
              <pre class="prettyprint language-json prettyprinted" data-type="json"><code>Coming Soon!</code></pre>
            </div>-->
                                <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-activateServiceInstance-0-csharp">
                              <pre class="prettyprint"><code class="language-cs">using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class activateServiceInstanceExample
    {
        public void main()
        {

            var apiInstance = new OnapsoinfraserviceInstantiationApi();
            var version = version_example;  // String |
            var serviceInstanceId = serviceInstanceId_example;  // String |
            var body = body_example;  // String |  (optional)

            try
            {
                // Activate provided Service Instance
                apiInstance.activateServiceInstance(version, serviceInstanceId, body);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling OnapsoinfraserviceInstantiationApi.activateServiceInstance: " + e.Message );
            }
        }
    }
}
</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-activateServiceInstance-0-php">
                              <pre class="prettyprint"><code class="language-php"><&#63;php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\OnapsoinfraserviceInstantiationApi();
$version = version_example; // String |
$serviceInstanceId = serviceInstanceId_example; // String |
$body = body_example; // String |

try {
    $api_instance->activateServiceInstance($version, $serviceInstanceId, $body);
} catch (Exception $e) {
    echo 'Exception when calling OnapsoinfraserviceInstantiationApi->activateServiceInstance: ', $e->getMessage(), PHP_EOL;
}
?></code></pre>
                                </div>

                                <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-activateServiceInstance-0-perl">
                              <pre class="prettyprint"><code class="language-perl">use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::OnapsoinfraserviceInstantiationApi;

my $api_instance = WWW::SwaggerClient::OnapsoinfraserviceInstantiationApi->new();
my $version = version_example; # String |
my $serviceInstanceId = serviceInstanceId_example; # String |
my $body = WWW::SwaggerClient::Object::String->new(); # String |

eval {
    $api_instance->activateServiceInstance(version => $version, serviceInstanceId => $serviceInstanceId, body => $body);
};
if ($@) {
    warn "Exception when calling OnapsoinfraserviceInstantiationApi->activateServiceInstance: $@\n";
}</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-activateServiceInstance-0-python">
                              <pre class="prettyprint"><code class="language-python">from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.OnapsoinfraserviceInstantiationApi()
version = version_example # String |
serviceInstanceId = serviceInstanceId_example # String |
body = body_example # String |  (optional)

try:
    # Activate provided Service Instance
    api_instance.activate_service_instance(version, serviceInstanceId, body=body)
except ApiException as e:
    print("Exception when calling OnapsoinfraserviceInstantiationApi->activateServiceInstance: %s\n" % e)</code></pre>
                                </div>
                            </div>

                            <h2>Parameters</h2>

                            <div class="methodsubtabletitle">Path parameters</div>
                            <table id="methodsubtable">
                                <tr>
                                    <th width="150px">Name</th>
                                    <th>Description</th>
                                </tr>
                                <tr><td style="width:150px;">version*</td>
                                    <td>


                                        <div id="d2e199_activateServiceInstance_version">
                                            <div class="json-schema-view">
                                                <div class="primitive">
                <span class="type">
                    String
                </span>

                                                </div>
                                                <div class="inner required">
                                                    Required
                                                </div>
                                            </div>
                                        </div>
                                    </td>
                                </tr>

                                <tr><td style="width:150px;">serviceInstanceId*</td>
                                    <td>


                                        <div id="d2e199_activateServiceInstance_serviceInstanceId">
                                            <div class="json-schema-view">
                                                <div class="primitive">
                <span class="type">
                    String
                </span>

                                                </div>
                                                <div class="inner required">
                                                    Required
                                                </div>
                                            </div>
                                        </div>
                                    </td>
                                </tr>

                            </table>


                            <div class="methodsubtabletitle">Body parameters</div>
                            <table id="methodsubtable">
                                <tr>
                                    <th width="150px">Name</th>
                                    <th>Description</th>
                                </tr>
                                <tr><td style="width:150px;">body </td>
                                    <td>


                                        <script>
$(document).ready(function() {
  var schemaWrapper = {
  "in" : "body",
  "name" : "body",
  "required" : false,
  "schema" : {
    "type" : "string"
  }
};
  var schema = schemaWrapper.schema;
  if (schema.$ref != null) {
    schema = defsParser.$refs.get(schema.$ref);
  } else {
    schemaWrapper.definitions = Object.assign({}, defs);
    $RefParser.dereference(schemaWrapper).catch(function(err) {
      console.log(err);
    });
  }

  var view = new JSONSchemaView(schema,2,{isBodyParam: true});
  var result = $('#d2e199_activateServiceInstance_body');
  result.empty();
  result.append(view.render());
});
</script>
                                        <div id="d2e199_activateServiceInstance_body"></div>
                                    </td>
                                </tr>

                            </table>



                            <h2>Responses</h2>
                            <h3> Status: default - successful operation </h3>

                            <ul class="nav nav-tabs nav-tabs-examples" >
                            </ul>

                            <div class="tab-content" style='margin-bottom: 10px;'>
                            </div>

                        </article>
                    </div>
                    <hr>
                    <div id="api-OnapsoinfraserviceInstantiation-addRelationships">
                        <article id="api-OnapsoinfraserviceInstantiation-addRelationships-0" data-group="User" data-name="addRelationships" data-version="0">
                            <div class="pull-left">
                                <h1>addRelationships</h1>
                                <p>Add Relationships to a Service Instance</p>
                            </div>
                            <div class="pull-right"></div>
                            <div class="clearfix"></div>
                            <p></p>
                            <p class="marked"></p>
                            <p></p>
                            <br />
                            <pre class="prettyprint language-html prettyprinted" data-type="post"><code><span class="pln">/onap/so/infra/serviceInstantiation/{version}/serviceInstances/{serviceInstanceId}/addRelationships</span></code></pre>
                            <p>
                            <h3>Usage and SDK Samples</h3>
                            </p>
                            <ul class="nav nav-tabs nav-tabs-examples">
                                <li class="active"><a href="#examples-OnapsoinfraserviceInstantiation-addRelationships-0-curl">Curl</a></li>
                                <li class=""><a href="#examples-OnapsoinfraserviceInstantiation-addRelationships-0-java">Java</a></li>
                                <li class=""><a href="#examples-OnapsoinfraserviceInstantiation-addRelationships-0-android">Android</a></li>
                                <!--<li class=""><a href="#examples-OnapsoinfraserviceInstantiation-addRelationships-0-groovy">Groovy</a></li>-->
                                <li class=""><a href="#examples-OnapsoinfraserviceInstantiation-addRelationships-0-objc">Obj-C</a></li>
                                <li class=""><a href="#examples-OnapsoinfraserviceInstantiation-addRelationships-0-javascript">JavaScript</a></li>
                                <!--<li class=""><a href="#examples-OnapsoinfraserviceInstantiation-addRelationships-0-angular">Angular</a></li>-->
                                <li class=""><a href="#examples-OnapsoinfraserviceInstantiation-addRelationships-0-csharp">C#</a></li>
                                <li class=""><a href="#examples-OnapsoinfraserviceInstantiation-addRelationships-0-php">PHP</a></li>
                                <li class=""><a href="#examples-OnapsoinfraserviceInstantiation-addRelationships-0-perl">Perl</a></li>
                                <li class=""><a href="#examples-OnapsoinfraserviceInstantiation-addRelationships-0-python">Python</a></li>
                            </ul>

                            <div class="tab-content">
                                <div class="tab-pane active" id="examples-OnapsoinfraserviceInstantiation-addRelationships-0-curl">
                                    <pre class="prettyprint"><code class="language-bsh">curl -X POST "http://localhost/onap/so/infra/serviceInstantiation/{version}/serviceInstances/{serviceInstanceId}/addRelationships"</code></pre>
                                </div>
                                <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-addRelationships-0-java">
                            <pre class="prettyprint"><code class="language-java">import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.OnapsoinfraserviceInstantiationApi;

import java.io.File;
import java.util.*;

public class OnapsoinfraserviceInstantiationApiExample {

    public static void main(String[] args) {

        OnapsoinfraserviceInstantiationApi apiInstance = new OnapsoinfraserviceInstantiationApi();
        String version = version_example; // String |
        String serviceInstanceId = serviceInstanceId_example; // String |
        String body = body_example; // String |
        try {
            apiInstance.addRelationships(version, serviceInstanceId, body);
        } catch (ApiException e) {
            System.err.println("Exception when calling OnapsoinfraserviceInstantiationApi#addRelationships");
            e.printStackTrace();
        }
    }
}</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-addRelationships-0-android">
                            <pre class="prettyprint"><code class="language-java">import io.swagger.client.api.OnapsoinfraserviceInstantiationApi;

public class OnapsoinfraserviceInstantiationApiExample {

    public static void main(String[] args) {
        OnapsoinfraserviceInstantiationApi apiInstance = new OnapsoinfraserviceInstantiationApi();
        String version = version_example; // String |
        String serviceInstanceId = serviceInstanceId_example; // String |
        String body = body_example; // String |
        try {
            apiInstance.addRelationships(version, serviceInstanceId, body);
        } catch (ApiException e) {
            System.err.println("Exception when calling OnapsoinfraserviceInstantiationApi#addRelationships");
            e.printStackTrace();
        }
    }
}</code></pre>
                                </div>
                                <!--
  <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-addRelationships-0-groovy">
  <pre class="prettyprint language-json prettyprinted" data-type="json"><code>Coming Soon!</code></pre>
  </div> -->
                                <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-addRelationships-0-objc">
                              <pre class="prettyprint"><code class="language-cpp">String *version = version_example; //
String *serviceInstanceId = serviceInstanceId_example; //
String *body = body_example; //  (optional)

OnapsoinfraserviceInstantiationApi *apiInstance = [[OnapsoinfraserviceInstantiationApi alloc] init];

// Add Relationships to a Service Instance
[apiInstance addRelationshipsWith:version
    serviceInstanceId:serviceInstanceId
    body:body
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-addRelationships-0-javascript">
                              <pre class="prettyprint"><code class="language-js">var SoGuilinApIs = require('so_guilin_ap_is');

var api = new SoGuilinApIs.OnapsoinfraserviceInstantiationApi()

var version = version_example; // {String}

var serviceInstanceId = serviceInstanceId_example; // {String}

var opts = {
  'body': body_example // {String}
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.addRelationships(version, serviceInstanceId, opts, callback);
</code></pre>
                                </div>

                                <!--<div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-addRelationships-0-angular">
              <pre class="prettyprint language-json prettyprinted" data-type="json"><code>Coming Soon!</code></pre>
            </div>-->
                                <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-addRelationships-0-csharp">
                              <pre class="prettyprint"><code class="language-cs">using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class addRelationshipsExample
    {
        public void main()
        {

            var apiInstance = new OnapsoinfraserviceInstantiationApi();
            var version = version_example;  // String |
            var serviceInstanceId = serviceInstanceId_example;  // String |
            var body = body_example;  // String |  (optional)

            try
            {
                // Add Relationships to a Service Instance
                apiInstance.addRelationships(version, serviceInstanceId, body);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling OnapsoinfraserviceInstantiationApi.addRelationships: " + e.Message );
            }
        }
    }
}
</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-addRelationships-0-php">
                              <pre class="prettyprint"><code class="language-php"><&#63;php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\OnapsoinfraserviceInstantiationApi();
$version = version_example; // String |
$serviceInstanceId = serviceInstanceId_example; // String |
$body = body_example; // String |

try {
    $api_instance->addRelationships($version, $serviceInstanceId, $body);
} catch (Exception $e) {
    echo 'Exception when calling OnapsoinfraserviceInstantiationApi->addRelationships: ', $e->getMessage(), PHP_EOL;
}
?></code></pre>
                                </div>

                                <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-addRelationships-0-perl">
                              <pre class="prettyprint"><code class="language-perl">use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::OnapsoinfraserviceInstantiationApi;

my $api_instance = WWW::SwaggerClient::OnapsoinfraserviceInstantiationApi->new();
my $version = version_example; # String |
my $serviceInstanceId = serviceInstanceId_example; # String |
my $body = WWW::SwaggerClient::Object::String->new(); # String |

eval {
    $api_instance->addRelationships(version => $version, serviceInstanceId => $serviceInstanceId, body => $body);
};
if ($@) {
    warn "Exception when calling OnapsoinfraserviceInstantiationApi->addRelationships: $@\n";
}</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-addRelationships-0-python">
                              <pre class="prettyprint"><code class="language-python">from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.OnapsoinfraserviceInstantiationApi()
version = version_example # String |
serviceInstanceId = serviceInstanceId_example # String |
body = body_example # String |  (optional)

try:
    # Add Relationships to a Service Instance
    api_instance.add_relationships(version, serviceInstanceId, body=body)
except ApiException as e:
    print("Exception when calling OnapsoinfraserviceInstantiationApi->addRelationships: %s\n" % e)</code></pre>
                                </div>
                            </div>

                            <h2>Parameters</h2>

                            <div class="methodsubtabletitle">Path parameters</div>
                            <table id="methodsubtable">
                                <tr>
                                    <th width="150px">Name</th>
                                    <th>Description</th>
                                </tr>
                                <tr><td style="width:150px;">version*</td>
                                    <td>


                                        <div id="d2e199_addRelationships_version">
                                            <div class="json-schema-view">
                                                <div class="primitive">
                <span class="type">
                    String
                </span>

                                                </div>
                                                <div class="inner required">
                                                    Required
                                                </div>
                                            </div>
                                        </div>
                                    </td>
                                </tr>

                                <tr><td style="width:150px;">serviceInstanceId*</td>
                                    <td>


                                        <div id="d2e199_addRelationships_serviceInstanceId">
                                            <div class="json-schema-view">
                                                <div class="primitive">
                <span class="type">
                    String
                </span>

                                                </div>
                                                <div class="inner required">
                                                    Required
                                                </div>
                                            </div>
                                        </div>
                                    </td>
                                </tr>

                            </table>


                            <div class="methodsubtabletitle">Body parameters</div>
                            <table id="methodsubtable">
                                <tr>
                                    <th width="150px">Name</th>
                                    <th>Description</th>
                                </tr>
                                <tr><td style="width:150px;">body </td>
                                    <td>


                                        <script>
$(document).ready(function() {
  var schemaWrapper = {
  "in" : "body",
  "name" : "body",
  "required" : false,
  "schema" : {
    "type" : "string"
  }
};
  var schema = schemaWrapper.schema;
  if (schema.$ref != null) {
    schema = defsParser.$refs.get(schema.$ref);
  } else {
    schemaWrapper.definitions = Object.assign({}, defs);
    $RefParser.dereference(schemaWrapper).catch(function(err) {
      console.log(err);
    });
  }

  var view = new JSONSchemaView(schema,2,{isBodyParam: true});
  var result = $('#d2e199_addRelationships_body');
  result.empty();
  result.append(view.render());
});
</script>
                                        <div id="d2e199_addRelationships_body"></div>
                                    </td>
                                </tr>

                            </table>



                            <h2>Responses</h2>
                            <h3> Status: default - successful operation </h3>

                            <ul class="nav nav-tabs nav-tabs-examples" >
                            </ul>

                            <div class="tab-content" style='margin-bottom: 10px;'>
                            </div>

                        </article>
                    </div>
                    <hr>
                    <div id="api-OnapsoinfraserviceInstantiation-applyUpdatedConfig">
                        <article id="api-OnapsoinfraserviceInstantiation-applyUpdatedConfig-0" data-group="User" data-name="applyUpdatedConfig" data-version="0">
                            <div class="pull-left">
                                <h1>applyUpdatedConfig</h1>
                                <p>Apply updated configuration</p>
                            </div>
                            <div class="pull-right"></div>
                            <div class="clearfix"></div>
                            <p></p>
                            <p class="marked"></p>
                            <p></p>
                            <br />
                            <pre class="prettyprint language-html prettyprinted" data-type="post"><code><span class="pln">/onap/so/infra/serviceInstantiation/{version}/serviceInstances/{serviceInstanceId}/vnfs/{vnfInstanceId}/applyUpdatedConfig</span></code></pre>
                            <p>
                            <h3>Usage and SDK Samples</h3>
                            </p>
                            <ul class="nav nav-tabs nav-tabs-examples">
                                <li class="active"><a href="#examples-OnapsoinfraserviceInstantiation-applyUpdatedConfig-0-curl">Curl</a></li>
                                <li class=""><a href="#examples-OnapsoinfraserviceInstantiation-applyUpdatedConfig-0-java">Java</a></li>
                                <li class=""><a href="#examples-OnapsoinfraserviceInstantiation-applyUpdatedConfig-0-android">Android</a></li>
                                <!--<li class=""><a href="#examples-OnapsoinfraserviceInstantiation-applyUpdatedConfig-0-groovy">Groovy</a></li>-->
                                <li class=""><a href="#examples-OnapsoinfraserviceInstantiation-applyUpdatedConfig-0-objc">Obj-C</a></li>
                                <li class=""><a href="#examples-OnapsoinfraserviceInstantiation-applyUpdatedConfig-0-javascript">JavaScript</a></li>
                                <!--<li class=""><a href="#examples-OnapsoinfraserviceInstantiation-applyUpdatedConfig-0-angular">Angular</a></li>-->
                                <li class=""><a href="#examples-OnapsoinfraserviceInstantiation-applyUpdatedConfig-0-csharp">C#</a></li>
                                <li class=""><a href="#examples-OnapsoinfraserviceInstantiation-applyUpdatedConfig-0-php">PHP</a></li>
                                <li class=""><a href="#examples-OnapsoinfraserviceInstantiation-applyUpdatedConfig-0-perl">Perl</a></li>
                                <li class=""><a href="#examples-OnapsoinfraserviceInstantiation-applyUpdatedConfig-0-python">Python</a></li>
                            </ul>

                            <div class="tab-content">
                                <div class="tab-pane active" id="examples-OnapsoinfraserviceInstantiation-applyUpdatedConfig-0-curl">
                                    <pre class="prettyprint"><code class="language-bsh">curl -X POST "http://localhost/onap/so/infra/serviceInstantiation/{version}/serviceInstances/{serviceInstanceId}/vnfs/{vnfInstanceId}/applyUpdatedConfig"</code></pre>
                                </div>
                                <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-applyUpdatedConfig-0-java">
                            <pre class="prettyprint"><code class="language-java">import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.OnapsoinfraserviceInstantiationApi;

import java.io.File;
import java.util.*;

public class OnapsoinfraserviceInstantiationApiExample {

    public static void main(String[] args) {

        OnapsoinfraserviceInstantiationApi apiInstance = new OnapsoinfraserviceInstantiationApi();
        String version = version_example; // String |
        String serviceInstanceId = serviceInstanceId_example; // String |
        String vnfInstanceId = vnfInstanceId_example; // String |
        String body = body_example; // String |
        try {
            apiInstance.applyUpdatedConfig(version, serviceInstanceId, vnfInstanceId, body);
        } catch (ApiException e) {
            System.err.println("Exception when calling OnapsoinfraserviceInstantiationApi#applyUpdatedConfig");
            e.printStackTrace();
        }
    }
}</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-applyUpdatedConfig-0-android">
                            <pre class="prettyprint"><code class="language-java">import io.swagger.client.api.OnapsoinfraserviceInstantiationApi;

public class OnapsoinfraserviceInstantiationApiExample {

    public static void main(String[] args) {
        OnapsoinfraserviceInstantiationApi apiInstance = new OnapsoinfraserviceInstantiationApi();
        String version = version_example; // String |
        String serviceInstanceId = serviceInstanceId_example; // String |
        String vnfInstanceId = vnfInstanceId_example; // String |
        String body = body_example; // String |
        try {
            apiInstance.applyUpdatedConfig(version, serviceInstanceId, vnfInstanceId, body);
        } catch (ApiException e) {
            System.err.println("Exception when calling OnapsoinfraserviceInstantiationApi#applyUpdatedConfig");
            e.printStackTrace();
        }
    }
}</code></pre>
                                </div>
                                <!--
  <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-applyUpdatedConfig-0-groovy">
  <pre class="prettyprint language-json prettyprinted" data-type="json"><code>Coming Soon!</code></pre>
  </div> -->
                                <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-applyUpdatedConfig-0-objc">
                              <pre class="prettyprint"><code class="language-cpp">String *version = version_example; //
String *serviceInstanceId = serviceInstanceId_example; //
String *vnfInstanceId = vnfInstanceId_example; //
String *body = body_example; //  (optional)

OnapsoinfraserviceInstantiationApi *apiInstance = [[OnapsoinfraserviceInstantiationApi alloc] init];

// Apply updated configuration
[apiInstance applyUpdatedConfigWith:version
    serviceInstanceId:serviceInstanceId
    vnfInstanceId:vnfInstanceId
    body:body
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-applyUpdatedConfig-0-javascript">
                              <pre class="prettyprint"><code class="language-js">var SoGuilinApIs = require('so_guilin_ap_is');

var api = new SoGuilinApIs.OnapsoinfraserviceInstantiationApi()

var version = version_example; // {String}

var serviceInstanceId = serviceInstanceId_example; // {String}

var vnfInstanceId = vnfInstanceId_example; // {String}

var opts = {
  'body': body_example // {String}
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.applyUpdatedConfig(version, serviceInstanceId, vnfInstanceId, opts, callback);
</code></pre>
                                </div>

                                <!--<div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-applyUpdatedConfig-0-angular">
              <pre class="prettyprint language-json prettyprinted" data-type="json"><code>Coming Soon!</code></pre>
            </div>-->
                                <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-applyUpdatedConfig-0-csharp">
                              <pre class="prettyprint"><code class="language-cs">using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class applyUpdatedConfigExample
    {
        public void main()
        {

            var apiInstance = new OnapsoinfraserviceInstantiationApi();
            var version = version_example;  // String |
            var serviceInstanceId = serviceInstanceId_example;  // String |
            var vnfInstanceId = vnfInstanceId_example;  // String |
            var body = body_example;  // String |  (optional)

            try
            {
                // Apply updated configuration
                apiInstance.applyUpdatedConfig(version, serviceInstanceId, vnfInstanceId, body);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling OnapsoinfraserviceInstantiationApi.applyUpdatedConfig: " + e.Message );
            }
        }
    }
}
</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-applyUpdatedConfig-0-php">
                              <pre class="prettyprint"><code class="language-php"><&#63;php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\OnapsoinfraserviceInstantiationApi();
$version = version_example; // String |
$serviceInstanceId = serviceInstanceId_example; // String |
$vnfInstanceId = vnfInstanceId_example; // String |
$body = body_example; // String |

try {
    $api_instance->applyUpdatedConfig($version, $serviceInstanceId, $vnfInstanceId, $body);
} catch (Exception $e) {
    echo 'Exception when calling OnapsoinfraserviceInstantiationApi->applyUpdatedConfig: ', $e->getMessage(), PHP_EOL;
}
?></code></pre>
                                </div>

                                <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-applyUpdatedConfig-0-perl">
                              <pre class="prettyprint"><code class="language-perl">use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::OnapsoinfraserviceInstantiationApi;

my $api_instance = WWW::SwaggerClient::OnapsoinfraserviceInstantiationApi->new();
my $version = version_example; # String |
my $serviceInstanceId = serviceInstanceId_example; # String |
my $vnfInstanceId = vnfInstanceId_example; # String |
my $body = WWW::SwaggerClient::Object::String->new(); # String |

eval {
    $api_instance->applyUpdatedConfig(version => $version, serviceInstanceId => $serviceInstanceId, vnfInstanceId => $vnfInstanceId, body => $body);
};
if ($@) {
    warn "Exception when calling OnapsoinfraserviceInstantiationApi->applyUpdatedConfig: $@\n";
}</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-applyUpdatedConfig-0-python">
                              <pre class="prettyprint"><code class="language-python">from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.OnapsoinfraserviceInstantiationApi()
version = version_example # String |
serviceInstanceId = serviceInstanceId_example # String |
vnfInstanceId = vnfInstanceId_example # String |
body = body_example # String |  (optional)

try:
    # Apply updated configuration
    api_instance.apply_updated_config(version, serviceInstanceId, vnfInstanceId, body=body)
except ApiException as e:
    print("Exception when calling OnapsoinfraserviceInstantiationApi->applyUpdatedConfig: %s\n" % e)</code></pre>
                                </div>
                            </div>

                            <h2>Parameters</h2>

                            <div class="methodsubtabletitle">Path parameters</div>
                            <table id="methodsubtable">
                                <tr>
                                    <th width="150px">Name</th>
                                    <th>Description</th>
                                </tr>
                                <tr><td style="width:150px;">version*</td>
                                    <td>


                                        <div id="d2e199_applyUpdatedConfig_version">
                                            <div class="json-schema-view">
                                                <div class="primitive">
                <span class="type">
                    String
                </span>

                                                </div>
                                                <div class="inner required">
                                                    Required
                                                </div>
                                            </div>
                                        </div>
                                    </td>
                                </tr>

                                <tr><td style="width:150px;">serviceInstanceId*</td>
                                    <td>


                                        <div id="d2e199_applyUpdatedConfig_serviceInstanceId">
                                            <div class="json-schema-view">
                                                <div class="primitive">
                <span class="type">
                    String
                </span>

                                                </div>
                                                <div class="inner required">
                                                    Required
                                                </div>
                                            </div>
                                        </div>
                                    </td>
                                </tr>

                                <tr><td style="width:150px;">vnfInstanceId*</td>
                                    <td>


                                        <div id="d2e199_applyUpdatedConfig_vnfInstanceId">
                                            <div class="json-schema-view">
                                                <div class="primitive">
                <span class="type">
                    String
                </span>

                                                </div>
                                                <div class="inner required">
                                                    Required
                                                </div>
                                            </div>
                                        </div>
                                    </td>
                                </tr>

                            </table>


                            <div class="methodsubtabletitle">Body parameters</div>
                            <table id="methodsubtable">
                                <tr>
                                    <th width="150px">Name</th>
                                    <th>Description</th>
                                </tr>
                                <tr><td style="width:150px;">body </td>
                                    <td>


                                        <script>
$(document).ready(function() {
  var schemaWrapper = {
  "in" : "body",
  "name" : "body",
  "required" : false,
  "schema" : {
    "type" : "string"
  }
};
  var schema = schemaWrapper.schema;
  if (schema.$ref != null) {
    schema = defsParser.$refs.get(schema.$ref);
  } else {
    schemaWrapper.definitions = Object.assign({}, defs);
    $RefParser.dereference(schemaWrapper).catch(function(err) {
      console.log(err);
    });
  }

  var view = new JSONSchemaView(schema,2,{isBodyParam: true});
  var result = $('#d2e199_applyUpdatedConfig_body');
  result.empty();
  result.append(view.render());
});
</script>
                                        <div id="d2e199_applyUpdatedConfig_body"></div>
                                    </td>
                                </tr>

                            </table>



                            <h2>Responses</h2>
                            <h3> Status: default - successful operation </h3>

                            <ul class="nav nav-tabs nav-tabs-examples" >
                            </ul>

                            <div class="tab-content" style='margin-bottom: 10px;'>
                            </div>

                        </article>
                    </div>
                    <hr>
                    <div id="api-OnapsoinfraserviceInstantiation-assignServiceInstance">
                        <article id="api-OnapsoinfraserviceInstantiation-assignServiceInstance-0" data-group="User" data-name="assignServiceInstance" data-version="0">
                            <div class="pull-left">
                                <h1>assignServiceInstance</h1>
                                <p>Assign Service Instance</p>
                            </div>
                            <div class="pull-right"></div>
                            <div class="clearfix"></div>
                            <p></p>
                            <p class="marked"></p>
                            <p></p>
                            <br />
                            <pre class="prettyprint language-html prettyprinted" data-type="post"><code><span class="pln">/onap/so/infra/serviceInstantiation/{version}/serviceInstances/assign</span></code></pre>
                            <p>
                            <h3>Usage and SDK Samples</h3>
                            </p>
                            <ul class="nav nav-tabs nav-tabs-examples">
                                <li class="active"><a href="#examples-OnapsoinfraserviceInstantiation-assignServiceInstance-0-curl">Curl</a></li>
                                <li class=""><a href="#examples-OnapsoinfraserviceInstantiation-assignServiceInstance-0-java">Java</a></li>
                                <li class=""><a href="#examples-OnapsoinfraserviceInstantiation-assignServiceInstance-0-android">Android</a></li>
                                <!--<li class=""><a href="#examples-OnapsoinfraserviceInstantiation-assignServiceInstance-0-groovy">Groovy</a></li>-->
                                <li class=""><a href="#examples-OnapsoinfraserviceInstantiation-assignServiceInstance-0-objc">Obj-C</a></li>
                                <li class=""><a href="#examples-OnapsoinfraserviceInstantiation-assignServiceInstance-0-javascript">JavaScript</a></li>
                                <!--<li class=""><a href="#examples-OnapsoinfraserviceInstantiation-assignServiceInstance-0-angular">Angular</a></li>-->
                                <li class=""><a href="#examples-OnapsoinfraserviceInstantiation-assignServiceInstance-0-csharp">C#</a></li>
                                <li class=""><a href="#examples-OnapsoinfraserviceInstantiation-assignServiceInstance-0-php">PHP</a></li>
                                <li class=""><a href="#examples-OnapsoinfraserviceInstantiation-assignServiceInstance-0-perl">Perl</a></li>
                                <li class=""><a href="#examples-OnapsoinfraserviceInstantiation-assignServiceInstance-0-python">Python</a></li>
                            </ul>

                            <div class="tab-content">
                                <div class="tab-pane active" id="examples-OnapsoinfraserviceInstantiation-assignServiceInstance-0-curl">
                                    <pre class="prettyprint"><code class="language-bsh">curl -X POST "http://localhost/onap/so/infra/serviceInstantiation/{version}/serviceInstances/assign"</code></pre>
                                </div>
                                <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-assignServiceInstance-0-java">
                            <pre class="prettyprint"><code class="language-java">import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.OnapsoinfraserviceInstantiationApi;

import java.io.File;
import java.util.*;

public class OnapsoinfraserviceInstantiationApiExample {

    public static void main(String[] args) {

        OnapsoinfraserviceInstantiationApi apiInstance = new OnapsoinfraserviceInstantiationApi();
        String version = version_example; // String |
        String body = body_example; // String |
        try {
            apiInstance.assignServiceInstance(version, body);
        } catch (ApiException e) {
            System.err.println("Exception when calling OnapsoinfraserviceInstantiationApi#assignServiceInstance");
            e.printStackTrace();
        }
    }
}</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-assignServiceInstance-0-android">
                            <pre class="prettyprint"><code class="language-java">import io.swagger.client.api.OnapsoinfraserviceInstantiationApi;

public class OnapsoinfraserviceInstantiationApiExample {

    public static void main(String[] args) {
        OnapsoinfraserviceInstantiationApi apiInstance = new OnapsoinfraserviceInstantiationApi();
        String version = version_example; // String |
        String body = body_example; // String |
        try {
            apiInstance.assignServiceInstance(version, body);
        } catch (ApiException e) {
            System.err.println("Exception when calling OnapsoinfraserviceInstantiationApi#assignServiceInstance");
            e.printStackTrace();
        }
    }
}</code></pre>
                                </div>
                                <!--
  <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-assignServiceInstance-0-groovy">
  <pre class="prettyprint language-json prettyprinted" data-type="json"><code>Coming Soon!</code></pre>
  </div> -->
                                <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-assignServiceInstance-0-objc">
                              <pre class="prettyprint"><code class="language-cpp">String *version = version_example; //
String *body = body_example; //  (optional)

OnapsoinfraserviceInstantiationApi *apiInstance = [[OnapsoinfraserviceInstantiationApi alloc] init];

// Assign Service Instance
[apiInstance assignServiceInstanceWith:version
    body:body
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-assignServiceInstance-0-javascript">
                              <pre class="prettyprint"><code class="language-js">var SoGuilinApIs = require('so_guilin_ap_is');

var api = new SoGuilinApIs.OnapsoinfraserviceInstantiationApi()

var version = version_example; // {String}

var opts = {
  'body': body_example // {String}
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.assignServiceInstance(version, opts, callback);
</code></pre>
                                </div>

                                <!--<div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-assignServiceInstance-0-angular">
              <pre class="prettyprint language-json prettyprinted" data-type="json"><code>Coming Soon!</code></pre>
            </div>-->
                                <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-assignServiceInstance-0-csharp">
                              <pre class="prettyprint"><code class="language-cs">using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class assignServiceInstanceExample
    {
        public void main()
        {

            var apiInstance = new OnapsoinfraserviceInstantiationApi();
            var version = version_example;  // String |
            var body = body_example;  // String |  (optional)

            try
            {
                // Assign Service Instance
                apiInstance.assignServiceInstance(version, body);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling OnapsoinfraserviceInstantiationApi.assignServiceInstance: " + e.Message );
            }
        }
    }
}
</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-assignServiceInstance-0-php">
                              <pre class="prettyprint"><code class="language-php"><&#63;php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\OnapsoinfraserviceInstantiationApi();
$version = version_example; // String |
$body = body_example; // String |

try {
    $api_instance->assignServiceInstance($version, $body);
} catch (Exception $e) {
    echo 'Exception when calling OnapsoinfraserviceInstantiationApi->assignServiceInstance: ', $e->getMessage(), PHP_EOL;
}
?></code></pre>
                                </div>

                                <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-assignServiceInstance-0-perl">
                              <pre class="prettyprint"><code class="language-perl">use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::OnapsoinfraserviceInstantiationApi;

my $api_instance = WWW::SwaggerClient::OnapsoinfraserviceInstantiationApi->new();
my $version = version_example; # String |
my $body = WWW::SwaggerClient::Object::String->new(); # String |

eval {
    $api_instance->assignServiceInstance(version => $version, body => $body);
};
if ($@) {
    warn "Exception when calling OnapsoinfraserviceInstantiationApi->assignServiceInstance: $@\n";
}</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-assignServiceInstance-0-python">
                              <pre class="prettyprint"><code class="language-python">from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.OnapsoinfraserviceInstantiationApi()
version = version_example # String |
body = body_example # String |  (optional)

try:
    # Assign Service Instance
    api_instance.assign_service_instance(version, body=body)
except ApiException as e:
    print("Exception when calling OnapsoinfraserviceInstantiationApi->assignServiceInstance: %s\n" % e)</code></pre>
                                </div>
                            </div>

                            <h2>Parameters</h2>

                            <div class="methodsubtabletitle">Path parameters</div>
                            <table id="methodsubtable">
                                <tr>
                                    <th width="150px">Name</th>
                                    <th>Description</th>
                                </tr>
                                <tr><td style="width:150px;">version*</td>
                                    <td>


                                        <div id="d2e199_assignServiceInstance_version">
                                            <div class="json-schema-view">
                                                <div class="primitive">
                <span class="type">
                    String
                </span>

                                                </div>
                                                <div class="inner required">
                                                    Required
                                                </div>
                                            </div>
                                        </div>
                                    </td>
                                </tr>

                            </table>


                            <div class="methodsubtabletitle">Body parameters</div>
                            <table id="methodsubtable">
                                <tr>
                                    <th width="150px">Name</th>
                                    <th>Description</th>
                                </tr>
                                <tr><td style="width:150px;">body </td>
                                    <td>


                                        <script>
$(document).ready(function() {
  var schemaWrapper = {
  "in" : "body",
  "name" : "body",
  "required" : false,
  "schema" : {
    "type" : "string"
  }
};
  var schema = schemaWrapper.schema;
  if (schema.$ref != null) {
    schema = defsParser.$refs.get(schema.$ref);
  } else {
    schemaWrapper.definitions = Object.assign({}, defs);
    $RefParser.dereference(schemaWrapper).catch(function(err) {
      console.log(err);
    });
  }

  var view = new JSONSchemaView(schema,2,{isBodyParam: true});
  var result = $('#d2e199_assignServiceInstance_body');
  result.empty();
  result.append(view.render());
});
</script>
                                        <div id="d2e199_assignServiceInstance_body"></div>
                                    </td>
                                </tr>

                            </table>



                            <h2>Responses</h2>
                            <h3> Status: default - successful operation </h3>

                            <ul class="nav nav-tabs nav-tabs-examples" >
                            </ul>

                            <div class="tab-content" style='margin-bottom: 10px;'>
                            </div>

                        </article>
                    </div>
                    <hr>
                    <div id="api-OnapsoinfraserviceInstantiation-createNetworkInstance">
                        <article id="api-OnapsoinfraserviceInstantiation-createNetworkInstance-0" data-group="User" data-name="createNetworkInstance" data-version="0">
                            <div class="pull-left">
                                <h1>createNetworkInstance</h1>
                                <p>Create NetworkInstance on a specified version and serviceInstance </p>
                            </div>
                            <div class="pull-right"></div>
                            <div class="clearfix"></div>
                            <p></p>
                            <p class="marked"></p>
                            <p></p>
                            <br />
                            <pre class="prettyprint language-html prettyprinted" data-type="post"><code><span class="pln">/onap/so/infra/serviceInstantiation/{version}/serviceInstances/{serviceInstanceId}/networks</span></code></pre>
                            <p>
                            <h3>Usage and SDK Samples</h3>
                            </p>
                            <ul class="nav nav-tabs nav-tabs-examples">
                                <li class="active"><a href="#examples-OnapsoinfraserviceInstantiation-createNetworkInstance-0-curl">Curl</a></li>
                                <li class=""><a href="#examples-OnapsoinfraserviceInstantiation-createNetworkInstance-0-java">Java</a></li>
                                <li class=""><a href="#examples-OnapsoinfraserviceInstantiation-createNetworkInstance-0-android">Android</a></li>
                                <!--<li class=""><a href="#examples-OnapsoinfraserviceInstantiation-createNetworkInstance-0-groovy">Groovy</a></li>-->
                                <li class=""><a href="#examples-OnapsoinfraserviceInstantiation-createNetworkInstance-0-objc">Obj-C</a></li>
                                <li class=""><a href="#examples-OnapsoinfraserviceInstantiation-createNetworkInstance-0-javascript">JavaScript</a></li>
                                <!--<li class=""><a href="#examples-OnapsoinfraserviceInstantiation-createNetworkInstance-0-angular">Angular</a></li>-->
                                <li class=""><a href="#examples-OnapsoinfraserviceInstantiation-createNetworkInstance-0-csharp">C#</a></li>
                                <li class=""><a href="#examples-OnapsoinfraserviceInstantiation-createNetworkInstance-0-php">PHP</a></li>
                                <li class=""><a href="#examples-OnapsoinfraserviceInstantiation-createNetworkInstance-0-perl">Perl</a></li>
                                <li class=""><a href="#examples-OnapsoinfraserviceInstantiation-createNetworkInstance-0-python">Python</a></li>
                            </ul>

                            <div class="tab-content">
                                <div class="tab-pane active" id="examples-OnapsoinfraserviceInstantiation-createNetworkInstance-0-curl">
                                    <pre class="prettyprint"><code class="language-bsh">curl -X POST "http://localhost/onap/so/infra/serviceInstantiation/{version}/serviceInstances/{serviceInstanceId}/networks"</code></pre>
                                </div>
                                <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-createNetworkInstance-0-java">
                            <pre class="prettyprint"><code class="language-java">import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.OnapsoinfraserviceInstantiationApi;

import java.io.File;
import java.util.*;

public class OnapsoinfraserviceInstantiationApiExample {

    public static void main(String[] args) {

        OnapsoinfraserviceInstantiationApi apiInstance = new OnapsoinfraserviceInstantiationApi();
        String version = version_example; // String |
        String serviceInstanceId = serviceInstanceId_example; // String |
        String body = body_example; // String |
        try {
            apiInstance.createNetworkInstance(version, serviceInstanceId, body);
        } catch (ApiException e) {
            System.err.println("Exception when calling OnapsoinfraserviceInstantiationApi#createNetworkInstance");
            e.printStackTrace();
        }
    }
}</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-createNetworkInstance-0-android">
                            <pre class="prettyprint"><code class="language-java">import io.swagger.client.api.OnapsoinfraserviceInstantiationApi;

public class OnapsoinfraserviceInstantiationApiExample {

    public static void main(String[] args) {
        OnapsoinfraserviceInstantiationApi apiInstance = new OnapsoinfraserviceInstantiationApi();
        String version = version_example; // String |
        String serviceInstanceId = serviceInstanceId_example; // String |
        String body = body_example; // String |
        try {
            apiInstance.createNetworkInstance(version, serviceInstanceId, body);
        } catch (ApiException e) {
            System.err.println("Exception when calling OnapsoinfraserviceInstantiationApi#createNetworkInstance");
            e.printStackTrace();
        }
    }
}</code></pre>
                                </div>
                                <!--
  <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-createNetworkInstance-0-groovy">
  <pre class="prettyprint language-json prettyprinted" data-type="json"><code>Coming Soon!</code></pre>
  </div> -->
                                <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-createNetworkInstance-0-objc">
                              <pre class="prettyprint"><code class="language-cpp">String *version = version_example; //
String *serviceInstanceId = serviceInstanceId_example; //
String *body = body_example; //  (optional)

OnapsoinfraserviceInstantiationApi *apiInstance = [[OnapsoinfraserviceInstantiationApi alloc] init];

// Create NetworkInstance on a specified version and serviceInstance
[apiInstance createNetworkInstanceWith:version
    serviceInstanceId:serviceInstanceId
    body:body
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-createNetworkInstance-0-javascript">
                              <pre class="prettyprint"><code class="language-js">var SoGuilinApIs = require('so_guilin_ap_is');

var api = new SoGuilinApIs.OnapsoinfraserviceInstantiationApi()

var version = version_example; // {String}

var serviceInstanceId = serviceInstanceId_example; // {String}

var opts = {
  'body': body_example // {String}
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.createNetworkInstance(version, serviceInstanceId, opts, callback);
</code></pre>
                                </div>

                                <!--<div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-createNetworkInstance-0-angular">
              <pre class="prettyprint language-json prettyprinted" data-type="json"><code>Coming Soon!</code></pre>
            </div>-->
                                <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-createNetworkInstance-0-csharp">
                              <pre class="prettyprint"><code class="language-cs">using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class createNetworkInstanceExample
    {
        public void main()
        {

            var apiInstance = new OnapsoinfraserviceInstantiationApi();
            var version = version_example;  // String |
            var serviceInstanceId = serviceInstanceId_example;  // String |
            var body = body_example;  // String |  (optional)

            try
            {
                // Create NetworkInstance on a specified version and serviceInstance
                apiInstance.createNetworkInstance(version, serviceInstanceId, body);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling OnapsoinfraserviceInstantiationApi.createNetworkInstance: " + e.Message );
            }
        }
    }
}
</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-createNetworkInstance-0-php">
                              <pre class="prettyprint"><code class="language-php"><&#63;php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\OnapsoinfraserviceInstantiationApi();
$version = version_example; // String |
$serviceInstanceId = serviceInstanceId_example; // String |
$body = body_example; // String |

try {
    $api_instance->createNetworkInstance($version, $serviceInstanceId, $body);
} catch (Exception $e) {
    echo 'Exception when calling OnapsoinfraserviceInstantiationApi->createNetworkInstance: ', $e->getMessage(), PHP_EOL;
}
?></code></pre>
                                </div>

                                <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-createNetworkInstance-0-perl">
                              <pre class="prettyprint"><code class="language-perl">use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::OnapsoinfraserviceInstantiationApi;

my $api_instance = WWW::SwaggerClient::OnapsoinfraserviceInstantiationApi->new();
my $version = version_example; # String |
my $serviceInstanceId = serviceInstanceId_example; # String |
my $body = WWW::SwaggerClient::Object::String->new(); # String |

eval {
    $api_instance->createNetworkInstance(version => $version, serviceInstanceId => $serviceInstanceId, body => $body);
};
if ($@) {
    warn "Exception when calling OnapsoinfraserviceInstantiationApi->createNetworkInstance: $@\n";
}</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-createNetworkInstance-0-python">
                              <pre class="prettyprint"><code class="language-python">from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.OnapsoinfraserviceInstantiationApi()
version = version_example # String |
serviceInstanceId = serviceInstanceId_example # String |
body = body_example # String |  (optional)

try:
    # Create NetworkInstance on a specified version and serviceInstance
    api_instance.create_network_instance(version, serviceInstanceId, body=body)
except ApiException as e:
    print("Exception when calling OnapsoinfraserviceInstantiationApi->createNetworkInstance: %s\n" % e)</code></pre>
                                </div>
                            </div>

                            <h2>Parameters</h2>

                            <div class="methodsubtabletitle">Path parameters</div>
                            <table id="methodsubtable">
                                <tr>
                                    <th width="150px">Name</th>
                                    <th>Description</th>
                                </tr>
                                <tr><td style="width:150px;">version*</td>
                                    <td>


                                        <div id="d2e199_createNetworkInstance_version">
                                            <div class="json-schema-view">
                                                <div class="primitive">
                <span class="type">
                    String
                </span>

                                                </div>
                                                <div class="inner required">
                                                    Required
                                                </div>
                                            </div>
                                        </div>
                                    </td>
                                </tr>

                                <tr><td style="width:150px;">serviceInstanceId*</td>
                                    <td>


                                        <div id="d2e199_createNetworkInstance_serviceInstanceId">
                                            <div class="json-schema-view">
                                                <div class="primitive">
                <span class="type">
                    String
                </span>

                                                </div>
                                                <div class="inner required">
                                                    Required
                                                </div>
                                            </div>
                                        </div>
                                    </td>
                                </tr>

                            </table>


                            <div class="methodsubtabletitle">Body parameters</div>
                            <table id="methodsubtable">
                                <tr>
                                    <th width="150px">Name</th>
                                    <th>Description</th>
                                </tr>
                                <tr><td style="width:150px;">body </td>
                                    <td>


                                        <script>
$(document).ready(function() {
  var schemaWrapper = {
  "in" : "body",
  "name" : "body",
  "required" : false,
  "schema" : {
    "type" : "string"
  }
};
  var schema = schemaWrapper.schema;
  if (schema.$ref != null) {
    schema = defsParser.$refs.get(schema.$ref);
  } else {
    schemaWrapper.definitions = Object.assign({}, defs);
    $RefParser.dereference(schemaWrapper).catch(function(err) {
      console.log(err);
    });
  }

  var view = new JSONSchemaView(schema,2,{isBodyParam: true});
  var result = $('#d2e199_createNetworkInstance_body');
  result.empty();
  result.append(view.render());
});
</script>
                                        <div id="d2e199_createNetworkInstance_body"></div>
                                    </td>
                                </tr>

                            </table>



                            <h2>Responses</h2>
                            <h3> Status: default - successful operation </h3>

                            <ul class="nav nav-tabs nav-tabs-examples" >
                            </ul>

                            <div class="tab-content" style='margin-bottom: 10px;'>
                            </div>

                        </article>
                    </div>
                    <hr>
                    <div id="api-OnapsoinfraserviceInstantiation-createPortConfiguration">
                        <article id="api-OnapsoinfraserviceInstantiation-createPortConfiguration-0" data-group="User" data-name="createPortConfiguration" data-version="0">
                            <div class="pull-left">
                                <h1>createPortConfiguration</h1>
                                <p>Create Port Mirroring Configuration</p>
                            </div>
                            <div class="pull-right"></div>
                            <div class="clearfix"></div>
                            <p></p>
                            <p class="marked"></p>
                            <p></p>
                            <br />
                            <pre class="prettyprint language-html prettyprinted" data-type="post"><code><span class="pln">/onap/so/infra/serviceInstantiation/{version}/serviceInstances/{serviceInstanceId}/configurations</span></code></pre>
                            <p>
                            <h3>Usage and SDK Samples</h3>
                            </p>
                            <ul class="nav nav-tabs nav-tabs-examples">
                                <li class="active"><a href="#examples-OnapsoinfraserviceInstantiation-createPortConfiguration-0-curl">Curl</a></li>
                                <li class=""><a href="#examples-OnapsoinfraserviceInstantiation-createPortConfiguration-0-java">Java</a></li>
                                <li class=""><a href="#examples-OnapsoinfraserviceInstantiation-createPortConfiguration-0-android">Android</a></li>
                                <!--<li class=""><a href="#examples-OnapsoinfraserviceInstantiation-createPortConfiguration-0-groovy">Groovy</a></li>-->
                                <li class=""><a href="#examples-OnapsoinfraserviceInstantiation-createPortConfiguration-0-objc">Obj-C</a></li>
                                <li class=""><a href="#examples-OnapsoinfraserviceInstantiation-createPortConfiguration-0-javascript">JavaScript</a></li>
                                <!--<li class=""><a href="#examples-OnapsoinfraserviceInstantiation-createPortConfiguration-0-angular">Angular</a></li>-->
                                <li class=""><a href="#examples-OnapsoinfraserviceInstantiation-createPortConfiguration-0-csharp">C#</a></li>
                                <li class=""><a href="#examples-OnapsoinfraserviceInstantiation-createPortConfiguration-0-php">PHP</a></li>
                                <li class=""><a href="#examples-OnapsoinfraserviceInstantiation-createPortConfiguration-0-perl">Perl</a></li>
                                <li class=""><a href="#examples-OnapsoinfraserviceInstantiation-createPortConfiguration-0-python">Python</a></li>
                            </ul>

                            <div class="tab-content">
                                <div class="tab-pane active" id="examples-OnapsoinfraserviceInstantiation-createPortConfiguration-0-curl">
                                    <pre class="prettyprint"><code class="language-bsh">curl -X POST "http://localhost/onap/so/infra/serviceInstantiation/{version}/serviceInstances/{serviceInstanceId}/configurations"</code></pre>
                                </div>
                                <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-createPortConfiguration-0-java">
                            <pre class="prettyprint"><code class="language-java">import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.OnapsoinfraserviceInstantiationApi;

import java.io.File;
import java.util.*;

public class OnapsoinfraserviceInstantiationApiExample {

    public static void main(String[] args) {

        OnapsoinfraserviceInstantiationApi apiInstance = new OnapsoinfraserviceInstantiationApi();
        String version = version_example; // String |
        String serviceInstanceId = serviceInstanceId_example; // String |
        String body = body_example; // String |
        try {
            apiInstance.createPortConfiguration(version, serviceInstanceId, body);
        } catch (ApiException e) {
            System.err.println("Exception when calling OnapsoinfraserviceInstantiationApi#createPortConfiguration");
            e.printStackTrace();
        }
    }
}</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-createPortConfiguration-0-android">
                            <pre class="prettyprint"><code class="language-java">import io.swagger.client.api.OnapsoinfraserviceInstantiationApi;

public class OnapsoinfraserviceInstantiationApiExample {

    public static void main(String[] args) {
        OnapsoinfraserviceInstantiationApi apiInstance = new OnapsoinfraserviceInstantiationApi();
        String version = version_example; // String |
        String serviceInstanceId = serviceInstanceId_example; // String |
        String body = body_example; // String |
        try {
            apiInstance.createPortConfiguration(version, serviceInstanceId, body);
        } catch (ApiException e) {
            System.err.println("Exception when calling OnapsoinfraserviceInstantiationApi#createPortConfiguration");
            e.printStackTrace();
        }
    }
}</code></pre>
                                </div>
                                <!--
  <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-createPortConfiguration-0-groovy">
  <pre class="prettyprint language-json prettyprinted" data-type="json"><code>Coming Soon!</code></pre>
  </div> -->
                                <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-createPortConfiguration-0-objc">
                              <pre class="prettyprint"><code class="language-cpp">String *version = version_example; //
String *serviceInstanceId = serviceInstanceId_example; //
String *body = body_example; //  (optional)

OnapsoinfraserviceInstantiationApi *apiInstance = [[OnapsoinfraserviceInstantiationApi alloc] init];

// Create Port Mirroring Configuration
[apiInstance createPortConfigurationWith:version
    serviceInstanceId:serviceInstanceId
    body:body
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-createPortConfiguration-0-javascript">
                              <pre class="prettyprint"><code class="language-js">var SoGuilinApIs = require('so_guilin_ap_is');

var api = new SoGuilinApIs.OnapsoinfraserviceInstantiationApi()

var version = version_example; // {String}

var serviceInstanceId = serviceInstanceId_example; // {String}

var opts = {
  'body': body_example // {String}
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.createPortConfiguration(version, serviceInstanceId, opts, callback);
</code></pre>
                                </div>

                                <!--<div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-createPortConfiguration-0-angular">
              <pre class="prettyprint language-json prettyprinted" data-type="json"><code>Coming Soon!</code></pre>
            </div>-->
                                <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-createPortConfiguration-0-csharp">
                              <pre class="prettyprint"><code class="language-cs">using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class createPortConfigurationExample
    {
        public void main()
        {

            var apiInstance = new OnapsoinfraserviceInstantiationApi();
            var version = version_example;  // String |
            var serviceInstanceId = serviceInstanceId_example;  // String |
            var body = body_example;  // String |  (optional)

            try
            {
                // Create Port Mirroring Configuration
                apiInstance.createPortConfiguration(version, serviceInstanceId, body);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling OnapsoinfraserviceInstantiationApi.createPortConfiguration: " + e.Message );
            }
        }
    }
}
</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-createPortConfiguration-0-php">
                              <pre class="prettyprint"><code class="language-php"><&#63;php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\OnapsoinfraserviceInstantiationApi();
$version = version_example; // String |
$serviceInstanceId = serviceInstanceId_example; // String |
$body = body_example; // String |

try {
    $api_instance->createPortConfiguration($version, $serviceInstanceId, $body);
} catch (Exception $e) {
    echo 'Exception when calling OnapsoinfraserviceInstantiationApi->createPortConfiguration: ', $e->getMessage(), PHP_EOL;
}
?></code></pre>
                                </div>

                                <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-createPortConfiguration-0-perl">
                              <pre class="prettyprint"><code class="language-perl">use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::OnapsoinfraserviceInstantiationApi;

my $api_instance = WWW::SwaggerClient::OnapsoinfraserviceInstantiationApi->new();
my $version = version_example; # String |
my $serviceInstanceId = serviceInstanceId_example; # String |
my $body = WWW::SwaggerClient::Object::String->new(); # String |

eval {
    $api_instance->createPortConfiguration(version => $version, serviceInstanceId => $serviceInstanceId, body => $body);
};
if ($@) {
    warn "Exception when calling OnapsoinfraserviceInstantiationApi->createPortConfiguration: $@\n";
}</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-createPortConfiguration-0-python">
                              <pre class="prettyprint"><code class="language-python">from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.OnapsoinfraserviceInstantiationApi()
version = version_example # String |
serviceInstanceId = serviceInstanceId_example # String |
body = body_example # String |  (optional)

try:
    # Create Port Mirroring Configuration
    api_instance.create_port_configuration(version, serviceInstanceId, body=body)
except ApiException as e:
    print("Exception when calling OnapsoinfraserviceInstantiationApi->createPortConfiguration: %s\n" % e)</code></pre>
                                </div>
                            </div>

                            <h2>Parameters</h2>

                            <div class="methodsubtabletitle">Path parameters</div>
                            <table id="methodsubtable">
                                <tr>
                                    <th width="150px">Name</th>
                                    <th>Description</th>
                                </tr>
                                <tr><td style="width:150px;">version*</td>
                                    <td>


                                        <div id="d2e199_createPortConfiguration_version">
                                            <div class="json-schema-view">
                                                <div class="primitive">
                <span class="type">
                    String
                </span>

                                                </div>
                                                <div class="inner required">
                                                    Required
                                                </div>
                                            </div>
                                        </div>
                                    </td>
                                </tr>

                                <tr><td style="width:150px;">serviceInstanceId*</td>
                                    <td>


                                        <div id="d2e199_createPortConfiguration_serviceInstanceId">
                                            <div class="json-schema-view">
                                                <div class="primitive">
                <span class="type">
                    String
                </span>

                                                </div>
                                                <div class="inner required">
                                                    Required
                                                </div>
                                            </div>
                                        </div>
                                    </td>
                                </tr>

                            </table>


                            <div class="methodsubtabletitle">Body parameters</div>
                            <table id="methodsubtable">
                                <tr>
                                    <th width="150px">Name</th>
                                    <th>Description</th>
                                </tr>
                                <tr><td style="width:150px;">body </td>
                                    <td>


                                        <script>
$(document).ready(function() {
  var schemaWrapper = {
  "in" : "body",
  "name" : "body",
  "required" : false,
  "schema" : {
    "type" : "string"
  }
};
  var schema = schemaWrapper.schema;
  if (schema.$ref != null) {
    schema = defsParser.$refs.get(schema.$ref);
  } else {
    schemaWrapper.definitions = Object.assign({}, defs);
    $RefParser.dereference(schemaWrapper).catch(function(err) {
      console.log(err);
    });
  }

  var view = new JSONSchemaView(schema,2,{isBodyParam: true});
  var result = $('#d2e199_createPortConfiguration_body');
  result.empty();
  result.append(view.render());
});
</script>
                                        <div id="d2e199_createPortConfiguration_body"></div>
                                    </td>
                                </tr>

                            </table>



                            <h2>Responses</h2>
                            <h3> Status: default - successful operation </h3>

                            <ul class="nav nav-tabs nav-tabs-examples" >
                            </ul>

                            <div class="tab-content" style='margin-bottom: 10px;'>
                            </div>

                        </article>
                    </div>
                    <hr>
                    <div id="api-OnapsoinfraserviceInstantiation-createServiceInstance">
                        <article id="api-OnapsoinfraserviceInstantiation-createServiceInstance-0" data-group="User" data-name="createServiceInstance" data-version="0">
                            <div class="pull-left">
                                <h1>createServiceInstance</h1>
                                <p>Create a Service Instance on a version provided</p>
                            </div>
                            <div class="pull-right"></div>
                            <div class="clearfix"></div>
                            <p></p>
                            <p class="marked"></p>
                            <p></p>
                            <br />
                            <pre class="prettyprint language-html prettyprinted" data-type="post"><code><span class="pln">/onap/so/infra/serviceInstantiation/{version}/serviceInstances</span></code></pre>
                            <p>
                            <h3>Usage and SDK Samples</h3>
                            </p>
                            <ul class="nav nav-tabs nav-tabs-examples">
                                <li class="active"><a href="#examples-OnapsoinfraserviceInstantiation-createServiceInstance-0-curl">Curl</a></li>
                                <li class=""><a href="#examples-OnapsoinfraserviceInstantiation-createServiceInstance-0-java">Java</a></li>
                                <li class=""><a href="#examples-OnapsoinfraserviceInstantiation-createServiceInstance-0-android">Android</a></li>
                                <!--<li class=""><a href="#examples-OnapsoinfraserviceInstantiation-createServiceInstance-0-groovy">Groovy</a></li>-->
                                <li class=""><a href="#examples-OnapsoinfraserviceInstantiation-createServiceInstance-0-objc">Obj-C</a></li>
                                <li class=""><a href="#examples-OnapsoinfraserviceInstantiation-createServiceInstance-0-javascript">JavaScript</a></li>
                                <!--<li class=""><a href="#examples-OnapsoinfraserviceInstantiation-createServiceInstance-0-angular">Angular</a></li>-->
                                <li class=""><a href="#examples-OnapsoinfraserviceInstantiation-createServiceInstance-0-csharp">C#</a></li>
                                <li class=""><a href="#examples-OnapsoinfraserviceInstantiation-createServiceInstance-0-php">PHP</a></li>
                                <li class=""><a href="#examples-OnapsoinfraserviceInstantiation-createServiceInstance-0-perl">Perl</a></li>
                                <li class=""><a href="#examples-OnapsoinfraserviceInstantiation-createServiceInstance-0-python">Python</a></li>
                            </ul>

                            <div class="tab-content">
                                <div class="tab-pane active" id="examples-OnapsoinfraserviceInstantiation-createServiceInstance-0-curl">
                                    <pre class="prettyprint"><code class="language-bsh">curl -X POST "http://localhost/onap/so/infra/serviceInstantiation/{version}/serviceInstances"</code></pre>
                                </div>
                                <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-createServiceInstance-0-java">
                            <pre class="prettyprint"><code class="language-java">import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.OnapsoinfraserviceInstantiationApi;

import java.io.File;
import java.util.*;

public class OnapsoinfraserviceInstantiationApiExample {

    public static void main(String[] args) {

        OnapsoinfraserviceInstantiationApi apiInstance = new OnapsoinfraserviceInstantiationApi();
        String version = version_example; // String |
        String body = body_example; // String |
        try {
            apiInstance.createServiceInstance(version, body);
        } catch (ApiException e) {
            System.err.println("Exception when calling OnapsoinfraserviceInstantiationApi#createServiceInstance");
            e.printStackTrace();
        }
    }
}</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-createServiceInstance-0-android">
                            <pre class="prettyprint"><code class="language-java">import io.swagger.client.api.OnapsoinfraserviceInstantiationApi;

public class OnapsoinfraserviceInstantiationApiExample {

    public static void main(String[] args) {
        OnapsoinfraserviceInstantiationApi apiInstance = new OnapsoinfraserviceInstantiationApi();
        String version = version_example; // String |
        String body = body_example; // String |
        try {
            apiInstance.createServiceInstance(version, body);
        } catch (ApiException e) {
            System.err.println("Exception when calling OnapsoinfraserviceInstantiationApi#createServiceInstance");
            e.printStackTrace();
        }
    }
}</code></pre>
                                </div>
                                <!--
  <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-createServiceInstance-0-groovy">
  <pre class="prettyprint language-json prettyprinted" data-type="json"><code>Coming Soon!</code></pre>
  </div> -->
                                <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-createServiceInstance-0-objc">
                              <pre class="prettyprint"><code class="language-cpp">String *version = version_example; //
String *body = body_example; //  (optional)

OnapsoinfraserviceInstantiationApi *apiInstance = [[OnapsoinfraserviceInstantiationApi alloc] init];

// Create a Service Instance on a version provided
[apiInstance createServiceInstanceWith:version
    body:body
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-createServiceInstance-0-javascript">
                              <pre class="prettyprint"><code class="language-js">var SoGuilinApIs = require('so_guilin_ap_is');

var api = new SoGuilinApIs.OnapsoinfraserviceInstantiationApi()

var version = version_example; // {String}

var opts = {
  'body': body_example // {String}
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.createServiceInstance(version, opts, callback);
</code></pre>
                                </div>

                                <!--<div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-createServiceInstance-0-angular">
              <pre class="prettyprint language-json prettyprinted" data-type="json"><code>Coming Soon!</code></pre>
            </div>-->
                                <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-createServiceInstance-0-csharp">
                              <pre class="prettyprint"><code class="language-cs">using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class createServiceInstanceExample
    {
        public void main()
        {

            var apiInstance = new OnapsoinfraserviceInstantiationApi();
            var version = version_example;  // String |
            var body = body_example;  // String |  (optional)

            try
            {
                // Create a Service Instance on a version provided
                apiInstance.createServiceInstance(version, body);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling OnapsoinfraserviceInstantiationApi.createServiceInstance: " + e.Message );
            }
        }
    }
}
</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-createServiceInstance-0-php">
                              <pre class="prettyprint"><code class="language-php"><&#63;php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\OnapsoinfraserviceInstantiationApi();
$version = version_example; // String |
$body = body_example; // String |

try {
    $api_instance->createServiceInstance($version, $body);
} catch (Exception $e) {
    echo 'Exception when calling OnapsoinfraserviceInstantiationApi->createServiceInstance: ', $e->getMessage(), PHP_EOL;
}
?></code></pre>
                                </div>

                                <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-createServiceInstance-0-perl">
                              <pre class="prettyprint"><code class="language-perl">use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::OnapsoinfraserviceInstantiationApi;

my $api_instance = WWW::SwaggerClient::OnapsoinfraserviceInstantiationApi->new();
my $version = version_example; # String |
my $body = WWW::SwaggerClient::Object::String->new(); # String |

eval {
    $api_instance->createServiceInstance(version => $version, body => $body);
};
if ($@) {
    warn "Exception when calling OnapsoinfraserviceInstantiationApi->createServiceInstance: $@\n";
}</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-createServiceInstance-0-python">
                              <pre class="prettyprint"><code class="language-python">from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.OnapsoinfraserviceInstantiationApi()
version = version_example # String |
body = body_example # String |  (optional)

try:
    # Create a Service Instance on a version provided
    api_instance.create_service_instance(version, body=body)
except ApiException as e:
    print("Exception when calling OnapsoinfraserviceInstantiationApi->createServiceInstance: %s\n" % e)</code></pre>
                                </div>
                            </div>

                            <h2>Parameters</h2>

                            <div class="methodsubtabletitle">Path parameters</div>
                            <table id="methodsubtable">
                                <tr>
                                    <th width="150px">Name</th>
                                    <th>Description</th>
                                </tr>
                                <tr><td style="width:150px;">version*</td>
                                    <td>


                                        <div id="d2e199_createServiceInstance_version">
                                            <div class="json-schema-view">
                                                <div class="primitive">
                <span class="type">
                    String
                </span>

                                                </div>
                                                <div class="inner required">
                                                    Required
                                                </div>
                                            </div>
                                        </div>
                                    </td>
                                </tr>

                            </table>


                            <div class="methodsubtabletitle">Body parameters</div>
                            <table id="methodsubtable">
                                <tr>
                                    <th width="150px">Name</th>
                                    <th>Description</th>
                                </tr>
                                <tr><td style="width:150px;">body </td>
                                    <td>


                                        <script>
$(document).ready(function() {
  var schemaWrapper = {
  "in" : "body",
  "name" : "body",
  "required" : false,
  "schema" : {
    "type" : "string"
  }
};
  var schema = schemaWrapper.schema;
  if (schema.$ref != null) {
    schema = defsParser.$refs.get(schema.$ref);
  } else {
    schemaWrapper.definitions = Object.assign({}, defs);
    $RefParser.dereference(schemaWrapper).catch(function(err) {
      console.log(err);
    });
  }

  var view = new JSONSchemaView(schema,2,{isBodyParam: true});
  var result = $('#d2e199_createServiceInstance_body');
  result.empty();
  result.append(view.render());
});
</script>
                                        <div id="d2e199_createServiceInstance_body"></div>
                                    </td>
                                </tr>

                            </table>



                            <h2>Responses</h2>
                            <h3> Status: default - successful operation </h3>

                            <ul class="nav nav-tabs nav-tabs-examples" >
                            </ul>

                            <div class="tab-content" style='margin-bottom: 10px;'>
                            </div>

                        </article>
                    </div>
                    <hr>
                    <div id="api-OnapsoinfraserviceInstantiation-createVfModuleInstance">
                        <article id="api-OnapsoinfraserviceInstantiation-createVfModuleInstance-0" data-group="User" data-name="createVfModuleInstance" data-version="0">
                            <div class="pull-left">
                                <h1>createVfModuleInstance</h1>
                                <p>Create VfModule on a specified version, serviceInstance and vnfInstance</p>
                            </div>
                            <div class="pull-right"></div>
                            <div class="clearfix"></div>
                            <p></p>
                            <p class="marked"></p>
                            <p></p>
                            <br />
                            <pre class="prettyprint language-html prettyprinted" data-type="post"><code><span class="pln">/onap/so/infra/serviceInstantiation/{version}/serviceInstances/{serviceInstanceId}/vnfs/{vnfInstanceId}/vfModules</span></code></pre>
                            <p>
                            <h3>Usage and SDK Samples</h3>
                            </p>
                            <ul class="nav nav-tabs nav-tabs-examples">
                                <li class="active"><a href="#examples-OnapsoinfraserviceInstantiation-createVfModuleInstance-0-curl">Curl</a></li>
                                <li class=""><a href="#examples-OnapsoinfraserviceInstantiation-createVfModuleInstance-0-java">Java</a></li>
                                <li class=""><a href="#examples-OnapsoinfraserviceInstantiation-createVfModuleInstance-0-android">Android</a></li>
                                <!--<li class=""><a href="#examples-OnapsoinfraserviceInstantiation-createVfModuleInstance-0-groovy">Groovy</a></li>-->
                                <li class=""><a href="#examples-OnapsoinfraserviceInstantiation-createVfModuleInstance-0-objc">Obj-C</a></li>
                                <li class=""><a href="#examples-OnapsoinfraserviceInstantiation-createVfModuleInstance-0-javascript">JavaScript</a></li>
                                <!--<li class=""><a href="#examples-OnapsoinfraserviceInstantiation-createVfModuleInstance-0-angular">Angular</a></li>-->
                                <li class=""><a href="#examples-OnapsoinfraserviceInstantiation-createVfModuleInstance-0-csharp">C#</a></li>
                                <li class=""><a href="#examples-OnapsoinfraserviceInstantiation-createVfModuleInstance-0-php">PHP</a></li>
                                <li class=""><a href="#examples-OnapsoinfraserviceInstantiation-createVfModuleInstance-0-perl">Perl</a></li>
                                <li class=""><a href="#examples-OnapsoinfraserviceInstantiation-createVfModuleInstance-0-python">Python</a></li>
                            </ul>

                            <div class="tab-content">
                                <div class="tab-pane active" id="examples-OnapsoinfraserviceInstantiation-createVfModuleInstance-0-curl">
                                    <pre class="prettyprint"><code class="language-bsh">curl -X POST "http://localhost/onap/so/infra/serviceInstantiation/{version}/serviceInstances/{serviceInstanceId}/vnfs/{vnfInstanceId}/vfModules"</code></pre>
                                </div>
                                <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-createVfModuleInstance-0-java">
                            <pre class="prettyprint"><code class="language-java">import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.OnapsoinfraserviceInstantiationApi;

import java.io.File;
import java.util.*;

public class OnapsoinfraserviceInstantiationApiExample {

    public static void main(String[] args) {

        OnapsoinfraserviceInstantiationApi apiInstance = new OnapsoinfraserviceInstantiationApi();
        String version = version_example; // String |
        String serviceInstanceId = serviceInstanceId_example; // String |
        String vnfInstanceId = vnfInstanceId_example; // String |
        String body = body_example; // String |
        try {
            apiInstance.createVfModuleInstance(version, serviceInstanceId, vnfInstanceId, body);
        } catch (ApiException e) {
            System.err.println("Exception when calling OnapsoinfraserviceInstantiationApi#createVfModuleInstance");
            e.printStackTrace();
        }
    }
}</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-createVfModuleInstance-0-android">
                            <pre class="prettyprint"><code class="language-java">import io.swagger.client.api.OnapsoinfraserviceInstantiationApi;

public class OnapsoinfraserviceInstantiationApiExample {

    public static void main(String[] args) {
        OnapsoinfraserviceInstantiationApi apiInstance = new OnapsoinfraserviceInstantiationApi();
        String version = version_example; // String |
        String serviceInstanceId = serviceInstanceId_example; // String |
        String vnfInstanceId = vnfInstanceId_example; // String |
        String body = body_example; // String |
        try {
            apiInstance.createVfModuleInstance(version, serviceInstanceId, vnfInstanceId, body);
        } catch (ApiException e) {
            System.err.println("Exception when calling OnapsoinfraserviceInstantiationApi#createVfModuleInstance");
            e.printStackTrace();
        }
    }
}</code></pre>
                                </div>
                                <!--
  <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-createVfModuleInstance-0-groovy">
  <pre class="prettyprint language-json prettyprinted" data-type="json"><code>Coming Soon!</code></pre>
  </div> -->
                                <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-createVfModuleInstance-0-objc">
                              <pre class="prettyprint"><code class="language-cpp">String *version = version_example; //
String *serviceInstanceId = serviceInstanceId_example; //
String *vnfInstanceId = vnfInstanceId_example; //
String *body = body_example; //  (optional)

OnapsoinfraserviceInstantiationApi *apiInstance = [[OnapsoinfraserviceInstantiationApi alloc] init];

// Create VfModule on a specified version, serviceInstance and vnfInstance
[apiInstance createVfModuleInstanceWith:version
    serviceInstanceId:serviceInstanceId
    vnfInstanceId:vnfInstanceId
    body:body
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-createVfModuleInstance-0-javascript">
                              <pre class="prettyprint"><code class="language-js">var SoGuilinApIs = require('so_guilin_ap_is');

var api = new SoGuilinApIs.OnapsoinfraserviceInstantiationApi()

var version = version_example; // {String}

var serviceInstanceId = serviceInstanceId_example; // {String}

var vnfInstanceId = vnfInstanceId_example; // {String}

var opts = {
  'body': body_example // {String}
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.createVfModuleInstance(version, serviceInstanceId, vnfInstanceId, opts, callback);
</code></pre>
                                </div>

                                <!--<div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-createVfModuleInstance-0-angular">
              <pre class="prettyprint language-json prettyprinted" data-type="json"><code>Coming Soon!</code></pre>
            </div>-->
                                <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-createVfModuleInstance-0-csharp">
                              <pre class="prettyprint"><code class="language-cs">using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class createVfModuleInstanceExample
    {
        public void main()
        {

            var apiInstance = new OnapsoinfraserviceInstantiationApi();
            var version = version_example;  // String |
            var serviceInstanceId = serviceInstanceId_example;  // String |
            var vnfInstanceId = vnfInstanceId_example;  // String |
            var body = body_example;  // String |  (optional)

            try
            {
                // Create VfModule on a specified version, serviceInstance and vnfInstance
                apiInstance.createVfModuleInstance(version, serviceInstanceId, vnfInstanceId, body);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling OnapsoinfraserviceInstantiationApi.createVfModuleInstance: " + e.Message );
            }
        }
    }
}
</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-createVfModuleInstance-0-php">
                              <pre class="prettyprint"><code class="language-php"><&#63;php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\OnapsoinfraserviceInstantiationApi();
$version = version_example; // String |
$serviceInstanceId = serviceInstanceId_example; // String |
$vnfInstanceId = vnfInstanceId_example; // String |
$body = body_example; // String |

try {
    $api_instance->createVfModuleInstance($version, $serviceInstanceId, $vnfInstanceId, $body);
} catch (Exception $e) {
    echo 'Exception when calling OnapsoinfraserviceInstantiationApi->createVfModuleInstance: ', $e->getMessage(), PHP_EOL;
}
?></code></pre>
                                </div>

                                <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-createVfModuleInstance-0-perl">
                              <pre class="prettyprint"><code class="language-perl">use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::OnapsoinfraserviceInstantiationApi;

my $api_instance = WWW::SwaggerClient::OnapsoinfraserviceInstantiationApi->new();
my $version = version_example; # String |
my $serviceInstanceId = serviceInstanceId_example; # String |
my $vnfInstanceId = vnfInstanceId_example; # String |
my $body = WWW::SwaggerClient::Object::String->new(); # String |

eval {
    $api_instance->createVfModuleInstance(version => $version, serviceInstanceId => $serviceInstanceId, vnfInstanceId => $vnfInstanceId, body => $body);
};
if ($@) {
    warn "Exception when calling OnapsoinfraserviceInstantiationApi->createVfModuleInstance: $@\n";
}</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-createVfModuleInstance-0-python">
                              <pre class="prettyprint"><code class="language-python">from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.OnapsoinfraserviceInstantiationApi()
version = version_example # String |
serviceInstanceId = serviceInstanceId_example # String |
vnfInstanceId = vnfInstanceId_example # String |
body = body_example # String |  (optional)

try:
    # Create VfModule on a specified version, serviceInstance and vnfInstance
    api_instance.create_vf_module_instance(version, serviceInstanceId, vnfInstanceId, body=body)
except ApiException as e:
    print("Exception when calling OnapsoinfraserviceInstantiationApi->createVfModuleInstance: %s\n" % e)</code></pre>
                                </div>
                            </div>

                            <h2>Parameters</h2>

                            <div class="methodsubtabletitle">Path parameters</div>
                            <table id="methodsubtable">
                                <tr>
                                    <th width="150px">Name</th>
                                    <th>Description</th>
                                </tr>
                                <tr><td style="width:150px;">version*</td>
                                    <td>


                                        <div id="d2e199_createVfModuleInstance_version">
                                            <div class="json-schema-view">
                                                <div class="primitive">
                <span class="type">
                    String
                </span>

                                                </div>
                                                <div class="inner required">
                                                    Required
                                                </div>
                                            </div>
                                        </div>
                                    </td>
                                </tr>

                                <tr><td style="width:150px;">serviceInstanceId*</td>
                                    <td>


                                        <div id="d2e199_createVfModuleInstance_serviceInstanceId">
                                            <div class="json-schema-view">
                                                <div class="primitive">
                <span class="type">
                    String
                </span>

                                                </div>
                                                <div class="inner required">
                                                    Required
                                                </div>
                                            </div>
                                        </div>
                                    </td>
                                </tr>

                                <tr><td style="width:150px;">vnfInstanceId*</td>
                                    <td>


                                        <div id="d2e199_createVfModuleInstance_vnfInstanceId">
                                            <div class="json-schema-view">
                                                <div class="primitive">
                <span class="type">
                    String
                </span>

                                                </div>
                                                <div class="inner required">
                                                    Required
                                                </div>
                                            </div>
                                        </div>
                                    </td>
                                </tr>

                            </table>


                            <div class="methodsubtabletitle">Body parameters</div>
                            <table id="methodsubtable">
                                <tr>
                                    <th width="150px">Name</th>
                                    <th>Description</th>
                                </tr>
                                <tr><td style="width:150px;">body </td>
                                    <td>


                                        <script>
$(document).ready(function() {
  var schemaWrapper = {
  "in" : "body",
  "name" : "body",
  "required" : false,
  "schema" : {
    "type" : "string"
  }
};
  var schema = schemaWrapper.schema;
  if (schema.$ref != null) {
    schema = defsParser.$refs.get(schema.$ref);
  } else {
    schemaWrapper.definitions = Object.assign({}, defs);
    $RefParser.dereference(schemaWrapper).catch(function(err) {
      console.log(err);
    });
  }

  var view = new JSONSchemaView(schema,2,{isBodyParam: true});
  var result = $('#d2e199_createVfModuleInstance_body');
  result.empty();
  result.append(view.render());
});
</script>
                                        <div id="d2e199_createVfModuleInstance_body"></div>
                                    </td>
                                </tr>

                            </table>



                            <h2>Responses</h2>
                            <h3> Status: default - successful operation </h3>

                            <ul class="nav nav-tabs nav-tabs-examples" >
                            </ul>

                            <div class="tab-content" style='margin-bottom: 10px;'>
                            </div>

                        </article>
                    </div>
                    <hr>
                    <div id="api-OnapsoinfraserviceInstantiation-createVnfInstance">
                        <article id="api-OnapsoinfraserviceInstantiation-createVnfInstance-0" data-group="User" data-name="createVnfInstance" data-version="0">
                            <div class="pull-left">
                                <h1>createVnfInstance</h1>
                                <p>Create VNF on a specified version and serviceInstance</p>
                            </div>
                            <div class="pull-right"></div>
                            <div class="clearfix"></div>
                            <p></p>
                            <p class="marked"></p>
                            <p></p>
                            <br />
                            <pre class="prettyprint language-html prettyprinted" data-type="post"><code><span class="pln">/onap/so/infra/serviceInstantiation/{version}/serviceInstances/{serviceInstanceId}/vnfs</span></code></pre>
                            <p>
                            <h3>Usage and SDK Samples</h3>
                            </p>
                            <ul class="nav nav-tabs nav-tabs-examples">
                                <li class="active"><a href="#examples-OnapsoinfraserviceInstantiation-createVnfInstance-0-curl">Curl</a></li>
                                <li class=""><a href="#examples-OnapsoinfraserviceInstantiation-createVnfInstance-0-java">Java</a></li>
                                <li class=""><a href="#examples-OnapsoinfraserviceInstantiation-createVnfInstance-0-android">Android</a></li>
                                <!--<li class=""><a href="#examples-OnapsoinfraserviceInstantiation-createVnfInstance-0-groovy">Groovy</a></li>-->
                                <li class=""><a href="#examples-OnapsoinfraserviceInstantiation-createVnfInstance-0-objc">Obj-C</a></li>
                                <li class=""><a href="#examples-OnapsoinfraserviceInstantiation-createVnfInstance-0-javascript">JavaScript</a></li>
                                <!--<li class=""><a href="#examples-OnapsoinfraserviceInstantiation-createVnfInstance-0-angular">Angular</a></li>-->
                                <li class=""><a href="#examples-OnapsoinfraserviceInstantiation-createVnfInstance-0-csharp">C#</a></li>
                                <li class=""><a href="#examples-OnapsoinfraserviceInstantiation-createVnfInstance-0-php">PHP</a></li>
                                <li class=""><a href="#examples-OnapsoinfraserviceInstantiation-createVnfInstance-0-perl">Perl</a></li>
                                <li class=""><a href="#examples-OnapsoinfraserviceInstantiation-createVnfInstance-0-python">Python</a></li>
                            </ul>

                            <div class="tab-content">
                                <div class="tab-pane active" id="examples-OnapsoinfraserviceInstantiation-createVnfInstance-0-curl">
                                    <pre class="prettyprint"><code class="language-bsh">curl -X POST "http://localhost/onap/so/infra/serviceInstantiation/{version}/serviceInstances/{serviceInstanceId}/vnfs"</code></pre>
                                </div>
                                <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-createVnfInstance-0-java">
                            <pre class="prettyprint"><code class="language-java">import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.OnapsoinfraserviceInstantiationApi;

import java.io.File;
import java.util.*;

public class OnapsoinfraserviceInstantiationApiExample {

    public static void main(String[] args) {

        OnapsoinfraserviceInstantiationApi apiInstance = new OnapsoinfraserviceInstantiationApi();
        String version = version_example; // String |
        String serviceInstanceId = serviceInstanceId_example; // String |
        String body = body_example; // String |
        try {
            apiInstance.createVnfInstance(version, serviceInstanceId, body);
        } catch (ApiException e) {
            System.err.println("Exception when calling OnapsoinfraserviceInstantiationApi#createVnfInstance");
            e.printStackTrace();
        }
    }
}</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-createVnfInstance-0-android">
                            <pre class="prettyprint"><code class="language-java">import io.swagger.client.api.OnapsoinfraserviceInstantiationApi;

public class OnapsoinfraserviceInstantiationApiExample {

    public static void main(String[] args) {
        OnapsoinfraserviceInstantiationApi apiInstance = new OnapsoinfraserviceInstantiationApi();
        String version = version_example; // String |
        String serviceInstanceId = serviceInstanceId_example; // String |
        String body = body_example; // String |
        try {
            apiInstance.createVnfInstance(version, serviceInstanceId, body);
        } catch (ApiException e) {
            System.err.println("Exception when calling OnapsoinfraserviceInstantiationApi#createVnfInstance");
            e.printStackTrace();
        }
    }
}</code></pre>
                                </div>
                                <!--
  <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-createVnfInstance-0-groovy">
  <pre class="prettyprint language-json prettyprinted" data-type="json"><code>Coming Soon!</code></pre>
  </div> -->
                                <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-createVnfInstance-0-objc">
                              <pre class="prettyprint"><code class="language-cpp">String *version = version_example; //
String *serviceInstanceId = serviceInstanceId_example; //
String *body = body_example; //  (optional)

OnapsoinfraserviceInstantiationApi *apiInstance = [[OnapsoinfraserviceInstantiationApi alloc] init];

// Create VNF on a specified version and serviceInstance
[apiInstance createVnfInstanceWith:version
    serviceInstanceId:serviceInstanceId
    body:body
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-createVnfInstance-0-javascript">
                              <pre class="prettyprint"><code class="language-js">var SoGuilinApIs = require('so_guilin_ap_is');

var api = new SoGuilinApIs.OnapsoinfraserviceInstantiationApi()

var version = version_example; // {String}

var serviceInstanceId = serviceInstanceId_example; // {String}

var opts = {
  'body': body_example // {String}
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.createVnfInstance(version, serviceInstanceId, opts, callback);
</code></pre>
                                </div>

                                <!--<div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-createVnfInstance-0-angular">
              <pre class="prettyprint language-json prettyprinted" data-type="json"><code>Coming Soon!</code></pre>
            </div>-->
                                <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-createVnfInstance-0-csharp">
                              <pre class="prettyprint"><code class="language-cs">using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class createVnfInstanceExample
    {
        public void main()
        {

            var apiInstance = new OnapsoinfraserviceInstantiationApi();
            var version = version_example;  // String |
            var serviceInstanceId = serviceInstanceId_example;  // String |
            var body = body_example;  // String |  (optional)

            try
            {
                // Create VNF on a specified version and serviceInstance
                apiInstance.createVnfInstance(version, serviceInstanceId, body);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling OnapsoinfraserviceInstantiationApi.createVnfInstance: " + e.Message );
            }
        }
    }
}
</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-createVnfInstance-0-php">
                              <pre class="prettyprint"><code class="language-php"><&#63;php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\OnapsoinfraserviceInstantiationApi();
$version = version_example; // String |
$serviceInstanceId = serviceInstanceId_example; // String |
$body = body_example; // String |

try {
    $api_instance->createVnfInstance($version, $serviceInstanceId, $body);
} catch (Exception $e) {
    echo 'Exception when calling OnapsoinfraserviceInstantiationApi->createVnfInstance: ', $e->getMessage(), PHP_EOL;
}
?></code></pre>
                                </div>

                                <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-createVnfInstance-0-perl">
                              <pre class="prettyprint"><code class="language-perl">use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::OnapsoinfraserviceInstantiationApi;

my $api_instance = WWW::SwaggerClient::OnapsoinfraserviceInstantiationApi->new();
my $version = version_example; # String |
my $serviceInstanceId = serviceInstanceId_example; # String |
my $body = WWW::SwaggerClient::Object::String->new(); # String |

eval {
    $api_instance->createVnfInstance(version => $version, serviceInstanceId => $serviceInstanceId, body => $body);
};
if ($@) {
    warn "Exception when calling OnapsoinfraserviceInstantiationApi->createVnfInstance: $@\n";
}</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-createVnfInstance-0-python">
                              <pre class="prettyprint"><code class="language-python">from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.OnapsoinfraserviceInstantiationApi()
version = version_example # String |
serviceInstanceId = serviceInstanceId_example # String |
body = body_example # String |  (optional)

try:
    # Create VNF on a specified version and serviceInstance
    api_instance.create_vnf_instance(version, serviceInstanceId, body=body)
except ApiException as e:
    print("Exception when calling OnapsoinfraserviceInstantiationApi->createVnfInstance: %s\n" % e)</code></pre>
                                </div>
                            </div>

                            <h2>Parameters</h2>

                            <div class="methodsubtabletitle">Path parameters</div>
                            <table id="methodsubtable">
                                <tr>
                                    <th width="150px">Name</th>
                                    <th>Description</th>
                                </tr>
                                <tr><td style="width:150px;">version*</td>
                                    <td>


                                        <div id="d2e199_createVnfInstance_version">
                                            <div class="json-schema-view">
                                                <div class="primitive">
                <span class="type">
                    String
                </span>

                                                </div>
                                                <div class="inner required">
                                                    Required
                                                </div>
                                            </div>
                                        </div>
                                    </td>
                                </tr>

                                <tr><td style="width:150px;">serviceInstanceId*</td>
                                    <td>


                                        <div id="d2e199_createVnfInstance_serviceInstanceId">
                                            <div class="json-schema-view">
                                                <div class="primitive">
                <span class="type">
                    String
                </span>

                                                </div>
                                                <div class="inner required">
                                                    Required
                                                </div>
                                            </div>
                                        </div>
                                    </td>
                                </tr>

                            </table>


                            <div class="methodsubtabletitle">Body parameters</div>
                            <table id="methodsubtable">
                                <tr>
                                    <th width="150px">Name</th>
                                    <th>Description</th>
                                </tr>
                                <tr><td style="width:150px;">body </td>
                                    <td>


                                        <script>
$(document).ready(function() {
  var schemaWrapper = {
  "in" : "body",
  "name" : "body",
  "required" : false,
  "schema" : {
    "type" : "string"
  }
};
  var schema = schemaWrapper.schema;
  if (schema.$ref != null) {
    schema = defsParser.$refs.get(schema.$ref);
  } else {
    schemaWrapper.definitions = Object.assign({}, defs);
    $RefParser.dereference(schemaWrapper).catch(function(err) {
      console.log(err);
    });
  }

  var view = new JSONSchemaView(schema,2,{isBodyParam: true});
  var result = $('#d2e199_createVnfInstance_body');
  result.empty();
  result.append(view.render());
});
</script>
                                        <div id="d2e199_createVnfInstance_body"></div>
                                    </td>
                                </tr>

                            </table>



                            <h2>Responses</h2>
                            <h3> Status: default - successful operation </h3>

                            <ul class="nav nav-tabs nav-tabs-examples" >
                            </ul>

                            <div class="tab-content" style='margin-bottom: 10px;'>
                            </div>

                        </article>
                    </div>
                    <hr>
                    <div id="api-OnapsoinfraserviceInstantiation-createVolumeGroupInstance">
                        <article id="api-OnapsoinfraserviceInstantiation-createVolumeGroupInstance-0" data-group="User" data-name="createVolumeGroupInstance" data-version="0">
                            <div class="pull-left">
                                <h1>createVolumeGroupInstance</h1>
                                <p>Create VolumeGroup on a specified version, serviceInstance, vnfInstance</p>
                            </div>
                            <div class="pull-right"></div>
                            <div class="clearfix"></div>
                            <p></p>
                            <p class="marked"></p>
                            <p></p>
                            <br />
                            <pre class="prettyprint language-html prettyprinted" data-type="post"><code><span class="pln">/onap/so/infra/serviceInstantiation/{version}/serviceInstances/{serviceInstanceId}/vnfs/{vnfInstanceId}/volumeGroups</span></code></pre>
                            <p>
                            <h3>Usage and SDK Samples</h3>
                            </p>
                            <ul class="nav nav-tabs nav-tabs-examples">
                                <li class="active"><a href="#examples-OnapsoinfraserviceInstantiation-createVolumeGroupInstance-0-curl">Curl</a></li>
                                <li class=""><a href="#examples-OnapsoinfraserviceInstantiation-createVolumeGroupInstance-0-java">Java</a></li>
                                <li class=""><a href="#examples-OnapsoinfraserviceInstantiation-createVolumeGroupInstance-0-android">Android</a></li>
                                <!--<li class=""><a href="#examples-OnapsoinfraserviceInstantiation-createVolumeGroupInstance-0-groovy">Groovy</a></li>-->
                                <li class=""><a href="#examples-OnapsoinfraserviceInstantiation-createVolumeGroupInstance-0-objc">Obj-C</a></li>
                                <li class=""><a href="#examples-OnapsoinfraserviceInstantiation-createVolumeGroupInstance-0-javascript">JavaScript</a></li>
                                <!--<li class=""><a href="#examples-OnapsoinfraserviceInstantiation-createVolumeGroupInstance-0-angular">Angular</a></li>-->
                                <li class=""><a href="#examples-OnapsoinfraserviceInstantiation-createVolumeGroupInstance-0-csharp">C#</a></li>
                                <li class=""><a href="#examples-OnapsoinfraserviceInstantiation-createVolumeGroupInstance-0-php">PHP</a></li>
                                <li class=""><a href="#examples-OnapsoinfraserviceInstantiation-createVolumeGroupInstance-0-perl">Perl</a></li>
                                <li class=""><a href="#examples-OnapsoinfraserviceInstantiation-createVolumeGroupInstance-0-python">Python</a></li>
                            </ul>

                            <div class="tab-content">
                                <div class="tab-pane active" id="examples-OnapsoinfraserviceInstantiation-createVolumeGroupInstance-0-curl">
                                    <pre class="prettyprint"><code class="language-bsh">curl -X POST "http://localhost/onap/so/infra/serviceInstantiation/{version}/serviceInstances/{serviceInstanceId}/vnfs/{vnfInstanceId}/volumeGroups"</code></pre>
                                </div>
                                <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-createVolumeGroupInstance-0-java">
                            <pre class="prettyprint"><code class="language-java">import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.OnapsoinfraserviceInstantiationApi;

import java.io.File;
import java.util.*;

public class OnapsoinfraserviceInstantiationApiExample {

    public static void main(String[] args) {

        OnapsoinfraserviceInstantiationApi apiInstance = new OnapsoinfraserviceInstantiationApi();
        String version = version_example; // String |
        String serviceInstanceId = serviceInstanceId_example; // String |
        String vnfInstanceId = vnfInstanceId_example; // String |
        String body = body_example; // String |
        try {
            apiInstance.createVolumeGroupInstance(version, serviceInstanceId, vnfInstanceId, body);
        } catch (ApiException e) {
            System.err.println("Exception when calling OnapsoinfraserviceInstantiationApi#createVolumeGroupInstance");
            e.printStackTrace();
        }
    }
}</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-createVolumeGroupInstance-0-android">
                            <pre class="prettyprint"><code class="language-java">import io.swagger.client.api.OnapsoinfraserviceInstantiationApi;

public class OnapsoinfraserviceInstantiationApiExample {

    public static void main(String[] args) {
        OnapsoinfraserviceInstantiationApi apiInstance = new OnapsoinfraserviceInstantiationApi();
        String version = version_example; // String |
        String serviceInstanceId = serviceInstanceId_example; // String |
        String vnfInstanceId = vnfInstanceId_example; // String |
        String body = body_example; // String |
        try {
            apiInstance.createVolumeGroupInstance(version, serviceInstanceId, vnfInstanceId, body);
        } catch (ApiException e) {
            System.err.println("Exception when calling OnapsoinfraserviceInstantiationApi#createVolumeGroupInstance");
            e.printStackTrace();
        }
    }
}</code></pre>
                                </div>
                                <!--
  <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-createVolumeGroupInstance-0-groovy">
  <pre class="prettyprint language-json prettyprinted" data-type="json"><code>Coming Soon!</code></pre>
  </div> -->
                                <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-createVolumeGroupInstance-0-objc">
                              <pre class="prettyprint"><code class="language-cpp">String *version = version_example; //
String *serviceInstanceId = serviceInstanceId_example; //
String *vnfInstanceId = vnfInstanceId_example; //
String *body = body_example; //  (optional)

OnapsoinfraserviceInstantiationApi *apiInstance = [[OnapsoinfraserviceInstantiationApi alloc] init];

// Create VolumeGroup on a specified version, serviceInstance, vnfInstance
[apiInstance createVolumeGroupInstanceWith:version
    serviceInstanceId:serviceInstanceId
    vnfInstanceId:vnfInstanceId
    body:body
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-createVolumeGroupInstance-0-javascript">
                              <pre class="prettyprint"><code class="language-js">var SoGuilinApIs = require('so_guilin_ap_is');

var api = new SoGuilinApIs.OnapsoinfraserviceInstantiationApi()

var version = version_example; // {String}

var serviceInstanceId = serviceInstanceId_example; // {String}

var vnfInstanceId = vnfInstanceId_example; // {String}

var opts = {
  'body': body_example // {String}
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.createVolumeGroupInstance(version, serviceInstanceId, vnfInstanceId, opts, callback);
</code></pre>
                                </div>

                                <!--<div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-createVolumeGroupInstance-0-angular">
              <pre class="prettyprint language-json prettyprinted" data-type="json"><code>Coming Soon!</code></pre>
            </div>-->
                                <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-createVolumeGroupInstance-0-csharp">
                              <pre class="prettyprint"><code class="language-cs">using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class createVolumeGroupInstanceExample
    {
        public void main()
        {

            var apiInstance = new OnapsoinfraserviceInstantiationApi();
            var version = version_example;  // String |
            var serviceInstanceId = serviceInstanceId_example;  // String |
            var vnfInstanceId = vnfInstanceId_example;  // String |
            var body = body_example;  // String |  (optional)

            try
            {
                // Create VolumeGroup on a specified version, serviceInstance, vnfInstance
                apiInstance.createVolumeGroupInstance(version, serviceInstanceId, vnfInstanceId, body);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling OnapsoinfraserviceInstantiationApi.createVolumeGroupInstance: " + e.Message );
            }
        }
    }
}
</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-createVolumeGroupInstance-0-php">
                              <pre class="prettyprint"><code class="language-php"><&#63;php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\OnapsoinfraserviceInstantiationApi();
$version = version_example; // String |
$serviceInstanceId = serviceInstanceId_example; // String |
$vnfInstanceId = vnfInstanceId_example; // String |
$body = body_example; // String |

try {
    $api_instance->createVolumeGroupInstance($version, $serviceInstanceId, $vnfInstanceId, $body);
} catch (Exception $e) {
    echo 'Exception when calling OnapsoinfraserviceInstantiationApi->createVolumeGroupInstance: ', $e->getMessage(), PHP_EOL;
}
?></code></pre>
                                </div>

                                <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-createVolumeGroupInstance-0-perl">
                              <pre class="prettyprint"><code class="language-perl">use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::OnapsoinfraserviceInstantiationApi;

my $api_instance = WWW::SwaggerClient::OnapsoinfraserviceInstantiationApi->new();
my $version = version_example; # String |
my $serviceInstanceId = serviceInstanceId_example; # String |
my $vnfInstanceId = vnfInstanceId_example; # String |
my $body = WWW::SwaggerClient::Object::String->new(); # String |

eval {
    $api_instance->createVolumeGroupInstance(version => $version, serviceInstanceId => $serviceInstanceId, vnfInstanceId => $vnfInstanceId, body => $body);
};
if ($@) {
    warn "Exception when calling OnapsoinfraserviceInstantiationApi->createVolumeGroupInstance: $@\n";
}</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-createVolumeGroupInstance-0-python">
                              <pre class="prettyprint"><code class="language-python">from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.OnapsoinfraserviceInstantiationApi()
version = version_example # String |
serviceInstanceId = serviceInstanceId_example # String |
vnfInstanceId = vnfInstanceId_example # String |
body = body_example # String |  (optional)

try:
    # Create VolumeGroup on a specified version, serviceInstance, vnfInstance
    api_instance.create_volume_group_instance(version, serviceInstanceId, vnfInstanceId, body=body)
except ApiException as e:
    print("Exception when calling OnapsoinfraserviceInstantiationApi->createVolumeGroupInstance: %s\n" % e)</code></pre>
                                </div>
                            </div>

                            <h2>Parameters</h2>

                            <div class="methodsubtabletitle">Path parameters</div>
                            <table id="methodsubtable">
                                <tr>
                                    <th width="150px">Name</th>
                                    <th>Description</th>
                                </tr>
                                <tr><td style="width:150px;">version*</td>
                                    <td>


                                        <div id="d2e199_createVolumeGroupInstance_version">
                                            <div class="json-schema-view">
                                                <div class="primitive">
                <span class="type">
                    String
                </span>

                                                </div>
                                                <div class="inner required">
                                                    Required
                                                </div>
                                            </div>
                                        </div>
                                    </td>
                                </tr>

                                <tr><td style="width:150px;">serviceInstanceId*</td>
                                    <td>


                                        <div id="d2e199_createVolumeGroupInstance_serviceInstanceId">
                                            <div class="json-schema-view">
                                                <div class="primitive">
                <span class="type">
                    String
                </span>

                                                </div>
                                                <div class="inner required">
                                                    Required
                                                </div>
                                            </div>
                                        </div>
                                    </td>
                                </tr>

                                <tr><td style="width:150px;">vnfInstanceId*</td>
                                    <td>


                                        <div id="d2e199_createVolumeGroupInstance_vnfInstanceId">
                                            <div class="json-schema-view">
                                                <div class="primitive">
                <span class="type">
                    String
                </span>

                                                </div>
                                                <div class="inner required">
                                                    Required
                                                </div>
                                            </div>
                                        </div>
                                    </td>
                                </tr>

                            </table>


                            <div class="methodsubtabletitle">Body parameters</div>
                            <table id="methodsubtable">
                                <tr>
                                    <th width="150px">Name</th>
                                    <th>Description</th>
                                </tr>
                                <tr><td style="width:150px;">body </td>
                                    <td>


                                        <script>
$(document).ready(function() {
  var schemaWrapper = {
  "in" : "body",
  "name" : "body",
  "required" : false,
  "schema" : {
    "type" : "string"
  }
};
  var schema = schemaWrapper.schema;
  if (schema.$ref != null) {
    schema = defsParser.$refs.get(schema.$ref);
  } else {
    schemaWrapper.definitions = Object.assign({}, defs);
    $RefParser.dereference(schemaWrapper).catch(function(err) {
      console.log(err);
    });
  }

  var view = new JSONSchemaView(schema,2,{isBodyParam: true});
  var result = $('#d2e199_createVolumeGroupInstance_body');
  result.empty();
  result.append(view.render());
});
</script>
                                        <div id="d2e199_createVolumeGroupInstance_body"></div>
                                    </td>
                                </tr>

                            </table>



                            <h2>Responses</h2>
                            <h3> Status: default - successful operation </h3>

                            <ul class="nav nav-tabs nav-tabs-examples" >
                            </ul>

                            <div class="tab-content" style='margin-bottom: 10px;'>
                            </div>

                        </article>
                    </div>
                    <hr>
                    <div id="api-OnapsoinfraserviceInstantiation-deactivateAndCloudDeleteVfModuleInstance">
                        <article id="api-OnapsoinfraserviceInstantiation-deactivateAndCloudDeleteVfModuleInstance-0" data-group="User" data-name="deactivateAndCloudDeleteVfModuleInstance" data-version="0">
                            <div class="pull-left">
                                <h1>deactivateAndCloudDeleteVfModuleInstance</h1>
                                <p>Deactivate and Cloud Delete VfModule instance</p>
                            </div>
                            <div class="pull-right"></div>
                            <div class="clearfix"></div>
                            <p></p>
                            <p class="marked"></p>
                            <p></p>
                            <br />
                            <pre class="prettyprint language-html prettyprinted" data-type="post"><code><span class="pln">/onap/so/infra/serviceInstantiation/{version}/serviceInstances/{serviceInstanceId}/vnfs/{vnfInstanceId}/vfModules/{vfmoduleInstanceId}/deactivateAndCloudDelete</span></code></pre>
                            <p>
                            <h3>Usage and SDK Samples</h3>
                            </p>
                            <ul class="nav nav-tabs nav-tabs-examples">
                                <li class="active"><a href="#examples-OnapsoinfraserviceInstantiation-deactivateAndCloudDeleteVfModuleInstance-0-curl">Curl</a></li>
                                <li class=""><a href="#examples-OnapsoinfraserviceInstantiation-deactivateAndCloudDeleteVfModuleInstance-0-java">Java</a></li>
                                <li class=""><a href="#examples-OnapsoinfraserviceInstantiation-deactivateAndCloudDeleteVfModuleInstance-0-android">Android</a></li>
                                <!--<li class=""><a href="#examples-OnapsoinfraserviceInstantiation-deactivateAndCloudDeleteVfModuleInstance-0-groovy">Groovy</a></li>-->
                                <li class=""><a href="#examples-OnapsoinfraserviceInstantiation-deactivateAndCloudDeleteVfModuleInstance-0-objc">Obj-C</a></li>
                                <li class=""><a href="#examples-OnapsoinfraserviceInstantiation-deactivateAndCloudDeleteVfModuleInstance-0-javascript">JavaScript</a></li>
                                <!--<li class=""><a href="#examples-OnapsoinfraserviceInstantiation-deactivateAndCloudDeleteVfModuleInstance-0-angular">Angular</a></li>-->
                                <li class=""><a href="#examples-OnapsoinfraserviceInstantiation-deactivateAndCloudDeleteVfModuleInstance-0-csharp">C#</a></li>
                                <li class=""><a href="#examples-OnapsoinfraserviceInstantiation-deactivateAndCloudDeleteVfModuleInstance-0-php">PHP</a></li>
                                <li class=""><a href="#examples-OnapsoinfraserviceInstantiation-deactivateAndCloudDeleteVfModuleInstance-0-perl">Perl</a></li>
                                <li class=""><a href="#examples-OnapsoinfraserviceInstantiation-deactivateAndCloudDeleteVfModuleInstance-0-python">Python</a></li>
                            </ul>

                            <div class="tab-content">
                                <div class="tab-pane active" id="examples-OnapsoinfraserviceInstantiation-deactivateAndCloudDeleteVfModuleInstance-0-curl">
                                    <pre class="prettyprint"><code class="language-bsh">curl -X POST "http://localhost/onap/so/infra/serviceInstantiation/{version}/serviceInstances/{serviceInstanceId}/vnfs/{vnfInstanceId}/vfModules/{vfmoduleInstanceId}/deactivateAndCloudDelete"</code></pre>
                                </div>
                                <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-deactivateAndCloudDeleteVfModuleInstance-0-java">
                            <pre class="prettyprint"><code class="language-java">import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.OnapsoinfraserviceInstantiationApi;

import java.io.File;
import java.util.*;

public class OnapsoinfraserviceInstantiationApiExample {

    public static void main(String[] args) {

        OnapsoinfraserviceInstantiationApi apiInstance = new OnapsoinfraserviceInstantiationApi();
        String version = version_example; // String |
        String serviceInstanceId = serviceInstanceId_example; // String |
        String vnfInstanceId = vnfInstanceId_example; // String |
        String vfmoduleInstanceId = vfmoduleInstanceId_example; // String |
        String body = body_example; // String |
        try {
            apiInstance.deactivateAndCloudDeleteVfModuleInstance(version, serviceInstanceId, vnfInstanceId, vfmoduleInstanceId, body);
        } catch (ApiException e) {
            System.err.println("Exception when calling OnapsoinfraserviceInstantiationApi#deactivateAndCloudDeleteVfModuleInstance");
            e.printStackTrace();
        }
    }
}</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-deactivateAndCloudDeleteVfModuleInstance-0-android">
                            <pre class="prettyprint"><code class="language-java">import io.swagger.client.api.OnapsoinfraserviceInstantiationApi;

public class OnapsoinfraserviceInstantiationApiExample {

    public static void main(String[] args) {
        OnapsoinfraserviceInstantiationApi apiInstance = new OnapsoinfraserviceInstantiationApi();
        String version = version_example; // String |
        String serviceInstanceId = serviceInstanceId_example; // String |
        String vnfInstanceId = vnfInstanceId_example; // String |
        String vfmoduleInstanceId = vfmoduleInstanceId_example; // String |
        String body = body_example; // String |
        try {
            apiInstance.deactivateAndCloudDeleteVfModuleInstance(version, serviceInstanceId, vnfInstanceId, vfmoduleInstanceId, body);
        } catch (ApiException e) {
            System.err.println("Exception when calling OnapsoinfraserviceInstantiationApi#deactivateAndCloudDeleteVfModuleInstance");
            e.printStackTrace();
        }
    }
}</code></pre>
                                </div>
                                <!--
  <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-deactivateAndCloudDeleteVfModuleInstance-0-groovy">
  <pre class="prettyprint language-json prettyprinted" data-type="json"><code>Coming Soon!</code></pre>
  </div> -->
                                <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-deactivateAndCloudDeleteVfModuleInstance-0-objc">
                              <pre class="prettyprint"><code class="language-cpp">String *version = version_example; //
String *serviceInstanceId = serviceInstanceId_example; //
String *vnfInstanceId = vnfInstanceId_example; //
String *vfmoduleInstanceId = vfmoduleInstanceId_example; //
String *body = body_example; //  (optional)

OnapsoinfraserviceInstantiationApi *apiInstance = [[OnapsoinfraserviceInstantiationApi alloc] init];

// Deactivate and Cloud Delete VfModule instance
[apiInstance deactivateAndCloudDeleteVfModuleInstanceWith:version
    serviceInstanceId:serviceInstanceId
    vnfInstanceId:vnfInstanceId
    vfmoduleInstanceId:vfmoduleInstanceId
    body:body
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-deactivateAndCloudDeleteVfModuleInstance-0-javascript">
                              <pre class="prettyprint"><code class="language-js">var SoGuilinApIs = require('so_guilin_ap_is');

var api = new SoGuilinApIs.OnapsoinfraserviceInstantiationApi()

var version = version_example; // {String}

var serviceInstanceId = serviceInstanceId_example; // {String}

var vnfInstanceId = vnfInstanceId_example; // {String}

var vfmoduleInstanceId = vfmoduleInstanceId_example; // {String}

var opts = {
  'body': body_example // {String}
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.deactivateAndCloudDeleteVfModuleInstance(version, serviceInstanceId, vnfInstanceId, vfmoduleInstanceId, opts, callback);
</code></pre>
                                </div>

                                <!--<div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-deactivateAndCloudDeleteVfModuleInstance-0-angular">
              <pre class="prettyprint language-json prettyprinted" data-type="json"><code>Coming Soon!</code></pre>
            </div>-->
                                <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-deactivateAndCloudDeleteVfModuleInstance-0-csharp">
                              <pre class="prettyprint"><code class="language-cs">using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class deactivateAndCloudDeleteVfModuleInstanceExample
    {
        public void main()
        {

            var apiInstance = new OnapsoinfraserviceInstantiationApi();
            var version = version_example;  // String |
            var serviceInstanceId = serviceInstanceId_example;  // String |
            var vnfInstanceId = vnfInstanceId_example;  // String |
            var vfmoduleInstanceId = vfmoduleInstanceId_example;  // String |
            var body = body_example;  // String |  (optional)

            try
            {
                // Deactivate and Cloud Delete VfModule instance
                apiInstance.deactivateAndCloudDeleteVfModuleInstance(version, serviceInstanceId, vnfInstanceId, vfmoduleInstanceId, body);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling OnapsoinfraserviceInstantiationApi.deactivateAndCloudDeleteVfModuleInstance: " + e.Message );
            }
        }
    }
}
</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-deactivateAndCloudDeleteVfModuleInstance-0-php">
                              <pre class="prettyprint"><code class="language-php"><&#63;php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\OnapsoinfraserviceInstantiationApi();
$version = version_example; // String |
$serviceInstanceId = serviceInstanceId_example; // String |
$vnfInstanceId = vnfInstanceId_example; // String |
$vfmoduleInstanceId = vfmoduleInstanceId_example; // String |
$body = body_example; // String |

try {
    $api_instance->deactivateAndCloudDeleteVfModuleInstance($version, $serviceInstanceId, $vnfInstanceId, $vfmoduleInstanceId, $body);
} catch (Exception $e) {
    echo 'Exception when calling OnapsoinfraserviceInstantiationApi->deactivateAndCloudDeleteVfModuleInstance: ', $e->getMessage(), PHP_EOL;
}
?></code></pre>
                                </div>

                                <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-deactivateAndCloudDeleteVfModuleInstance-0-perl">
                              <pre class="prettyprint"><code class="language-perl">use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::OnapsoinfraserviceInstantiationApi;

my $api_instance = WWW::SwaggerClient::OnapsoinfraserviceInstantiationApi->new();
my $version = version_example; # String |
my $serviceInstanceId = serviceInstanceId_example; # String |
my $vnfInstanceId = vnfInstanceId_example; # String |
my $vfmoduleInstanceId = vfmoduleInstanceId_example; # String |
my $body = WWW::SwaggerClient::Object::String->new(); # String |

eval {
    $api_instance->deactivateAndCloudDeleteVfModuleInstance(version => $version, serviceInstanceId => $serviceInstanceId, vnfInstanceId => $vnfInstanceId, vfmoduleInstanceId => $vfmoduleInstanceId, body => $body);
};
if ($@) {
    warn "Exception when calling OnapsoinfraserviceInstantiationApi->deactivateAndCloudDeleteVfModuleInstance: $@\n";
}</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-deactivateAndCloudDeleteVfModuleInstance-0-python">
                              <pre class="prettyprint"><code class="language-python">from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.OnapsoinfraserviceInstantiationApi()
version = version_example # String |
serviceInstanceId = serviceInstanceId_example # String |
vnfInstanceId = vnfInstanceId_example # String |
vfmoduleInstanceId = vfmoduleInstanceId_example # String |
body = body_example # String |  (optional)

try:
    # Deactivate and Cloud Delete VfModule instance
    api_instance.deactivate_and_cloud_delete_vf_module_instance(version, serviceInstanceId, vnfInstanceId, vfmoduleInstanceId, body=body)
except ApiException as e:
    print("Exception when calling OnapsoinfraserviceInstantiationApi->deactivateAndCloudDeleteVfModuleInstance: %s\n" % e)</code></pre>
                                </div>
                            </div>

                            <h2>Parameters</h2>

                            <div class="methodsubtabletitle">Path parameters</div>
                            <table id="methodsubtable">
                                <tr>
                                    <th width="150px">Name</th>
                                    <th>Description</th>
                                </tr>
                                <tr><td style="width:150px;">version*</td>
                                    <td>


                                        <div id="d2e199_deactivateAndCloudDeleteVfModuleInstance_version">
                                            <div class="json-schema-view">
                                                <div class="primitive">
                <span class="type">
                    String
                </span>

                                                </div>
                                                <div class="inner required">
                                                    Required
                                                </div>
                                            </div>
                                        </div>
                                    </td>
                                </tr>

                                <tr><td style="width:150px;">serviceInstanceId*</td>
                                    <td>


                                        <div id="d2e199_deactivateAndCloudDeleteVfModuleInstance_serviceInstanceId">
                                            <div class="json-schema-view">
                                                <div class="primitive">
                <span class="type">
                    String
                </span>

                                                </div>
                                                <div class="inner required">
                                                    Required
                                                </div>
                                            </div>
                                        </div>
                                    </td>
                                </tr>

                                <tr><td style="width:150px;">vnfInstanceId*</td>
                                    <td>


                                        <div id="d2e199_deactivateAndCloudDeleteVfModuleInstance_vnfInstanceId">
                                            <div class="json-schema-view">
                                                <div class="primitive">
                <span class="type">
                    String
                </span>

                                                </div>
                                                <div class="inner required">
                                                    Required
                                                </div>
                                            </div>
                                        </div>
                                    </td>
                                </tr>

                                <tr><td style="width:150px;">vfmoduleInstanceId*</td>
                                    <td>


                                        <div id="d2e199_deactivateAndCloudDeleteVfModuleInstance_vfmoduleInstanceId">
                                            <div class="json-schema-view">
                                                <div class="primitive">
                <span class="type">
                    String
                </span>

                                                </div>
                                                <div class="inner required">
                                                    Required
                                                </div>
                                            </div>
                                        </div>
                                    </td>
                                </tr>

                            </table>


                            <div class="methodsubtabletitle">Body parameters</div>
                            <table id="methodsubtable">
                                <tr>
                                    <th width="150px">Name</th>
                                    <th>Description</th>
                                </tr>
                                <tr><td style="width:150px;">body </td>
                                    <td>


                                        <script>
$(document).ready(function() {
  var schemaWrapper = {
  "in" : "body",
  "name" : "body",
  "required" : false,
  "schema" : {
    "type" : "string"
  }
};
  var schema = schemaWrapper.schema;
  if (schema.$ref != null) {
    schema = defsParser.$refs.get(schema.$ref);
  } else {
    schemaWrapper.definitions = Object.assign({}, defs);
    $RefParser.dereference(schemaWrapper).catch(function(err) {
      console.log(err);
    });
  }

  var view = new JSONSchemaView(schema,2,{isBodyParam: true});
  var result = $('#d2e199_deactivateAndCloudDeleteVfModuleInstance_body');
  result.empty();
  result.append(view.render());
});
</script>
                                        <div id="d2e199_deactivateAndCloudDeleteVfModuleInstance_body"></div>
                                    </td>
                                </tr>

                            </table>



                            <h2>Responses</h2>
                            <h3> Status: default - successful operation </h3>

                            <ul class="nav nav-tabs nav-tabs-examples" >
                            </ul>

                            <div class="tab-content" style='margin-bottom: 10px;'>
                            </div>

                        </article>
                    </div>
                    <hr>
                    <div id="api-OnapsoinfraserviceInstantiation-deactivatePort">
                        <article id="api-OnapsoinfraserviceInstantiation-deactivatePort-0" data-group="User" data-name="deactivatePort" data-version="0">
                            <div class="pull-left">
                                <h1>deactivatePort</h1>
                                <p>Deactivate Port Mirroring</p>
                            </div>
                            <div class="pull-right"></div>
                            <div class="clearfix"></div>
                            <p></p>
                            <p class="marked"></p>
                            <p></p>
                            <br />
                            <pre class="prettyprint language-html prettyprinted" data-type="post"><code><span class="pln">/onap/so/infra/serviceInstantiation/{version}/serviceInstances/{serviceInstanceId}/configurations/{configurationInstanceId}/deactivate</span></code></pre>
                            <p>
                            <h3>Usage and SDK Samples</h3>
                            </p>
                            <ul class="nav nav-tabs nav-tabs-examples">
                                <li class="active"><a href="#examples-OnapsoinfraserviceInstantiation-deactivatePort-0-curl">Curl</a></li>
                                <li class=""><a href="#examples-OnapsoinfraserviceInstantiation-deactivatePort-0-java">Java</a></li>
                                <li class=""><a href="#examples-OnapsoinfraserviceInstantiation-deactivatePort-0-android">Android</a></li>
                                <!--<li class=""><a href="#examples-OnapsoinfraserviceInstantiation-deactivatePort-0-groovy">Groovy</a></li>-->
                                <li class=""><a href="#examples-OnapsoinfraserviceInstantiation-deactivatePort-0-objc">Obj-C</a></li>
                                <li class=""><a href="#examples-OnapsoinfraserviceInstantiation-deactivatePort-0-javascript">JavaScript</a></li>
                                <!--<li class=""><a href="#examples-OnapsoinfraserviceInstantiation-deactivatePort-0-angular">Angular</a></li>-->
                                <li class=""><a href="#examples-OnapsoinfraserviceInstantiation-deactivatePort-0-csharp">C#</a></li>
                                <li class=""><a href="#examples-OnapsoinfraserviceInstantiation-deactivatePort-0-php">PHP</a></li>
                                <li class=""><a href="#examples-OnapsoinfraserviceInstantiation-deactivatePort-0-perl">Perl</a></li>
                                <li class=""><a href="#examples-OnapsoinfraserviceInstantiation-deactivatePort-0-python">Python</a></li>
                            </ul>

                            <div class="tab-content">
                                <div class="tab-pane active" id="examples-OnapsoinfraserviceInstantiation-deactivatePort-0-curl">
                                    <pre class="prettyprint"><code class="language-bsh">curl -X POST "http://localhost/onap/so/infra/serviceInstantiation/{version}/serviceInstances/{serviceInstanceId}/configurations/{configurationInstanceId}/deactivate"</code></pre>
                                </div>
                                <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-deactivatePort-0-java">
                            <pre class="prettyprint"><code class="language-java">import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.OnapsoinfraserviceInstantiationApi;

import java.io.File;
import java.util.*;

public class OnapsoinfraserviceInstantiationApiExample {

    public static void main(String[] args) {

        OnapsoinfraserviceInstantiationApi apiInstance = new OnapsoinfraserviceInstantiationApi();
        String version = version_example; // String |
        String serviceInstanceId = serviceInstanceId_example; // String |
        String configurationInstanceId = configurationInstanceId_example; // String |
        String body = body_example; // String |
        try {
            apiInstance.deactivatePort(version, serviceInstanceId, configurationInstanceId, body);
        } catch (ApiException e) {
            System.err.println("Exception when calling OnapsoinfraserviceInstantiationApi#deactivatePort");
            e.printStackTrace();
        }
    }
}</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-deactivatePort-0-android">
                            <pre class="prettyprint"><code class="language-java">import io.swagger.client.api.OnapsoinfraserviceInstantiationApi;

public class OnapsoinfraserviceInstantiationApiExample {

    public static void main(String[] args) {
        OnapsoinfraserviceInstantiationApi apiInstance = new OnapsoinfraserviceInstantiationApi();
        String version = version_example; // String |
        String serviceInstanceId = serviceInstanceId_example; // String |
        String configurationInstanceId = configurationInstanceId_example; // String |
        String body = body_example; // String |
        try {
            apiInstance.deactivatePort(version, serviceInstanceId, configurationInstanceId, body);
        } catch (ApiException e) {
            System.err.println("Exception when calling OnapsoinfraserviceInstantiationApi#deactivatePort");
            e.printStackTrace();
        }
    }
}</code></pre>
                                </div>
                                <!--
  <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-deactivatePort-0-groovy">
  <pre class="prettyprint language-json prettyprinted" data-type="json"><code>Coming Soon!</code></pre>
  </div> -->
                                <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-deactivatePort-0-objc">
                              <pre class="prettyprint"><code class="language-cpp">String *version = version_example; //
String *serviceInstanceId = serviceInstanceId_example; //
String *configurationInstanceId = configurationInstanceId_example; //
String *body = body_example; //  (optional)

OnapsoinfraserviceInstantiationApi *apiInstance = [[OnapsoinfraserviceInstantiationApi alloc] init];

// Deactivate Port Mirroring
[apiInstance deactivatePortWith:version
    serviceInstanceId:serviceInstanceId
    configurationInstanceId:configurationInstanceId
    body:body
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-deactivatePort-0-javascript">
                              <pre class="prettyprint"><code class="language-js">var SoGuilinApIs = require('so_guilin_ap_is');

var api = new SoGuilinApIs.OnapsoinfraserviceInstantiationApi()

var version = version_example; // {String}

var serviceInstanceId = serviceInstanceId_example; // {String}

var configurationInstanceId = configurationInstanceId_example; // {String}

var opts = {
  'body': body_example // {String}
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.deactivatePort(version, serviceInstanceId, configurationInstanceId, opts, callback);
</code></pre>
                                </div>

                                <!--<div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-deactivatePort-0-angular">
              <pre class="prettyprint language-json prettyprinted" data-type="json"><code>Coming Soon!</code></pre>
            </div>-->
                                <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-deactivatePort-0-csharp">
                              <pre class="prettyprint"><code class="language-cs">using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class deactivatePortExample
    {
        public void main()
        {

            var apiInstance = new OnapsoinfraserviceInstantiationApi();
            var version = version_example;  // String |
            var serviceInstanceId = serviceInstanceId_example;  // String |
            var configurationInstanceId = configurationInstanceId_example;  // String |
            var body = body_example;  // String |  (optional)

            try
            {
                // Deactivate Port Mirroring
                apiInstance.deactivatePort(version, serviceInstanceId, configurationInstanceId, body);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling OnapsoinfraserviceInstantiationApi.deactivatePort: " + e.Message );
            }
        }
    }
}
</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-deactivatePort-0-php">
                              <pre class="prettyprint"><code class="language-php"><&#63;php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\OnapsoinfraserviceInstantiationApi();
$version = version_example; // String |
$serviceInstanceId = serviceInstanceId_example; // String |
$configurationInstanceId = configurationInstanceId_example; // String |
$body = body_example; // String |

try {
    $api_instance->deactivatePort($version, $serviceInstanceId, $configurationInstanceId, $body);
} catch (Exception $e) {
    echo 'Exception when calling OnapsoinfraserviceInstantiationApi->deactivatePort: ', $e->getMessage(), PHP_EOL;
}
?></code></pre>
                                </div>

                                <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-deactivatePort-0-perl">
                              <pre class="prettyprint"><code class="language-perl">use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::OnapsoinfraserviceInstantiationApi;

my $api_instance = WWW::SwaggerClient::OnapsoinfraserviceInstantiationApi->new();
my $version = version_example; # String |
my $serviceInstanceId = serviceInstanceId_example; # String |
my $configurationInstanceId = configurationInstanceId_example; # String |
my $body = WWW::SwaggerClient::Object::String->new(); # String |

eval {
    $api_instance->deactivatePort(version => $version, serviceInstanceId => $serviceInstanceId, configurationInstanceId => $configurationInstanceId, body => $body);
};
if ($@) {
    warn "Exception when calling OnapsoinfraserviceInstantiationApi->deactivatePort: $@\n";
}</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-deactivatePort-0-python">
                              <pre class="prettyprint"><code class="language-python">from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.OnapsoinfraserviceInstantiationApi()
version = version_example # String |
serviceInstanceId = serviceInstanceId_example # String |
configurationInstanceId = configurationInstanceId_example # String |
body = body_example # String |  (optional)

try:
    # Deactivate Port Mirroring
    api_instance.deactivate_port(version, serviceInstanceId, configurationInstanceId, body=body)
except ApiException as e:
    print("Exception when calling OnapsoinfraserviceInstantiationApi->deactivatePort: %s\n" % e)</code></pre>
                                </div>
                            </div>

                            <h2>Parameters</h2>

                            <div class="methodsubtabletitle">Path parameters</div>
                            <table id="methodsubtable">
                                <tr>
                                    <th width="150px">Name</th>
                                    <th>Description</th>
                                </tr>
                                <tr><td style="width:150px;">version*</td>
                                    <td>


                                        <div id="d2e199_deactivatePort_version">
                                            <div class="json-schema-view">
                                                <div class="primitive">
                <span class="type">
                    String
                </span>

                                                </div>
                                                <div class="inner required">
                                                    Required
                                                </div>
                                            </div>
                                        </div>
                                    </td>
                                </tr>

                                <tr><td style="width:150px;">serviceInstanceId*</td>
                                    <td>


                                        <div id="d2e199_deactivatePort_serviceInstanceId">
                                            <div class="json-schema-view">
                                                <div class="primitive">
                <span class="type">
                    String
                </span>

                                                </div>
                                                <div class="inner required">
                                                    Required
                                                </div>
                                            </div>
                                        </div>
                                    </td>
                                </tr>

                                <tr><td style="width:150px;">configurationInstanceId*</td>
                                    <td>


                                        <div id="d2e199_deactivatePort_configurationInstanceId">
                                            <div class="json-schema-view">
                                                <div class="primitive">
                <span class="type">
                    String
                </span>

                                                </div>
                                                <div class="inner required">
                                                    Required
                                                </div>
                                            </div>
                                        </div>
                                    </td>
                                </tr>

                            </table>


                            <div class="methodsubtabletitle">Body parameters</div>
                            <table id="methodsubtable">
                                <tr>
                                    <th width="150px">Name</th>
                                    <th>Description</th>
                                </tr>
                                <tr><td style="width:150px;">body </td>
                                    <td>


                                        <script>
$(document).ready(function() {
  var schemaWrapper = {
  "in" : "body",
  "name" : "body",
  "required" : false,
  "schema" : {
    "type" : "string"
  }
};
  var schema = schemaWrapper.schema;
  if (schema.$ref != null) {
    schema = defsParser.$refs.get(schema.$ref);
  } else {
    schemaWrapper.definitions = Object.assign({}, defs);
    $RefParser.dereference(schemaWrapper).catch(function(err) {
      console.log(err);
    });
  }

  var view = new JSONSchemaView(schema,2,{isBodyParam: true});
  var result = $('#d2e199_deactivatePort_body');
  result.empty();
  result.append(view.render());
});
</script>
                                        <div id="d2e199_deactivatePort_body"></div>
                                    </td>
                                </tr>

                            </table>



                            <h2>Responses</h2>
                            <h3> Status: default - successful operation </h3>

                            <ul class="nav nav-tabs nav-tabs-examples" >
                            </ul>

                            <div class="tab-content" style='margin-bottom: 10px;'>
                            </div>

                        </article>
                    </div>
                    <hr>
                    <div id="api-OnapsoinfraserviceInstantiation-deactivateServiceInstance">
                        <article id="api-OnapsoinfraserviceInstantiation-deactivateServiceInstance-0" data-group="User" data-name="deactivateServiceInstance" data-version="0">
                            <div class="pull-left">
                                <h1>deactivateServiceInstance</h1>
                                <p>Deactivate provided Service Instance</p>
                            </div>
                            <div class="pull-right"></div>
                            <div class="clearfix"></div>
                            <p></p>
                            <p class="marked"></p>
                            <p></p>
                            <br />
                            <pre class="prettyprint language-html prettyprinted" data-type="post"><code><span class="pln">/onap/so/infra/serviceInstantiation/{version}/serviceInstances/{serviceInstanceId}/deactivate</span></code></pre>
                            <p>
                            <h3>Usage and SDK Samples</h3>
                            </p>
                            <ul class="nav nav-tabs nav-tabs-examples">
                                <li class="active"><a href="#examples-OnapsoinfraserviceInstantiation-deactivateServiceInstance-0-curl">Curl</a></li>
                                <li class=""><a href="#examples-OnapsoinfraserviceInstantiation-deactivateServiceInstance-0-java">Java</a></li>
                                <li class=""><a href="#examples-OnapsoinfraserviceInstantiation-deactivateServiceInstance-0-android">Android</a></li>
                                <!--<li class=""><a href="#examples-OnapsoinfraserviceInstantiation-deactivateServiceInstance-0-groovy">Groovy</a></li>-->
                                <li class=""><a href="#examples-OnapsoinfraserviceInstantiation-deactivateServiceInstance-0-objc">Obj-C</a></li>
                                <li class=""><a href="#examples-OnapsoinfraserviceInstantiation-deactivateServiceInstance-0-javascript">JavaScript</a></li>
                                <!--<li class=""><a href="#examples-OnapsoinfraserviceInstantiation-deactivateServiceInstance-0-angular">Angular</a></li>-->
                                <li class=""><a href="#examples-OnapsoinfraserviceInstantiation-deactivateServiceInstance-0-csharp">C#</a></li>
                                <li class=""><a href="#examples-OnapsoinfraserviceInstantiation-deactivateServiceInstance-0-php">PHP</a></li>
                                <li class=""><a href="#examples-OnapsoinfraserviceInstantiation-deactivateServiceInstance-0-perl">Perl</a></li>
                                <li class=""><a href="#examples-OnapsoinfraserviceInstantiation-deactivateServiceInstance-0-python">Python</a></li>
                            </ul>

                            <div class="tab-content">
                                <div class="tab-pane active" id="examples-OnapsoinfraserviceInstantiation-deactivateServiceInstance-0-curl">
                                    <pre class="prettyprint"><code class="language-bsh">curl -X POST "http://localhost/onap/so/infra/serviceInstantiation/{version}/serviceInstances/{serviceInstanceId}/deactivate"</code></pre>
                                </div>
                                <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-deactivateServiceInstance-0-java">
                            <pre class="prettyprint"><code class="language-java">import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.OnapsoinfraserviceInstantiationApi;

import java.io.File;
import java.util.*;

public class OnapsoinfraserviceInstantiationApiExample {

    public static void main(String[] args) {

        OnapsoinfraserviceInstantiationApi apiInstance = new OnapsoinfraserviceInstantiationApi();
        String version = version_example; // String |
        String serviceInstanceId = serviceInstanceId_example; // String |
        String body = body_example; // String |
        try {
            apiInstance.deactivateServiceInstance(version, serviceInstanceId, body);
        } catch (ApiException e) {
            System.err.println("Exception when calling OnapsoinfraserviceInstantiationApi#deactivateServiceInstance");
            e.printStackTrace();
        }
    }
}</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-deactivateServiceInstance-0-android">
                            <pre class="prettyprint"><code class="language-java">import io.swagger.client.api.OnapsoinfraserviceInstantiationApi;

public class OnapsoinfraserviceInstantiationApiExample {

    public static void main(String[] args) {
        OnapsoinfraserviceInstantiationApi apiInstance = new OnapsoinfraserviceInstantiationApi();
        String version = version_example; // String |
        String serviceInstanceId = serviceInstanceId_example; // String |
        String body = body_example; // String |
        try {
            apiInstance.deactivateServiceInstance(version, serviceInstanceId, body);
        } catch (ApiException e) {
            System.err.println("Exception when calling OnapsoinfraserviceInstantiationApi#deactivateServiceInstance");
            e.printStackTrace();
        }
    }
}</code></pre>
                                </div>
                                <!--
  <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-deactivateServiceInstance-0-groovy">
  <pre class="prettyprint language-json prettyprinted" data-type="json"><code>Coming Soon!</code></pre>
  </div> -->
                                <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-deactivateServiceInstance-0-objc">
                              <pre class="prettyprint"><code class="language-cpp">String *version = version_example; //
String *serviceInstanceId = serviceInstanceId_example; //
String *body = body_example; //  (optional)

OnapsoinfraserviceInstantiationApi *apiInstance = [[OnapsoinfraserviceInstantiationApi alloc] init];

// Deactivate provided Service Instance
[apiInstance deactivateServiceInstanceWith:version
    serviceInstanceId:serviceInstanceId
    body:body
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-deactivateServiceInstance-0-javascript">
                              <pre class="prettyprint"><code class="language-js">var SoGuilinApIs = require('so_guilin_ap_is');

var api = new SoGuilinApIs.OnapsoinfraserviceInstantiationApi()

var version = version_example; // {String}

var serviceInstanceId = serviceInstanceId_example; // {String}

var opts = {
  'body': body_example // {String}
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.deactivateServiceInstance(version, serviceInstanceId, opts, callback);
</code></pre>
                                </div>

                                <!--<div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-deactivateServiceInstance-0-angular">
              <pre class="prettyprint language-json prettyprinted" data-type="json"><code>Coming Soon!</code></pre>
            </div>-->
                                <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-deactivateServiceInstance-0-csharp">
                              <pre class="prettyprint"><code class="language-cs">using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class deactivateServiceInstanceExample
    {
        public void main()
        {

            var apiInstance = new OnapsoinfraserviceInstantiationApi();
            var version = version_example;  // String |
            var serviceInstanceId = serviceInstanceId_example;  // String |
            var body = body_example;  // String |  (optional)

            try
            {
                // Deactivate provided Service Instance
                apiInstance.deactivateServiceInstance(version, serviceInstanceId, body);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling OnapsoinfraserviceInstantiationApi.deactivateServiceInstance: " + e.Message );
            }
        }
    }
}
</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-deactivateServiceInstance-0-php">
                              <pre class="prettyprint"><code class="language-php"><&#63;php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\OnapsoinfraserviceInstantiationApi();
$version = version_example; // String |
$serviceInstanceId = serviceInstanceId_example; // String |
$body = body_example; // String |

try {
    $api_instance->deactivateServiceInstance($version, $serviceInstanceId, $body);
} catch (Exception $e) {
    echo 'Exception when calling OnapsoinfraserviceInstantiationApi->deactivateServiceInstance: ', $e->getMessage(), PHP_EOL;
}
?></code></pre>
                                </div>

                                <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-deactivateServiceInstance-0-perl">
                              <pre class="prettyprint"><code class="language-perl">use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::OnapsoinfraserviceInstantiationApi;

my $api_instance = WWW::SwaggerClient::OnapsoinfraserviceInstantiationApi->new();
my $version = version_example; # String |
my $serviceInstanceId = serviceInstanceId_example; # String |
my $body = WWW::SwaggerClient::Object::String->new(); # String |

eval {
    $api_instance->deactivateServiceInstance(version => $version, serviceInstanceId => $serviceInstanceId, body => $body);
};
if ($@) {
    warn "Exception when calling OnapsoinfraserviceInstantiationApi->deactivateServiceInstance: $@\n";
}</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-deactivateServiceInstance-0-python">
                              <pre class="prettyprint"><code class="language-python">from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.OnapsoinfraserviceInstantiationApi()
version = version_example # String |
serviceInstanceId = serviceInstanceId_example # String |
body = body_example # String |  (optional)

try:
    # Deactivate provided Service Instance
    api_instance.deactivate_service_instance(version, serviceInstanceId, body=body)
except ApiException as e:
    print("Exception when calling OnapsoinfraserviceInstantiationApi->deactivateServiceInstance: %s\n" % e)</code></pre>
                                </div>
                            </div>

                            <h2>Parameters</h2>

                            <div class="methodsubtabletitle">Path parameters</div>
                            <table id="methodsubtable">
                                <tr>
                                    <th width="150px">Name</th>
                                    <th>Description</th>
                                </tr>
                                <tr><td style="width:150px;">version*</td>
                                    <td>


                                        <div id="d2e199_deactivateServiceInstance_version">
                                            <div class="json-schema-view">
                                                <div class="primitive">
                <span class="type">
                    String
                </span>

                                                </div>
                                                <div class="inner required">
                                                    Required
                                                </div>
                                            </div>
                                        </div>
                                    </td>
                                </tr>

                                <tr><td style="width:150px;">serviceInstanceId*</td>
                                    <td>


                                        <div id="d2e199_deactivateServiceInstance_serviceInstanceId">
                                            <div class="json-schema-view">
                                                <div class="primitive">
                <span class="type">
                    String
                </span>

                                                </div>
                                                <div class="inner required">
                                                    Required
                                                </div>
                                            </div>
                                        </div>
                                    </td>
                                </tr>

                            </table>


                            <div class="methodsubtabletitle">Body parameters</div>
                            <table id="methodsubtable">
                                <tr>
                                    <th width="150px">Name</th>
                                    <th>Description</th>
                                </tr>
                                <tr><td style="width:150px;">body </td>
                                    <td>


                                        <script>
$(document).ready(function() {
  var schemaWrapper = {
  "in" : "body",
  "name" : "body",
  "required" : false,
  "schema" : {
    "type" : "string"
  }
};
  var schema = schemaWrapper.schema;
  if (schema.$ref != null) {
    schema = defsParser.$refs.get(schema.$ref);
  } else {
    schemaWrapper.definitions = Object.assign({}, defs);
    $RefParser.dereference(schemaWrapper).catch(function(err) {
      console.log(err);
    });
  }

  var view = new JSONSchemaView(schema,2,{isBodyParam: true});
  var result = $('#d2e199_deactivateServiceInstance_body');
  result.empty();
  result.append(view.render());
});
</script>
                                        <div id="d2e199_deactivateServiceInstance_body"></div>
                                    </td>
                                </tr>

                            </table>



                            <h2>Responses</h2>
                            <h3> Status: default - successful operation </h3>

                            <ul class="nav nav-tabs nav-tabs-examples" >
                            </ul>

                            <div class="tab-content" style='margin-bottom: 10px;'>
                            </div>

                        </article>
                    </div>
                    <hr>
                    <div id="api-OnapsoinfraserviceInstantiation-deleteNetworkInstance">
                        <article id="api-OnapsoinfraserviceInstantiation-deleteNetworkInstance-0" data-group="User" data-name="deleteNetworkInstance" data-version="0">
                            <div class="pull-left">
                                <h1>deleteNetworkInstance</h1>
                                <p>Delete provided Network instance</p>
                            </div>
                            <div class="pull-right"></div>
                            <div class="clearfix"></div>
                            <p></p>
                            <p class="marked"></p>
                            <p></p>
                            <br />
                            <pre class="prettyprint language-html prettyprinted" data-type="delete"><code><span class="pln">/onap/so/infra/serviceInstantiation/{version}/serviceInstances/{serviceInstanceId}/networks/{networkInstanceId}</span></code></pre>
                            <p>
                            <h3>Usage and SDK Samples</h3>
                            </p>
                            <ul class="nav nav-tabs nav-tabs-examples">
                                <li class="active"><a href="#examples-OnapsoinfraserviceInstantiation-deleteNetworkInstance-0-curl">Curl</a></li>
                                <li class=""><a href="#examples-OnapsoinfraserviceInstantiation-deleteNetworkInstance-0-java">Java</a></li>
                                <li class=""><a href="#examples-OnapsoinfraserviceInstantiation-deleteNetworkInstance-0-android">Android</a></li>
                                <!--<li class=""><a href="#examples-OnapsoinfraserviceInstantiation-deleteNetworkInstance-0-groovy">Groovy</a></li>-->
                                <li class=""><a href="#examples-OnapsoinfraserviceInstantiation-deleteNetworkInstance-0-objc">Obj-C</a></li>
                                <li class=""><a href="#examples-OnapsoinfraserviceInstantiation-deleteNetworkInstance-0-javascript">JavaScript</a></li>
                                <!--<li class=""><a href="#examples-OnapsoinfraserviceInstantiation-deleteNetworkInstance-0-angular">Angular</a></li>-->
                                <li class=""><a href="#examples-OnapsoinfraserviceInstantiation-deleteNetworkInstance-0-csharp">C#</a></li>
                                <li class=""><a href="#examples-OnapsoinfraserviceInstantiation-deleteNetworkInstance-0-php">PHP</a></li>
                                <li class=""><a href="#examples-OnapsoinfraserviceInstantiation-deleteNetworkInstance-0-perl">Perl</a></li>
                                <li class=""><a href="#examples-OnapsoinfraserviceInstantiation-deleteNetworkInstance-0-python">Python</a></li>
                            </ul>

                            <div class="tab-content">
                                <div class="tab-pane active" id="examples-OnapsoinfraserviceInstantiation-deleteNetworkInstance-0-curl">
                                    <pre class="prettyprint"><code class="language-bsh">curl -X DELETE "http://localhost/onap/so/infra/serviceInstantiation/{version}/serviceInstances/{serviceInstanceId}/networks/{networkInstanceId}"</code></pre>
                                </div>
                                <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-deleteNetworkInstance-0-java">
                            <pre class="prettyprint"><code class="language-java">import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.OnapsoinfraserviceInstantiationApi;

import java.io.File;
import java.util.*;

public class OnapsoinfraserviceInstantiationApiExample {

    public static void main(String[] args) {

        OnapsoinfraserviceInstantiationApi apiInstance = new OnapsoinfraserviceInstantiationApi();
        String version = version_example; // String |
        String serviceInstanceId = serviceInstanceId_example; // String |
        String networkInstanceId = networkInstanceId_example; // String |
        String body = body_example; // String |
        try {
            apiInstance.deleteNetworkInstance(version, serviceInstanceId, networkInstanceId, body);
        } catch (ApiException e) {
            System.err.println("Exception when calling OnapsoinfraserviceInstantiationApi#deleteNetworkInstance");
            e.printStackTrace();
        }
    }
}</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-deleteNetworkInstance-0-android">
                            <pre class="prettyprint"><code class="language-java">import io.swagger.client.api.OnapsoinfraserviceInstantiationApi;

public class OnapsoinfraserviceInstantiationApiExample {

    public static void main(String[] args) {
        OnapsoinfraserviceInstantiationApi apiInstance = new OnapsoinfraserviceInstantiationApi();
        String version = version_example; // String |
        String serviceInstanceId = serviceInstanceId_example; // String |
        String networkInstanceId = networkInstanceId_example; // String |
        String body = body_example; // String |
        try {
            apiInstance.deleteNetworkInstance(version, serviceInstanceId, networkInstanceId, body);
        } catch (ApiException e) {
            System.err.println("Exception when calling OnapsoinfraserviceInstantiationApi#deleteNetworkInstance");
            e.printStackTrace();
        }
    }
}</code></pre>
                                </div>
                                <!--
  <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-deleteNetworkInstance-0-groovy">
  <pre class="prettyprint language-json prettyprinted" data-type="json"><code>Coming Soon!</code></pre>
  </div> -->
                                <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-deleteNetworkInstance-0-objc">
                              <pre class="prettyprint"><code class="language-cpp">String *version = version_example; //
String *serviceInstanceId = serviceInstanceId_example; //
String *networkInstanceId = networkInstanceId_example; //
String *body = body_example; //  (optional)

OnapsoinfraserviceInstantiationApi *apiInstance = [[OnapsoinfraserviceInstantiationApi alloc] init];

// Delete provided Network instance
[apiInstance deleteNetworkInstanceWith:version
    serviceInstanceId:serviceInstanceId
    networkInstanceId:networkInstanceId
    body:body
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-deleteNetworkInstance-0-javascript">
                              <pre class="prettyprint"><code class="language-js">var SoGuilinApIs = require('so_guilin_ap_is');

var api = new SoGuilinApIs.OnapsoinfraserviceInstantiationApi()

var version = version_example; // {String}

var serviceInstanceId = serviceInstanceId_example; // {String}

var networkInstanceId = networkInstanceId_example; // {String}

var opts = {
  'body': body_example // {String}
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.deleteNetworkInstance(version, serviceInstanceId, networkInstanceId, opts, callback);
</code></pre>
                                </div>

                                <!--<div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-deleteNetworkInstance-0-angular">
              <pre class="prettyprint language-json prettyprinted" data-type="json"><code>Coming Soon!</code></pre>
            </div>-->
                                <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-deleteNetworkInstance-0-csharp">
                              <pre class="prettyprint"><code class="language-cs">using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class deleteNetworkInstanceExample
    {
        public void main()
        {

            var apiInstance = new OnapsoinfraserviceInstantiationApi();
            var version = version_example;  // String |
            var serviceInstanceId = serviceInstanceId_example;  // String |
            var networkInstanceId = networkInstanceId_example;  // String |
            var body = body_example;  // String |  (optional)

            try
            {
                // Delete provided Network instance
                apiInstance.deleteNetworkInstance(version, serviceInstanceId, networkInstanceId, body);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling OnapsoinfraserviceInstantiationApi.deleteNetworkInstance: " + e.Message );
            }
        }
    }
}
</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-deleteNetworkInstance-0-php">
                              <pre class="prettyprint"><code class="language-php"><&#63;php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\OnapsoinfraserviceInstantiationApi();
$version = version_example; // String |
$serviceInstanceId = serviceInstanceId_example; // String |
$networkInstanceId = networkInstanceId_example; // String |
$body = body_example; // String |

try {
    $api_instance->deleteNetworkInstance($version, $serviceInstanceId, $networkInstanceId, $body);
} catch (Exception $e) {
    echo 'Exception when calling OnapsoinfraserviceInstantiationApi->deleteNetworkInstance: ', $e->getMessage(), PHP_EOL;
}
?></code></pre>
                                </div>

                                <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-deleteNetworkInstance-0-perl">
                              <pre class="prettyprint"><code class="language-perl">use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::OnapsoinfraserviceInstantiationApi;

my $api_instance = WWW::SwaggerClient::OnapsoinfraserviceInstantiationApi->new();
my $version = version_example; # String |
my $serviceInstanceId = serviceInstanceId_example; # String |
my $networkInstanceId = networkInstanceId_example; # String |
my $body = WWW::SwaggerClient::Object::String->new(); # String |

eval {
    $api_instance->deleteNetworkInstance(version => $version, serviceInstanceId => $serviceInstanceId, networkInstanceId => $networkInstanceId, body => $body);
};
if ($@) {
    warn "Exception when calling OnapsoinfraserviceInstantiationApi->deleteNetworkInstance: $@\n";
}</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-deleteNetworkInstance-0-python">
                              <pre class="prettyprint"><code class="language-python">from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.OnapsoinfraserviceInstantiationApi()
version = version_example # String |
serviceInstanceId = serviceInstanceId_example # String |
networkInstanceId = networkInstanceId_example # String |
body = body_example # String |  (optional)

try:
    # Delete provided Network instance
    api_instance.delete_network_instance(version, serviceInstanceId, networkInstanceId, body=body)
except ApiException as e:
    print("Exception when calling OnapsoinfraserviceInstantiationApi->deleteNetworkInstance: %s\n" % e)</code></pre>
                                </div>
                            </div>

                            <h2>Parameters</h2>

                            <div class="methodsubtabletitle">Path parameters</div>
                            <table id="methodsubtable">
                                <tr>
                                    <th width="150px">Name</th>
                                    <th>Description</th>
                                </tr>
                                <tr><td style="width:150px;">version*</td>
                                    <td>


                                        <div id="d2e199_deleteNetworkInstance_version">
                                            <div class="json-schema-view">
                                                <div class="primitive">
                <span class="type">
                    String
                </span>

                                                </div>
                                                <div class="inner required">
                                                    Required
                                                </div>
                                            </div>
                                        </div>
                                    </td>
                                </tr>

                                <tr><td style="width:150px;">serviceInstanceId*</td>
                                    <td>


                                        <div id="d2e199_deleteNetworkInstance_serviceInstanceId">
                                            <div class="json-schema-view">
                                                <div class="primitive">
                <span class="type">
                    String
                </span>

                                                </div>
                                                <div class="inner required">
                                                    Required
                                                </div>
                                            </div>
                                        </div>
                                    </td>
                                </tr>

                                <tr><td style="width:150px;">networkInstanceId*</td>
                                    <td>


                                        <div id="d2e199_deleteNetworkInstance_networkInstanceId">
                                            <div class="json-schema-view">
                                                <div class="primitive">
                <span class="type">
                    String
                </span>

                                                </div>
                                                <div class="inner required">
                                                    Required
                                                </div>
                                            </div>
                                        </div>
                                    </td>
                                </tr>

                            </table>


                            <div class="methodsubtabletitle">Body parameters</div>
                            <table id="methodsubtable">
                                <tr>
                                    <th width="150px">Name</th>
                                    <th>Description</th>
                                </tr>
                                <tr><td style="width:150px;">body </td>
                                    <td>


                                        <script>
$(document).ready(function() {
  var schemaWrapper = {
  "in" : "body",
  "name" : "body",
  "required" : false,
  "schema" : {
    "type" : "string"
  }
};
  var schema = schemaWrapper.schema;
  if (schema.$ref != null) {
    schema = defsParser.$refs.get(schema.$ref);
  } else {
    schemaWrapper.definitions = Object.assign({}, defs);
    $RefParser.dereference(schemaWrapper).catch(function(err) {
      console.log(err);
    });
  }

  var view = new JSONSchemaView(schema,2,{isBodyParam: true});
  var result = $('#d2e199_deleteNetworkInstance_body');
  result.empty();
  result.append(view.render());
});
</script>
                                        <div id="d2e199_deleteNetworkInstance_body"></div>
                                    </td>
                                </tr>

                            </table>



                            <h2>Responses</h2>
                            <h3> Status: default - successful operation </h3>

                            <ul class="nav nav-tabs nav-tabs-examples" >
                            </ul>

                            <div class="tab-content" style='margin-bottom: 10px;'>
                            </div>

                        </article>
                    </div>
                    <hr>
                    <div id="api-OnapsoinfraserviceInstantiation-deletePortConfiguration">
                        <article id="api-OnapsoinfraserviceInstantiation-deletePortConfiguration-0" data-group="User" data-name="deletePortConfiguration" data-version="0">
                            <div class="pull-left">
                                <h1>deletePortConfiguration</h1>
                                <p>Delete provided Port</p>
                            </div>
                            <div class="pull-right"></div>
                            <div class="clearfix"></div>
                            <p></p>
                            <p class="marked"></p>
                            <p></p>
                            <br />
                            <pre class="prettyprint language-html prettyprinted" data-type="delete"><code><span class="pln">/onap/so/infra/serviceInstantiation/{version}/serviceInstances/{serviceInstanceId}/configurations/{configurationInstanceId}</span></code></pre>
                            <p>
                            <h3>Usage and SDK Samples</h3>
                            </p>
                            <ul class="nav nav-tabs nav-tabs-examples">
                                <li class="active"><a href="#examples-OnapsoinfraserviceInstantiation-deletePortConfiguration-0-curl">Curl</a></li>
                                <li class=""><a href="#examples-OnapsoinfraserviceInstantiation-deletePortConfiguration-0-java">Java</a></li>
                                <li class=""><a href="#examples-OnapsoinfraserviceInstantiation-deletePortConfiguration-0-android">Android</a></li>
                                <!--<li class=""><a href="#examples-OnapsoinfraserviceInstantiation-deletePortConfiguration-0-groovy">Groovy</a></li>-->
                                <li class=""><a href="#examples-OnapsoinfraserviceInstantiation-deletePortConfiguration-0-objc">Obj-C</a></li>
                                <li class=""><a href="#examples-OnapsoinfraserviceInstantiation-deletePortConfiguration-0-javascript">JavaScript</a></li>
                                <!--<li class=""><a href="#examples-OnapsoinfraserviceInstantiation-deletePortConfiguration-0-angular">Angular</a></li>-->
                                <li class=""><a href="#examples-OnapsoinfraserviceInstantiation-deletePortConfiguration-0-csharp">C#</a></li>
                                <li class=""><a href="#examples-OnapsoinfraserviceInstantiation-deletePortConfiguration-0-php">PHP</a></li>
                                <li class=""><a href="#examples-OnapsoinfraserviceInstantiation-deletePortConfiguration-0-perl">Perl</a></li>
                                <li class=""><a href="#examples-OnapsoinfraserviceInstantiation-deletePortConfiguration-0-python">Python</a></li>
                            </ul>

                            <div class="tab-content">
                                <div class="tab-pane active" id="examples-OnapsoinfraserviceInstantiation-deletePortConfiguration-0-curl">
                                    <pre class="prettyprint"><code class="language-bsh">curl -X DELETE "http://localhost/onap/so/infra/serviceInstantiation/{version}/serviceInstances/{serviceInstanceId}/configurations/{configurationInstanceId}"</code></pre>
                                </div>
                                <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-deletePortConfiguration-0-java">
                            <pre class="prettyprint"><code class="language-java">import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.OnapsoinfraserviceInstantiationApi;

import java.io.File;
import java.util.*;

public class OnapsoinfraserviceInstantiationApiExample {

    public static void main(String[] args) {

        OnapsoinfraserviceInstantiationApi apiInstance = new OnapsoinfraserviceInstantiationApi();
        String version = version_example; // String |
        String serviceInstanceId = serviceInstanceId_example; // String |
        String configurationInstanceId = configurationInstanceId_example; // String |
        String body = body_example; // String |
        try {
            apiInstance.deletePortConfiguration(version, serviceInstanceId, configurationInstanceId, body);
        } catch (ApiException e) {
            System.err.println("Exception when calling OnapsoinfraserviceInstantiationApi#deletePortConfiguration");
            e.printStackTrace();
        }
    }
}</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-deletePortConfiguration-0-android">
                            <pre class="prettyprint"><code class="language-java">import io.swagger.client.api.OnapsoinfraserviceInstantiationApi;

public class OnapsoinfraserviceInstantiationApiExample {

    public static void main(String[] args) {
        OnapsoinfraserviceInstantiationApi apiInstance = new OnapsoinfraserviceInstantiationApi();
        String version = version_example; // String |
        String serviceInstanceId = serviceInstanceId_example; // String |
        String configurationInstanceId = configurationInstanceId_example; // String |
        String body = body_example; // String |
        try {
            apiInstance.deletePortConfiguration(version, serviceInstanceId, configurationInstanceId, body);
        } catch (ApiException e) {
            System.err.println("Exception when calling OnapsoinfraserviceInstantiationApi#deletePortConfiguration");
            e.printStackTrace();
        }
    }
}</code></pre>
                                </div>
                                <!--
  <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-deletePortConfiguration-0-groovy">
  <pre class="prettyprint language-json prettyprinted" data-type="json"><code>Coming Soon!</code></pre>
  </div> -->
                                <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-deletePortConfiguration-0-objc">
                              <pre class="prettyprint"><code class="language-cpp">String *version = version_example; //
String *serviceInstanceId = serviceInstanceId_example; //
String *configurationInstanceId = configurationInstanceId_example; //
String *body = body_example; //  (optional)

OnapsoinfraserviceInstantiationApi *apiInstance = [[OnapsoinfraserviceInstantiationApi alloc] init];

// Delete provided Port
[apiInstance deletePortConfigurationWith:version
    serviceInstanceId:serviceInstanceId
    configurationInstanceId:configurationInstanceId
    body:body
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-deletePortConfiguration-0-javascript">
                              <pre class="prettyprint"><code class="language-js">var SoGuilinApIs = require('so_guilin_ap_is');

var api = new SoGuilinApIs.OnapsoinfraserviceInstantiationApi()

var version = version_example; // {String}

var serviceInstanceId = serviceInstanceId_example; // {String}

var configurationInstanceId = configurationInstanceId_example; // {String}

var opts = {
  'body': body_example // {String}
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.deletePortConfiguration(version, serviceInstanceId, configurationInstanceId, opts, callback);
</code></pre>
                                </div>

                                <!--<div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-deletePortConfiguration-0-angular">
              <pre class="prettyprint language-json prettyprinted" data-type="json"><code>Coming Soon!</code></pre>
            </div>-->
                                <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-deletePortConfiguration-0-csharp">
                              <pre class="prettyprint"><code class="language-cs">using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class deletePortConfigurationExample
    {
        public void main()
        {

            var apiInstance = new OnapsoinfraserviceInstantiationApi();
            var version = version_example;  // String |
            var serviceInstanceId = serviceInstanceId_example;  // String |
            var configurationInstanceId = configurationInstanceId_example;  // String |
            var body = body_example;  // String |  (optional)

            try
            {
                // Delete provided Port
                apiInstance.deletePortConfiguration(version, serviceInstanceId, configurationInstanceId, body);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling OnapsoinfraserviceInstantiationApi.deletePortConfiguration: " + e.Message );
            }
        }
    }
}
</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-deletePortConfiguration-0-php">
                              <pre class="prettyprint"><code class="language-php"><&#63;php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\OnapsoinfraserviceInstantiationApi();
$version = version_example; // String |
$serviceInstanceId = serviceInstanceId_example; // String |
$configurationInstanceId = configurationInstanceId_example; // String |
$body = body_example; // String |

try {
    $api_instance->deletePortConfiguration($version, $serviceInstanceId, $configurationInstanceId, $body);
} catch (Exception $e) {
    echo 'Exception when calling OnapsoinfraserviceInstantiationApi->deletePortConfiguration: ', $e->getMessage(), PHP_EOL;
}
?></code></pre>
                                </div>

                                <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-deletePortConfiguration-0-perl">
                              <pre class="prettyprint"><code class="language-perl">use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::OnapsoinfraserviceInstantiationApi;

my $api_instance = WWW::SwaggerClient::OnapsoinfraserviceInstantiationApi->new();
my $version = version_example; # String |
my $serviceInstanceId = serviceInstanceId_example; # String |
my $configurationInstanceId = configurationInstanceId_example; # String |
my $body = WWW::SwaggerClient::Object::String->new(); # String |

eval {
    $api_instance->deletePortConfiguration(version => $version, serviceInstanceId => $serviceInstanceId, configurationInstanceId => $configurationInstanceId, body => $body);
};
if ($@) {
    warn "Exception when calling OnapsoinfraserviceInstantiationApi->deletePortConfiguration: $@\n";
}</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-deletePortConfiguration-0-python">
                              <pre class="prettyprint"><code class="language-python">from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.OnapsoinfraserviceInstantiationApi()
version = version_example # String |
serviceInstanceId = serviceInstanceId_example # String |
configurationInstanceId = configurationInstanceId_example # String |
body = body_example # String |  (optional)

try:
    # Delete provided Port
    api_instance.delete_port_configuration(version, serviceInstanceId, configurationInstanceId, body=body)
except ApiException as e:
    print("Exception when calling OnapsoinfraserviceInstantiationApi->deletePortConfiguration: %s\n" % e)</code></pre>
                                </div>
                            </div>

                            <h2>Parameters</h2>

                            <div class="methodsubtabletitle">Path parameters</div>
                            <table id="methodsubtable">
                                <tr>
                                    <th width="150px">Name</th>
                                    <th>Description</th>
                                </tr>
                                <tr><td style="width:150px;">version*</td>
                                    <td>


                                        <div id="d2e199_deletePortConfiguration_version">
                                            <div class="json-schema-view">
                                                <div class="primitive">
                <span class="type">
                    String
                </span>

                                                </div>
                                                <div class="inner required">
                                                    Required
                                                </div>
                                            </div>
                                        </div>
                                    </td>
                                </tr>

                                <tr><td style="width:150px;">serviceInstanceId*</td>
                                    <td>


                                        <div id="d2e199_deletePortConfiguration_serviceInstanceId">
                                            <div class="json-schema-view">
                                                <div class="primitive">
                <span class="type">
                    String
                </span>

                                                </div>
                                                <div class="inner required">
                                                    Required
                                                </div>
                                            </div>
                                        </div>
                                    </td>
                                </tr>

                                <tr><td style="width:150px;">configurationInstanceId*</td>
                                    <td>


                                        <div id="d2e199_deletePortConfiguration_configurationInstanceId">
                                            <div class="json-schema-view">
                                                <div class="primitive">
                <span class="type">
                    String
                </span>

                                                </div>
                                                <div class="inner required">
                                                    Required
                                                </div>
                                            </div>
                                        </div>
                                    </td>
                                </tr>

                            </table>


                            <div class="methodsubtabletitle">Body parameters</div>
                            <table id="methodsubtable">
                                <tr>
                                    <th width="150px">Name</th>
                                    <th>Description</th>
                                </tr>
                                <tr><td style="width:150px;">body </td>
                                    <td>


                                        <script>
$(document).ready(function() {
  var schemaWrapper = {
  "in" : "body",
  "name" : "body",
  "required" : false,
  "schema" : {
    "type" : "string"
  }
};
  var schema = schemaWrapper.schema;
  if (schema.$ref != null) {
    schema = defsParser.$refs.get(schema.$ref);
  } else {
    schemaWrapper.definitions = Object.assign({}, defs);
    $RefParser.dereference(schemaWrapper).catch(function(err) {
      console.log(err);
    });
  }

  var view = new JSONSchemaView(schema,2,{isBodyParam: true});
  var result = $('#d2e199_deletePortConfiguration_body');
  result.empty();
  result.append(view.render());
});
</script>
                                        <div id="d2e199_deletePortConfiguration_body"></div>
                                    </td>
                                </tr>

                            </table>



                            <h2>Responses</h2>
                            <h3> Status: default - successful operation </h3>

                            <ul class="nav nav-tabs nav-tabs-examples" >
                            </ul>

                            <div class="tab-content" style='margin-bottom: 10px;'>
                            </div>

                        </article>
                    </div>
                    <hr>
                    <div id="api-OnapsoinfraserviceInstantiation-deleteServiceInstance">
                        <article id="api-OnapsoinfraserviceInstantiation-deleteServiceInstance-0" data-group="User" data-name="deleteServiceInstance" data-version="0">
                            <div class="pull-left">
                                <h1>deleteServiceInstance</h1>
                                <p>Delete provided Service Instance</p>
                            </div>
                            <div class="pull-right"></div>
                            <div class="clearfix"></div>
                            <p></p>
                            <p class="marked"></p>
                            <p></p>
                            <br />
                            <pre class="prettyprint language-html prettyprinted" data-type="delete"><code><span class="pln">/onap/so/infra/serviceInstantiation/{version}/serviceInstances/{serviceInstanceId}</span></code></pre>
                            <p>
                            <h3>Usage and SDK Samples</h3>
                            </p>
                            <ul class="nav nav-tabs nav-tabs-examples">
                                <li class="active"><a href="#examples-OnapsoinfraserviceInstantiation-deleteServiceInstance-0-curl">Curl</a></li>
                                <li class=""><a href="#examples-OnapsoinfraserviceInstantiation-deleteServiceInstance-0-java">Java</a></li>
                                <li class=""><a href="#examples-OnapsoinfraserviceInstantiation-deleteServiceInstance-0-android">Android</a></li>
                                <!--<li class=""><a href="#examples-OnapsoinfraserviceInstantiation-deleteServiceInstance-0-groovy">Groovy</a></li>-->
                                <li class=""><a href="#examples-OnapsoinfraserviceInstantiation-deleteServiceInstance-0-objc">Obj-C</a></li>
                                <li class=""><a href="#examples-OnapsoinfraserviceInstantiation-deleteServiceInstance-0-javascript">JavaScript</a></li>
                                <!--<li class=""><a href="#examples-OnapsoinfraserviceInstantiation-deleteServiceInstance-0-angular">Angular</a></li>-->
                                <li class=""><a href="#examples-OnapsoinfraserviceInstantiation-deleteServiceInstance-0-csharp">C#</a></li>
                                <li class=""><a href="#examples-OnapsoinfraserviceInstantiation-deleteServiceInstance-0-php">PHP</a></li>
                                <li class=""><a href="#examples-OnapsoinfraserviceInstantiation-deleteServiceInstance-0-perl">Perl</a></li>
                                <li class=""><a href="#examples-OnapsoinfraserviceInstantiation-deleteServiceInstance-0-python">Python</a></li>
                            </ul>

                            <div class="tab-content">
                                <div class="tab-pane active" id="examples-OnapsoinfraserviceInstantiation-deleteServiceInstance-0-curl">
                                    <pre class="prettyprint"><code class="language-bsh">curl -X DELETE "http://localhost/onap/so/infra/serviceInstantiation/{version}/serviceInstances/{serviceInstanceId}"</code></pre>
                                </div>
                                <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-deleteServiceInstance-0-java">
                            <pre class="prettyprint"><code class="language-java">import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.OnapsoinfraserviceInstantiationApi;

import java.io.File;
import java.util.*;

public class OnapsoinfraserviceInstantiationApiExample {

    public static void main(String[] args) {

        OnapsoinfraserviceInstantiationApi apiInstance = new OnapsoinfraserviceInstantiationApi();
        String version = version_example; // String |
        String serviceInstanceId = serviceInstanceId_example; // String |
        String body = body_example; // String |
        try {
            apiInstance.deleteServiceInstance(version, serviceInstanceId, body);
        } catch (ApiException e) {
            System.err.println("Exception when calling OnapsoinfraserviceInstantiationApi#deleteServiceInstance");
            e.printStackTrace();
        }
    }
}</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-deleteServiceInstance-0-android">
                            <pre class="prettyprint"><code class="language-java">import io.swagger.client.api.OnapsoinfraserviceInstantiationApi;

public class OnapsoinfraserviceInstantiationApiExample {

    public static void main(String[] args) {
        OnapsoinfraserviceInstantiationApi apiInstance = new OnapsoinfraserviceInstantiationApi();
        String version = version_example; // String |
        String serviceInstanceId = serviceInstanceId_example; // String |
        String body = body_example; // String |
        try {
            apiInstance.deleteServiceInstance(version, serviceInstanceId, body);
        } catch (ApiException e) {
            System.err.println("Exception when calling OnapsoinfraserviceInstantiationApi#deleteServiceInstance");
            e.printStackTrace();
        }
    }
}</code></pre>
                                </div>
                                <!--
  <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-deleteServiceInstance-0-groovy">
  <pre class="prettyprint language-json prettyprinted" data-type="json"><code>Coming Soon!</code></pre>
  </div> -->
                                <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-deleteServiceInstance-0-objc">
                              <pre class="prettyprint"><code class="language-cpp">String *version = version_example; //
String *serviceInstanceId = serviceInstanceId_example; //
String *body = body_example; //  (optional)

OnapsoinfraserviceInstantiationApi *apiInstance = [[OnapsoinfraserviceInstantiationApi alloc] init];

// Delete provided Service Instance
[apiInstance deleteServiceInstanceWith:version
    serviceInstanceId:serviceInstanceId
    body:body
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-deleteServiceInstance-0-javascript">
                              <pre class="prettyprint"><code class="language-js">var SoGuilinApIs = require('so_guilin_ap_is');

var api = new SoGuilinApIs.OnapsoinfraserviceInstantiationApi()

var version = version_example; // {String}

var serviceInstanceId = serviceInstanceId_example; // {String}

var opts = {
  'body': body_example // {String}
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.deleteServiceInstance(version, serviceInstanceId, opts, callback);
</code></pre>
                                </div>

                                <!--<div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-deleteServiceInstance-0-angular">
              <pre class="prettyprint language-json prettyprinted" data-type="json"><code>Coming Soon!</code></pre>
            </div>-->
                                <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-deleteServiceInstance-0-csharp">
                              <pre class="prettyprint"><code class="language-cs">using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class deleteServiceInstanceExample
    {
        public void main()
        {

            var apiInstance = new OnapsoinfraserviceInstantiationApi();
            var version = version_example;  // String |
            var serviceInstanceId = serviceInstanceId_example;  // String |
            var body = body_example;  // String |  (optional)

            try
            {
                // Delete provided Service Instance
                apiInstance.deleteServiceInstance(version, serviceInstanceId, body);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling OnapsoinfraserviceInstantiationApi.deleteServiceInstance: " + e.Message );
            }
        }
    }
}
</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-deleteServiceInstance-0-php">
                              <pre class="prettyprint"><code class="language-php"><&#63;php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\OnapsoinfraserviceInstantiationApi();
$version = version_example; // String |
$serviceInstanceId = serviceInstanceId_example; // String |
$body = body_example; // String |

try {
    $api_instance->deleteServiceInstance($version, $serviceInstanceId, $body);
} catch (Exception $e) {
    echo 'Exception when calling OnapsoinfraserviceInstantiationApi->deleteServiceInstance: ', $e->getMessage(), PHP_EOL;
}
?></code></pre>
                                </div>

                                <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-deleteServiceInstance-0-perl">
                              <pre class="prettyprint"><code class="language-perl">use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::OnapsoinfraserviceInstantiationApi;

my $api_instance = WWW::SwaggerClient::OnapsoinfraserviceInstantiationApi->new();
my $version = version_example; # String |
my $serviceInstanceId = serviceInstanceId_example; # String |
my $body = WWW::SwaggerClient::Object::String->new(); # String |

eval {
    $api_instance->deleteServiceInstance(version => $version, serviceInstanceId => $serviceInstanceId, body => $body);
};
if ($@) {
    warn "Exception when calling OnapsoinfraserviceInstantiationApi->deleteServiceInstance: $@\n";
}</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-deleteServiceInstance-0-python">
                              <pre class="prettyprint"><code class="language-python">from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.OnapsoinfraserviceInstantiationApi()
version = version_example # String |
serviceInstanceId = serviceInstanceId_example # String |
body = body_example # String |  (optional)

try:
    # Delete provided Service Instance
    api_instance.delete_service_instance(version, serviceInstanceId, body=body)
except ApiException as e:
    print("Exception when calling OnapsoinfraserviceInstantiationApi->deleteServiceInstance: %s\n" % e)</code></pre>
                                </div>
                            </div>

                            <h2>Parameters</h2>

                            <div class="methodsubtabletitle">Path parameters</div>
                            <table id="methodsubtable">
                                <tr>
                                    <th width="150px">Name</th>
                                    <th>Description</th>
                                </tr>
                                <tr><td style="width:150px;">version*</td>
                                    <td>


                                        <div id="d2e199_deleteServiceInstance_version">
                                            <div class="json-schema-view">
                                                <div class="primitive">
                <span class="type">
                    String
                </span>

                                                </div>
                                                <div class="inner required">
                                                    Required
                                                </div>
                                            </div>
                                        </div>
                                    </td>
                                </tr>

                                <tr><td style="width:150px;">serviceInstanceId*</td>
                                    <td>


                                        <div id="d2e199_deleteServiceInstance_serviceInstanceId">
                                            <div class="json-schema-view">
                                                <div class="primitive">
                <span class="type">
                    String
                </span>

                                                </div>
                                                <div class="inner required">
                                                    Required
                                                </div>
                                            </div>
                                        </div>
                                    </td>
                                </tr>

                            </table>


                            <div class="methodsubtabletitle">Body parameters</div>
                            <table id="methodsubtable">
                                <tr>
                                    <th width="150px">Name</th>
                                    <th>Description</th>
                                </tr>
                                <tr><td style="width:150px;">body </td>
                                    <td>


                                        <script>
$(document).ready(function() {
  var schemaWrapper = {
  "in" : "body",
  "name" : "body",
  "required" : false,
  "schema" : {
    "type" : "string"
  }
};
  var schema = schemaWrapper.schema;
  if (schema.$ref != null) {
    schema = defsParser.$refs.get(schema.$ref);
  } else {
    schemaWrapper.definitions = Object.assign({}, defs);
    $RefParser.dereference(schemaWrapper).catch(function(err) {
      console.log(err);
    });
  }

  var view = new JSONSchemaView(schema,2,{isBodyParam: true});
  var result = $('#d2e199_deleteServiceInstance_body');
  result.empty();
  result.append(view.render());
});
</script>
                                        <div id="d2e199_deleteServiceInstance_body"></div>
                                    </td>
                                </tr>

                            </table>



                            <h2>Responses</h2>
                            <h3> Status: default - successful operation </h3>

                            <ul class="nav nav-tabs nav-tabs-examples" >
                            </ul>

                            <div class="tab-content" style='margin-bottom: 10px;'>
                            </div>

                        </article>
                    </div>
                    <hr>
                    <div id="api-OnapsoinfraserviceInstantiation-deleteVfModuleInstance">
                        <article id="api-OnapsoinfraserviceInstantiation-deleteVfModuleInstance-0" data-group="User" data-name="deleteVfModuleInstance" data-version="0">
                            <div class="pull-left">
                                <h1>deleteVfModuleInstance</h1>
                                <p>Delete provided VfModule instance</p>
                            </div>
                            <div class="pull-right"></div>
                            <div class="clearfix"></div>
                            <p></p>
                            <p class="marked"></p>
                            <p></p>
                            <br />
                            <pre class="prettyprint language-html prettyprinted" data-type="delete"><code><span class="pln">/onap/so/infra/serviceInstantiation/{version}/serviceInstances/{serviceInstanceId}/vnfs/{vnfInstanceId}/vfModules/{vfmoduleInstanceId}</span></code></pre>
                            <p>
                            <h3>Usage and SDK Samples</h3>
                            </p>
                            <ul class="nav nav-tabs nav-tabs-examples">
                                <li class="active"><a href="#examples-OnapsoinfraserviceInstantiation-deleteVfModuleInstance-0-curl">Curl</a></li>
                                <li class=""><a href="#examples-OnapsoinfraserviceInstantiation-deleteVfModuleInstance-0-java">Java</a></li>
                                <li class=""><a href="#examples-OnapsoinfraserviceInstantiation-deleteVfModuleInstance-0-android">Android</a></li>
                                <!--<li class=""><a href="#examples-OnapsoinfraserviceInstantiation-deleteVfModuleInstance-0-groovy">Groovy</a></li>-->
                                <li class=""><a href="#examples-OnapsoinfraserviceInstantiation-deleteVfModuleInstance-0-objc">Obj-C</a></li>
                                <li class=""><a href="#examples-OnapsoinfraserviceInstantiation-deleteVfModuleInstance-0-javascript">JavaScript</a></li>
                                <!--<li class=""><a href="#examples-OnapsoinfraserviceInstantiation-deleteVfModuleInstance-0-angular">Angular</a></li>-->
                                <li class=""><a href="#examples-OnapsoinfraserviceInstantiation-deleteVfModuleInstance-0-csharp">C#</a></li>
                                <li class=""><a href="#examples-OnapsoinfraserviceInstantiation-deleteVfModuleInstance-0-php">PHP</a></li>
                                <li class=""><a href="#examples-OnapsoinfraserviceInstantiation-deleteVfModuleInstance-0-perl">Perl</a></li>
                                <li class=""><a href="#examples-OnapsoinfraserviceInstantiation-deleteVfModuleInstance-0-python">Python</a></li>
                            </ul>

                            <div class="tab-content">
                                <div class="tab-pane active" id="examples-OnapsoinfraserviceInstantiation-deleteVfModuleInstance-0-curl">
                                    <pre class="prettyprint"><code class="language-bsh">curl -X DELETE "http://localhost/onap/so/infra/serviceInstantiation/{version}/serviceInstances/{serviceInstanceId}/vnfs/{vnfInstanceId}/vfModules/{vfmoduleInstanceId}"</code></pre>
                                </div>
                                <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-deleteVfModuleInstance-0-java">
                            <pre class="prettyprint"><code class="language-java">import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.OnapsoinfraserviceInstantiationApi;

import java.io.File;
import java.util.*;

public class OnapsoinfraserviceInstantiationApiExample {

    public static void main(String[] args) {

        OnapsoinfraserviceInstantiationApi apiInstance = new OnapsoinfraserviceInstantiationApi();
        String version = version_example; // String |
        String serviceInstanceId = serviceInstanceId_example; // String |
        String vnfInstanceId = vnfInstanceId_example; // String |
        String vfmoduleInstanceId = vfmoduleInstanceId_example; // String |
        String body = body_example; // String |
        try {
            apiInstance.deleteVfModuleInstance(version, serviceInstanceId, vnfInstanceId, vfmoduleInstanceId, body);
        } catch (ApiException e) {
            System.err.println("Exception when calling OnapsoinfraserviceInstantiationApi#deleteVfModuleInstance");
            e.printStackTrace();
        }
    }
}</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-deleteVfModuleInstance-0-android">
                            <pre class="prettyprint"><code class="language-java">import io.swagger.client.api.OnapsoinfraserviceInstantiationApi;

public class OnapsoinfraserviceInstantiationApiExample {

    public static void main(String[] args) {
        OnapsoinfraserviceInstantiationApi apiInstance = new OnapsoinfraserviceInstantiationApi();
        String version = version_example; // String |
        String serviceInstanceId = serviceInstanceId_example; // String |
        String vnfInstanceId = vnfInstanceId_example; // String |
        String vfmoduleInstanceId = vfmoduleInstanceId_example; // String |
        String body = body_example; // String |
        try {
            apiInstance.deleteVfModuleInstance(version, serviceInstanceId, vnfInstanceId, vfmoduleInstanceId, body);
        } catch (ApiException e) {
            System.err.println("Exception when calling OnapsoinfraserviceInstantiationApi#deleteVfModuleInstance");
            e.printStackTrace();
        }
    }
}</code></pre>
                                </div>
                                <!--
  <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-deleteVfModuleInstance-0-groovy">
  <pre class="prettyprint language-json prettyprinted" data-type="json"><code>Coming Soon!</code></pre>
  </div> -->
                                <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-deleteVfModuleInstance-0-objc">
                              <pre class="prettyprint"><code class="language-cpp">String *version = version_example; //
String *serviceInstanceId = serviceInstanceId_example; //
String *vnfInstanceId = vnfInstanceId_example; //
String *vfmoduleInstanceId = vfmoduleInstanceId_example; //
String *body = body_example; //  (optional)

OnapsoinfraserviceInstantiationApi *apiInstance = [[OnapsoinfraserviceInstantiationApi alloc] init];

// Delete provided VfModule instance
[apiInstance deleteVfModuleInstanceWith:version
    serviceInstanceId:serviceInstanceId
    vnfInstanceId:vnfInstanceId
    vfmoduleInstanceId:vfmoduleInstanceId
    body:body
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-deleteVfModuleInstance-0-javascript">
                              <pre class="prettyprint"><code class="language-js">var SoGuilinApIs = require('so_guilin_ap_is');

var api = new SoGuilinApIs.OnapsoinfraserviceInstantiationApi()

var version = version_example; // {String}

var serviceInstanceId = serviceInstanceId_example; // {String}

var vnfInstanceId = vnfInstanceId_example; // {String}

var vfmoduleInstanceId = vfmoduleInstanceId_example; // {String}

var opts = {
  'body': body_example // {String}
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.deleteVfModuleInstance(version, serviceInstanceId, vnfInstanceId, vfmoduleInstanceId, opts, callback);
</code></pre>
                                </div>

                                <!--<div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-deleteVfModuleInstance-0-angular">
              <pre class="prettyprint language-json prettyprinted" data-type="json"><code>Coming Soon!</code></pre>
            </div>-->
                                <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-deleteVfModuleInstance-0-csharp">
                              <pre class="prettyprint"><code class="language-cs">using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class deleteVfModuleInstanceExample
    {
        public void main()
        {

            var apiInstance = new OnapsoinfraserviceInstantiationApi();
            var version = version_example;  // String |
            var serviceInstanceId = serviceInstanceId_example;  // String |
            var vnfInstanceId = vnfInstanceId_example;  // String |
            var vfmoduleInstanceId = vfmoduleInstanceId_example;  // String |
            var body = body_example;  // String |  (optional)

            try
            {
                // Delete provided VfModule instance
                apiInstance.deleteVfModuleInstance(version, serviceInstanceId, vnfInstanceId, vfmoduleInstanceId, body);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling OnapsoinfraserviceInstantiationApi.deleteVfModuleInstance: " + e.Message );
            }
        }
    }
}
</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-deleteVfModuleInstance-0-php">
                              <pre class="prettyprint"><code class="language-php"><&#63;php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\OnapsoinfraserviceInstantiationApi();
$version = version_example; // String |
$serviceInstanceId = serviceInstanceId_example; // String |
$vnfInstanceId = vnfInstanceId_example; // String |
$vfmoduleInstanceId = vfmoduleInstanceId_example; // String |
$body = body_example; // String |

try {
    $api_instance->deleteVfModuleInstance($version, $serviceInstanceId, $vnfInstanceId, $vfmoduleInstanceId, $body);
} catch (Exception $e) {
    echo 'Exception when calling OnapsoinfraserviceInstantiationApi->deleteVfModuleInstance: ', $e->getMessage(), PHP_EOL;
}
?></code></pre>
                                </div>

                                <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-deleteVfModuleInstance-0-perl">
                              <pre class="prettyprint"><code class="language-perl">use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::OnapsoinfraserviceInstantiationApi;

my $api_instance = WWW::SwaggerClient::OnapsoinfraserviceInstantiationApi->new();
my $version = version_example; # String |
my $serviceInstanceId = serviceInstanceId_example; # String |
my $vnfInstanceId = vnfInstanceId_example; # String |
my $vfmoduleInstanceId = vfmoduleInstanceId_example; # String |
my $body = WWW::SwaggerClient::Object::String->new(); # String |

eval {
    $api_instance->deleteVfModuleInstance(version => $version, serviceInstanceId => $serviceInstanceId, vnfInstanceId => $vnfInstanceId, vfmoduleInstanceId => $vfmoduleInstanceId, body => $body);
};
if ($@) {
    warn "Exception when calling OnapsoinfraserviceInstantiationApi->deleteVfModuleInstance: $@\n";
}</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-deleteVfModuleInstance-0-python">
                              <pre class="prettyprint"><code class="language-python">from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.OnapsoinfraserviceInstantiationApi()
version = version_example # String |
serviceInstanceId = serviceInstanceId_example # String |
vnfInstanceId = vnfInstanceId_example # String |
vfmoduleInstanceId = vfmoduleInstanceId_example # String |
body = body_example # String |  (optional)

try:
    # Delete provided VfModule instance
    api_instance.delete_vf_module_instance(version, serviceInstanceId, vnfInstanceId, vfmoduleInstanceId, body=body)
except ApiException as e:
    print("Exception when calling OnapsoinfraserviceInstantiationApi->deleteVfModuleInstance: %s\n" % e)</code></pre>
                                </div>
                            </div>

                            <h2>Parameters</h2>

                            <div class="methodsubtabletitle">Path parameters</div>
                            <table id="methodsubtable">
                                <tr>
                                    <th width="150px">Name</th>
                                    <th>Description</th>
                                </tr>
                                <tr><td style="width:150px;">version*</td>
                                    <td>


                                        <div id="d2e199_deleteVfModuleInstance_version">
                                            <div class="json-schema-view">
                                                <div class="primitive">
                <span class="type">
                    String
                </span>

                                                </div>
                                                <div class="inner required">
                                                    Required
                                                </div>
                                            </div>
                                        </div>
                                    </td>
                                </tr>

                                <tr><td style="width:150px;">serviceInstanceId*</td>
                                    <td>


                                        <div id="d2e199_deleteVfModuleInstance_serviceInstanceId">
                                            <div class="json-schema-view">
                                                <div class="primitive">
                <span class="type">
                    String
                </span>

                                                </div>
                                                <div class="inner required">
                                                    Required
                                                </div>
                                            </div>
                                        </div>
                                    </td>
                                </tr>

                                <tr><td style="width:150px;">vnfInstanceId*</td>
                                    <td>


                                        <div id="d2e199_deleteVfModuleInstance_vnfInstanceId">
                                            <div class="json-schema-view">
                                                <div class="primitive">
                <span class="type">
                    String
                </span>

                                                </div>
                                                <div class="inner required">
                                                    Required
                                                </div>
                                            </div>
                                        </div>
                                    </td>
                                </tr>

                                <tr><td style="width:150px;">vfmoduleInstanceId*</td>
                                    <td>


                                        <div id="d2e199_deleteVfModuleInstance_vfmoduleInstanceId">
                                            <div class="json-schema-view">
                                                <div class="primitive">
                <span class="type">
                    String
                </span>

                                                </div>
                                                <div class="inner required">
                                                    Required
                                                </div>
                                            </div>
                                        </div>
                                    </td>
                                </tr>

                            </table>


                            <div class="methodsubtabletitle">Body parameters</div>
                            <table id="methodsubtable">
                                <tr>
                                    <th width="150px">Name</th>
                                    <th>Description</th>
                                </tr>
                                <tr><td style="width:150px;">body </td>
                                    <td>


                                        <script>
$(document).ready(function() {
  var schemaWrapper = {
  "in" : "body",
  "name" : "body",
  "required" : false,
  "schema" : {
    "type" : "string"
  }
};
  var schema = schemaWrapper.schema;
  if (schema.$ref != null) {
    schema = defsParser.$refs.get(schema.$ref);
  } else {
    schemaWrapper.definitions = Object.assign({}, defs);
    $RefParser.dereference(schemaWrapper).catch(function(err) {
      console.log(err);
    });
  }

  var view = new JSONSchemaView(schema,2,{isBodyParam: true});
  var result = $('#d2e199_deleteVfModuleInstance_body');
  result.empty();
  result.append(view.render());
});
</script>
                                        <div id="d2e199_deleteVfModuleInstance_body"></div>
                                    </td>
                                </tr>

                            </table>



                            <h2>Responses</h2>
                            <h3> Status: default - successful operation </h3>

                            <ul class="nav nav-tabs nav-tabs-examples" >
                            </ul>

                            <div class="tab-content" style='margin-bottom: 10px;'>
                            </div>

                        </article>
                    </div>
                    <hr>
                    <div id="api-OnapsoinfraserviceInstantiation-deleteVnfInstance">
                        <article id="api-OnapsoinfraserviceInstantiation-deleteVnfInstance-0" data-group="User" data-name="deleteVnfInstance" data-version="0">
                            <div class="pull-left">
                                <h1>deleteVnfInstance</h1>
                                <p>Delete provided VNF instance</p>
                            </div>
                            <div class="pull-right"></div>
                            <div class="clearfix"></div>
                            <p></p>
                            <p class="marked"></p>
                            <p></p>
                            <br />
                            <pre class="prettyprint language-html prettyprinted" data-type="delete"><code><span class="pln">/onap/so/infra/serviceInstantiation/{version}/serviceInstances/{serviceInstanceId}/vnfs/{vnfInstanceId}</span></code></pre>
                            <p>
                            <h3>Usage and SDK Samples</h3>
                            </p>
                            <ul class="nav nav-tabs nav-tabs-examples">
                                <li class="active"><a href="#examples-OnapsoinfraserviceInstantiation-deleteVnfInstance-0-curl">Curl</a></li>
                                <li class=""><a href="#examples-OnapsoinfraserviceInstantiation-deleteVnfInstance-0-java">Java</a></li>
                                <li class=""><a href="#examples-OnapsoinfraserviceInstantiation-deleteVnfInstance-0-android">Android</a></li>
                                <!--<li class=""><a href="#examples-OnapsoinfraserviceInstantiation-deleteVnfInstance-0-groovy">Groovy</a></li>-->
                                <li class=""><a href="#examples-OnapsoinfraserviceInstantiation-deleteVnfInstance-0-objc">Obj-C</a></li>
                                <li class=""><a href="#examples-OnapsoinfraserviceInstantiation-deleteVnfInstance-0-javascript">JavaScript</a></li>
                                <!--<li class=""><a href="#examples-OnapsoinfraserviceInstantiation-deleteVnfInstance-0-angular">Angular</a></li>-->
                                <li class=""><a href="#examples-OnapsoinfraserviceInstantiation-deleteVnfInstance-0-csharp">C#</a></li>
                                <li class=""><a href="#examples-OnapsoinfraserviceInstantiation-deleteVnfInstance-0-php">PHP</a></li>
                                <li class=""><a href="#examples-OnapsoinfraserviceInstantiation-deleteVnfInstance-0-perl">Perl</a></li>
                                <li class=""><a href="#examples-OnapsoinfraserviceInstantiation-deleteVnfInstance-0-python">Python</a></li>
                            </ul>

                            <div class="tab-content">
                                <div class="tab-pane active" id="examples-OnapsoinfraserviceInstantiation-deleteVnfInstance-0-curl">
                                    <pre class="prettyprint"><code class="language-bsh">curl -X DELETE "http://localhost/onap/so/infra/serviceInstantiation/{version}/serviceInstances/{serviceInstanceId}/vnfs/{vnfInstanceId}"</code></pre>
                                </div>
                                <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-deleteVnfInstance-0-java">
                            <pre class="prettyprint"><code class="language-java">import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.OnapsoinfraserviceInstantiationApi;

import java.io.File;
import java.util.*;

public class OnapsoinfraserviceInstantiationApiExample {

    public static void main(String[] args) {

        OnapsoinfraserviceInstantiationApi apiInstance = new OnapsoinfraserviceInstantiationApi();
        String version = version_example; // String |
        String serviceInstanceId = serviceInstanceId_example; // String |
        String vnfInstanceId = vnfInstanceId_example; // String |
        String body = body_example; // String |
        try {
            apiInstance.deleteVnfInstance(version, serviceInstanceId, vnfInstanceId, body);
        } catch (ApiException e) {
            System.err.println("Exception when calling OnapsoinfraserviceInstantiationApi#deleteVnfInstance");
            e.printStackTrace();
        }
    }
}</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-deleteVnfInstance-0-android">
                            <pre class="prettyprint"><code class="language-java">import io.swagger.client.api.OnapsoinfraserviceInstantiationApi;

public class OnapsoinfraserviceInstantiationApiExample {

    public static void main(String[] args) {
        OnapsoinfraserviceInstantiationApi apiInstance = new OnapsoinfraserviceInstantiationApi();
        String version = version_example; // String |
        String serviceInstanceId = serviceInstanceId_example; // String |
        String vnfInstanceId = vnfInstanceId_example; // String |
        String body = body_example; // String |
        try {
            apiInstance.deleteVnfInstance(version, serviceInstanceId, vnfInstanceId, body);
        } catch (ApiException e) {
            System.err.println("Exception when calling OnapsoinfraserviceInstantiationApi#deleteVnfInstance");
            e.printStackTrace();
        }
    }
}</code></pre>
                                </div>
                                <!--
  <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-deleteVnfInstance-0-groovy">
  <pre class="prettyprint language-json prettyprinted" data-type="json"><code>Coming Soon!</code></pre>
  </div> -->
                                <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-deleteVnfInstance-0-objc">
                              <pre class="prettyprint"><code class="language-cpp">String *version = version_example; //
String *serviceInstanceId = serviceInstanceId_example; //
String *vnfInstanceId = vnfInstanceId_example; //
String *body = body_example; //  (optional)

OnapsoinfraserviceInstantiationApi *apiInstance = [[OnapsoinfraserviceInstantiationApi alloc] init];

// Delete provided VNF instance
[apiInstance deleteVnfInstanceWith:version
    serviceInstanceId:serviceInstanceId
    vnfInstanceId:vnfInstanceId
    body:body
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-deleteVnfInstance-0-javascript">
                              <pre class="prettyprint"><code class="language-js">var SoGuilinApIs = require('so_guilin_ap_is');

var api = new SoGuilinApIs.OnapsoinfraserviceInstantiationApi()

var version = version_example; // {String}

var serviceInstanceId = serviceInstanceId_example; // {String}

var vnfInstanceId = vnfInstanceId_example; // {String}

var opts = {
  'body': body_example // {String}
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.deleteVnfInstance(version, serviceInstanceId, vnfInstanceId, opts, callback);
</code></pre>
                                </div>

                                <!--<div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-deleteVnfInstance-0-angular">
              <pre class="prettyprint language-json prettyprinted" data-type="json"><code>Coming Soon!</code></pre>
            </div>-->
                                <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-deleteVnfInstance-0-csharp">
                              <pre class="prettyprint"><code class="language-cs">using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class deleteVnfInstanceExample
    {
        public void main()
        {

            var apiInstance = new OnapsoinfraserviceInstantiationApi();
            var version = version_example;  // String |
            var serviceInstanceId = serviceInstanceId_example;  // String |
            var vnfInstanceId = vnfInstanceId_example;  // String |
            var body = body_example;  // String |  (optional)

            try
            {
                // Delete provided VNF instance
                apiInstance.deleteVnfInstance(version, serviceInstanceId, vnfInstanceId, body);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling OnapsoinfraserviceInstantiationApi.deleteVnfInstance: " + e.Message );
            }
        }
    }
}
</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-deleteVnfInstance-0-php">
                              <pre class="prettyprint"><code class="language-php"><&#63;php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\OnapsoinfraserviceInstantiationApi();
$version = version_example; // String |
$serviceInstanceId = serviceInstanceId_example; // String |
$vnfInstanceId = vnfInstanceId_example; // String |
$body = body_example; // String |

try {
    $api_instance->deleteVnfInstance($version, $serviceInstanceId, $vnfInstanceId, $body);
} catch (Exception $e) {
    echo 'Exception when calling OnapsoinfraserviceInstantiationApi->deleteVnfInstance: ', $e->getMessage(), PHP_EOL;
}
?></code></pre>
                                </div>

                                <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-deleteVnfInstance-0-perl">
                              <pre class="prettyprint"><code class="language-perl">use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::OnapsoinfraserviceInstantiationApi;

my $api_instance = WWW::SwaggerClient::OnapsoinfraserviceInstantiationApi->new();
my $version = version_example; # String |
my $serviceInstanceId = serviceInstanceId_example; # String |
my $vnfInstanceId = vnfInstanceId_example; # String |
my $body = WWW::SwaggerClient::Object::String->new(); # String |

eval {
    $api_instance->deleteVnfInstance(version => $version, serviceInstanceId => $serviceInstanceId, vnfInstanceId => $vnfInstanceId, body => $body);
};
if ($@) {
    warn "Exception when calling OnapsoinfraserviceInstantiationApi->deleteVnfInstance: $@\n";
}</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-deleteVnfInstance-0-python">
                              <pre class="prettyprint"><code class="language-python">from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.OnapsoinfraserviceInstantiationApi()
version = version_example # String |
serviceInstanceId = serviceInstanceId_example # String |
vnfInstanceId = vnfInstanceId_example # String |
body = body_example # String |  (optional)

try:
    # Delete provided VNF instance
    api_instance.delete_vnf_instance(version, serviceInstanceId, vnfInstanceId, body=body)
except ApiException as e:
    print("Exception when calling OnapsoinfraserviceInstantiationApi->deleteVnfInstance: %s\n" % e)</code></pre>
                                </div>
                            </div>

                            <h2>Parameters</h2>

                            <div class="methodsubtabletitle">Path parameters</div>
                            <table id="methodsubtable">
                                <tr>
                                    <th width="150px">Name</th>
                                    <th>Description</th>
                                </tr>
                                <tr><td style="width:150px;">version*</td>
                                    <td>


                                        <div id="d2e199_deleteVnfInstance_version">
                                            <div class="json-schema-view">
                                                <div class="primitive">
                <span class="type">
                    String
                </span>

                                                </div>
                                                <div class="inner required">
                                                    Required
                                                </div>
                                            </div>
                                        </div>
                                    </td>
                                </tr>

                                <tr><td style="width:150px;">serviceInstanceId*</td>
                                    <td>


                                        <div id="d2e199_deleteVnfInstance_serviceInstanceId">
                                            <div class="json-schema-view">
                                                <div class="primitive">
                <span class="type">
                    String
                </span>

                                                </div>
                                                <div class="inner required">
                                                    Required
                                                </div>
                                            </div>
                                        </div>
                                    </td>
                                </tr>

                                <tr><td style="width:150px;">vnfInstanceId*</td>
                                    <td>


                                        <div id="d2e199_deleteVnfInstance_vnfInstanceId">
                                            <div class="json-schema-view">
                                                <div class="primitive">
                <span class="type">
                    String
                </span>

                                                </div>
                                                <div class="inner required">
                                                    Required
                                                </div>
                                            </div>
                                        </div>
                                    </td>
                                </tr>

                            </table>


                            <div class="methodsubtabletitle">Body parameters</div>
                            <table id="methodsubtable">
                                <tr>
                                    <th width="150px">Name</th>
                                    <th>Description</th>
                                </tr>
                                <tr><td style="width:150px;">body </td>
                                    <td>


                                        <script>
$(document).ready(function() {
  var schemaWrapper = {
  "in" : "body",
  "name" : "body",
  "required" : false,
  "schema" : {
    "type" : "string"
  }
};
  var schema = schemaWrapper.schema;
  if (schema.$ref != null) {
    schema = defsParser.$refs.get(schema.$ref);
  } else {
    schemaWrapper.definitions = Object.assign({}, defs);
    $RefParser.dereference(schemaWrapper).catch(function(err) {
      console.log(err);
    });
  }

  var view = new JSONSchemaView(schema,2,{isBodyParam: true});
  var result = $('#d2e199_deleteVnfInstance_body');
  result.empty();
  result.append(view.render());
});
</script>
                                        <div id="d2e199_deleteVnfInstance_body"></div>
                                    </td>
                                </tr>

                            </table>



                            <h2>Responses</h2>
                            <h3> Status: default - successful operation </h3>

                            <ul class="nav nav-tabs nav-tabs-examples" >
                            </ul>

                            <div class="tab-content" style='margin-bottom: 10px;'>
                            </div>

                        </article>
                    </div>
                    <hr>
                    <div id="api-OnapsoinfraserviceInstantiation-deleteVolumeGroupInstance">
                        <article id="api-OnapsoinfraserviceInstantiation-deleteVolumeGroupInstance-0" data-group="User" data-name="deleteVolumeGroupInstance" data-version="0">
                            <div class="pull-left">
                                <h1>deleteVolumeGroupInstance</h1>
                                <p>Delete provided VolumeGroup instance</p>
                            </div>
                            <div class="pull-right"></div>
                            <div class="clearfix"></div>
                            <p></p>
                            <p class="marked"></p>
                            <p></p>
                            <br />
                            <pre class="prettyprint language-html prettyprinted" data-type="delete"><code><span class="pln">/onap/so/infra/serviceInstantiation/{version}/serviceInstances/{serviceInstanceId}/vnfs/{vnfInstanceId}/volumeGroups/{volumeGroupInstanceId}</span></code></pre>
                            <p>
                            <h3>Usage and SDK Samples</h3>
                            </p>
                            <ul class="nav nav-tabs nav-tabs-examples">
                                <li class="active"><a href="#examples-OnapsoinfraserviceInstantiation-deleteVolumeGroupInstance-0-curl">Curl</a></li>
                                <li class=""><a href="#examples-OnapsoinfraserviceInstantiation-deleteVolumeGroupInstance-0-java">Java</a></li>
                                <li class=""><a href="#examples-OnapsoinfraserviceInstantiation-deleteVolumeGroupInstance-0-android">Android</a></li>
                                <!--<li class=""><a href="#examples-OnapsoinfraserviceInstantiation-deleteVolumeGroupInstance-0-groovy">Groovy</a></li>-->
                                <li class=""><a href="#examples-OnapsoinfraserviceInstantiation-deleteVolumeGroupInstance-0-objc">Obj-C</a></li>
                                <li class=""><a href="#examples-OnapsoinfraserviceInstantiation-deleteVolumeGroupInstance-0-javascript">JavaScript</a></li>
                                <!--<li class=""><a href="#examples-OnapsoinfraserviceInstantiation-deleteVolumeGroupInstance-0-angular">Angular</a></li>-->
                                <li class=""><a href="#examples-OnapsoinfraserviceInstantiation-deleteVolumeGroupInstance-0-csharp">C#</a></li>
                                <li class=""><a href="#examples-OnapsoinfraserviceInstantiation-deleteVolumeGroupInstance-0-php">PHP</a></li>
                                <li class=""><a href="#examples-OnapsoinfraserviceInstantiation-deleteVolumeGroupInstance-0-perl">Perl</a></li>
                                <li class=""><a href="#examples-OnapsoinfraserviceInstantiation-deleteVolumeGroupInstance-0-python">Python</a></li>
                            </ul>

                            <div class="tab-content">
                                <div class="tab-pane active" id="examples-OnapsoinfraserviceInstantiation-deleteVolumeGroupInstance-0-curl">
                                    <pre class="prettyprint"><code class="language-bsh">curl -X DELETE "http://localhost/onap/so/infra/serviceInstantiation/{version}/serviceInstances/{serviceInstanceId}/vnfs/{vnfInstanceId}/volumeGroups/{volumeGroupInstanceId}"</code></pre>
                                </div>
                                <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-deleteVolumeGroupInstance-0-java">
                            <pre class="prettyprint"><code class="language-java">import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.OnapsoinfraserviceInstantiationApi;

import java.io.File;
import java.util.*;

public class OnapsoinfraserviceInstantiationApiExample {

    public static void main(String[] args) {

        OnapsoinfraserviceInstantiationApi apiInstance = new OnapsoinfraserviceInstantiationApi();
        String version = version_example; // String |
        String serviceInstanceId = serviceInstanceId_example; // String |
        String vnfInstanceId = vnfInstanceId_example; // String |
        String volumeGroupInstanceId = volumeGroupInstanceId_example; // String |
        String body = body_example; // String |
        try {
            apiInstance.deleteVolumeGroupInstance(version, serviceInstanceId, vnfInstanceId, volumeGroupInstanceId, body);
        } catch (ApiException e) {
            System.err.println("Exception when calling OnapsoinfraserviceInstantiationApi#deleteVolumeGroupInstance");
            e.printStackTrace();
        }
    }
}</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-deleteVolumeGroupInstance-0-android">
                            <pre class="prettyprint"><code class="language-java">import io.swagger.client.api.OnapsoinfraserviceInstantiationApi;

public class OnapsoinfraserviceInstantiationApiExample {

    public static void main(String[] args) {
        OnapsoinfraserviceInstantiationApi apiInstance = new OnapsoinfraserviceInstantiationApi();
        String version = version_example; // String |
        String serviceInstanceId = serviceInstanceId_example; // String |
        String vnfInstanceId = vnfInstanceId_example; // String |
        String volumeGroupInstanceId = volumeGroupInstanceId_example; // String |
        String body = body_example; // String |
        try {
            apiInstance.deleteVolumeGroupInstance(version, serviceInstanceId, vnfInstanceId, volumeGroupInstanceId, body);
        } catch (ApiException e) {
            System.err.println("Exception when calling OnapsoinfraserviceInstantiationApi#deleteVolumeGroupInstance");
            e.printStackTrace();
        }
    }
}</code></pre>
                                </div>
                                <!--
  <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-deleteVolumeGroupInstance-0-groovy">
  <pre class="prettyprint language-json prettyprinted" data-type="json"><code>Coming Soon!</code></pre>
  </div> -->
                                <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-deleteVolumeGroupInstance-0-objc">
                              <pre class="prettyprint"><code class="language-cpp">String *version = version_example; //
String *serviceInstanceId = serviceInstanceId_example; //
String *vnfInstanceId = vnfInstanceId_example; //
String *volumeGroupInstanceId = volumeGroupInstanceId_example; //
String *body = body_example; //  (optional)

OnapsoinfraserviceInstantiationApi *apiInstance = [[OnapsoinfraserviceInstantiationApi alloc] init];

// Delete provided VolumeGroup instance
[apiInstance deleteVolumeGroupInstanceWith:version
    serviceInstanceId:serviceInstanceId
    vnfInstanceId:vnfInstanceId
    volumeGroupInstanceId:volumeGroupInstanceId
    body:body
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-deleteVolumeGroupInstance-0-javascript">
                              <pre class="prettyprint"><code class="language-js">var SoGuilinApIs = require('so_guilin_ap_is');

var api = new SoGuilinApIs.OnapsoinfraserviceInstantiationApi()

var version = version_example; // {String}

var serviceInstanceId = serviceInstanceId_example; // {String}

var vnfInstanceId = vnfInstanceId_example; // {String}

var volumeGroupInstanceId = volumeGroupInstanceId_example; // {String}

var opts = {
  'body': body_example // {String}
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.deleteVolumeGroupInstance(version, serviceInstanceId, vnfInstanceId, volumeGroupInstanceId, opts, callback);
</code></pre>
                                </div>

                                <!--<div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-deleteVolumeGroupInstance-0-angular">
              <pre class="prettyprint language-json prettyprinted" data-type="json"><code>Coming Soon!</code></pre>
            </div>-->
                                <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-deleteVolumeGroupInstance-0-csharp">
                              <pre class="prettyprint"><code class="language-cs">using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class deleteVolumeGroupInstanceExample
    {
        public void main()
        {

            var apiInstance = new OnapsoinfraserviceInstantiationApi();
            var version = version_example;  // String |
            var serviceInstanceId = serviceInstanceId_example;  // String |
            var vnfInstanceId = vnfInstanceId_example;  // String |
            var volumeGroupInstanceId = volumeGroupInstanceId_example;  // String |
            var body = body_example;  // String |  (optional)

            try
            {
                // Delete provided VolumeGroup instance
                apiInstance.deleteVolumeGroupInstance(version, serviceInstanceId, vnfInstanceId, volumeGroupInstanceId, body);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling OnapsoinfraserviceInstantiationApi.deleteVolumeGroupInstance: " + e.Message );
            }
        }
    }
}
</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-deleteVolumeGroupInstance-0-php">
                              <pre class="prettyprint"><code class="language-php"><&#63;php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\OnapsoinfraserviceInstantiationApi();
$version = version_example; // String |
$serviceInstanceId = serviceInstanceId_example; // String |
$vnfInstanceId = vnfInstanceId_example; // String |
$volumeGroupInstanceId = volumeGroupInstanceId_example; // String |
$body = body_example; // String |

try {
    $api_instance->deleteVolumeGroupInstance($version, $serviceInstanceId, $vnfInstanceId, $volumeGroupInstanceId, $body);
} catch (Exception $e) {
    echo 'Exception when calling OnapsoinfraserviceInstantiationApi->deleteVolumeGroupInstance: ', $e->getMessage(), PHP_EOL;
}
?></code></pre>
                                </div>

                                <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-deleteVolumeGroupInstance-0-perl">
                              <pre class="prettyprint"><code class="language-perl">use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::OnapsoinfraserviceInstantiationApi;

my $api_instance = WWW::SwaggerClient::OnapsoinfraserviceInstantiationApi->new();
my $version = version_example; # String |
my $serviceInstanceId = serviceInstanceId_example; # String |
my $vnfInstanceId = vnfInstanceId_example; # String |
my $volumeGroupInstanceId = volumeGroupInstanceId_example; # String |
my $body = WWW::SwaggerClient::Object::String->new(); # String |

eval {
    $api_instance->deleteVolumeGroupInstance(version => $version, serviceInstanceId => $serviceInstanceId, vnfInstanceId => $vnfInstanceId, volumeGroupInstanceId => $volumeGroupInstanceId, body => $body);
};
if ($@) {
    warn "Exception when calling OnapsoinfraserviceInstantiationApi->deleteVolumeGroupInstance: $@\n";
}</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-deleteVolumeGroupInstance-0-python">
                              <pre class="prettyprint"><code class="language-python">from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.OnapsoinfraserviceInstantiationApi()
version = version_example # String |
serviceInstanceId = serviceInstanceId_example # String |
vnfInstanceId = vnfInstanceId_example # String |
volumeGroupInstanceId = volumeGroupInstanceId_example # String |
body = body_example # String |  (optional)

try:
    # Delete provided VolumeGroup instance
    api_instance.delete_volume_group_instance(version, serviceInstanceId, vnfInstanceId, volumeGroupInstanceId, body=body)
except ApiException as e:
    print("Exception when calling OnapsoinfraserviceInstantiationApi->deleteVolumeGroupInstance: %s\n" % e)</code></pre>
                                </div>
                            </div>

                            <h2>Parameters</h2>

                            <div class="methodsubtabletitle">Path parameters</div>
                            <table id="methodsubtable">
                                <tr>
                                    <th width="150px">Name</th>
                                    <th>Description</th>
                                </tr>
                                <tr><td style="width:150px;">version*</td>
                                    <td>


                                        <div id="d2e199_deleteVolumeGroupInstance_version">
                                            <div class="json-schema-view">
                                                <div class="primitive">
                <span class="type">
                    String
                </span>

                                                </div>
                                                <div class="inner required">
                                                    Required
                                                </div>
                                            </div>
                                        </div>
                                    </td>
                                </tr>

                                <tr><td style="width:150px;">serviceInstanceId*</td>
                                    <td>


                                        <div id="d2e199_deleteVolumeGroupInstance_serviceInstanceId">
                                            <div class="json-schema-view">
                                                <div class="primitive">
                <span class="type">
                    String
                </span>

                                                </div>
                                                <div class="inner required">
                                                    Required
                                                </div>
                                            </div>
                                        </div>
                                    </td>
                                </tr>

                                <tr><td style="width:150px;">vnfInstanceId*</td>
                                    <td>


                                        <div id="d2e199_deleteVolumeGroupInstance_vnfInstanceId">
                                            <div class="json-schema-view">
                                                <div class="primitive">
                <span class="type">
                    String
                </span>

                                                </div>
                                                <div class="inner required">
                                                    Required
                                                </div>
                                            </div>
                                        </div>
                                    </td>
                                </tr>

                                <tr><td style="width:150px;">volumeGroupInstanceId*</td>
                                    <td>


                                        <div id="d2e199_deleteVolumeGroupInstance_volumeGroupInstanceId">
                                            <div class="json-schema-view">
                                                <div class="primitive">
                <span class="type">
                    String
                </span>

                                                </div>
                                                <div class="inner required">
                                                    Required
                                                </div>
                                            </div>
                                        </div>
                                    </td>
                                </tr>

                            </table>


                            <div class="methodsubtabletitle">Body parameters</div>
                            <table id="methodsubtable">
                                <tr>
                                    <th width="150px">Name</th>
                                    <th>Description</th>
                                </tr>
                                <tr><td style="width:150px;">body </td>
                                    <td>


                                        <script>
$(document).ready(function() {
  var schemaWrapper = {
  "in" : "body",
  "name" : "body",
  "required" : false,
  "schema" : {
    "type" : "string"
  }
};
  var schema = schemaWrapper.schema;
  if (schema.$ref != null) {
    schema = defsParser.$refs.get(schema.$ref);
  } else {
    schemaWrapper.definitions = Object.assign({}, defs);
    $RefParser.dereference(schemaWrapper).catch(function(err) {
      console.log(err);
    });
  }

  var view = new JSONSchemaView(schema,2,{isBodyParam: true});
  var result = $('#d2e199_deleteVolumeGroupInstance_body');
  result.empty();
  result.append(view.render());
});
</script>
                                        <div id="d2e199_deleteVolumeGroupInstance_body"></div>
                                    </td>
                                </tr>

                            </table>



                            <h2>Responses</h2>
                            <h3> Status: default - successful operation </h3>

                            <ul class="nav nav-tabs nav-tabs-examples" >
                            </ul>

                            <div class="tab-content" style='margin-bottom: 10px;'>
                            </div>

                        </article>
                    </div>
                    <hr>
                    <div id="api-OnapsoinfraserviceInstantiation-disablePort">
                        <article id="api-OnapsoinfraserviceInstantiation-disablePort-0" data-group="User" data-name="disablePort" data-version="0">
                            <div class="pull-left">
                                <h1>disablePort</h1>
                                <p>Disable Port Mirroring</p>
                            </div>
                            <div class="pull-right"></div>
                            <div class="clearfix"></div>
                            <p></p>
                            <p class="marked"></p>
                            <p></p>
                            <br />
                            <pre class="prettyprint language-html prettyprinted" data-type="post"><code><span class="pln">/onap/so/infra/serviceInstantiation/{version}/serviceInstances/{serviceInstanceId}/configurations/{configurationInstanceId}/disablePort</span></code></pre>
                            <p>
                            <h3>Usage and SDK Samples</h3>
                            </p>
                            <ul class="nav nav-tabs nav-tabs-examples">
                                <li class="active"><a href="#examples-OnapsoinfraserviceInstantiation-disablePort-0-curl">Curl</a></li>
                                <li class=""><a href="#examples-OnapsoinfraserviceInstantiation-disablePort-0-java">Java</a></li>
                                <li class=""><a href="#examples-OnapsoinfraserviceInstantiation-disablePort-0-android">Android</a></li>
                                <!--<li class=""><a href="#examples-OnapsoinfraserviceInstantiation-disablePort-0-groovy">Groovy</a></li>-->
                                <li class=""><a href="#examples-OnapsoinfraserviceInstantiation-disablePort-0-objc">Obj-C</a></li>
                                <li class=""><a href="#examples-OnapsoinfraserviceInstantiation-disablePort-0-javascript">JavaScript</a></li>
                                <!--<li class=""><a href="#examples-OnapsoinfraserviceInstantiation-disablePort-0-angular">Angular</a></li>-->
                                <li class=""><a href="#examples-OnapsoinfraserviceInstantiation-disablePort-0-csharp">C#</a></li>
                                <li class=""><a href="#examples-OnapsoinfraserviceInstantiation-disablePort-0-php">PHP</a></li>
                                <li class=""><a href="#examples-OnapsoinfraserviceInstantiation-disablePort-0-perl">Perl</a></li>
                                <li class=""><a href="#examples-OnapsoinfraserviceInstantiation-disablePort-0-python">Python</a></li>
                            </ul>

                            <div class="tab-content">
                                <div class="tab-pane active" id="examples-OnapsoinfraserviceInstantiation-disablePort-0-curl">
                                    <pre class="prettyprint"><code class="language-bsh">curl -X POST "http://localhost/onap/so/infra/serviceInstantiation/{version}/serviceInstances/{serviceInstanceId}/configurations/{configurationInstanceId}/disablePort"</code></pre>
                                </div>
                                <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-disablePort-0-java">
                            <pre class="prettyprint"><code class="language-java">import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.OnapsoinfraserviceInstantiationApi;

import java.io.File;
import java.util.*;

public class OnapsoinfraserviceInstantiationApiExample {

    public static void main(String[] args) {

        OnapsoinfraserviceInstantiationApi apiInstance = new OnapsoinfraserviceInstantiationApi();
        String version = version_example; // String |
        String serviceInstanceId = serviceInstanceId_example; // String |
        String configurationInstanceId = configurationInstanceId_example; // String |
        String body = body_example; // String |
        try {
            apiInstance.disablePort(version, serviceInstanceId, configurationInstanceId, body);
        } catch (ApiException e) {
            System.err.println("Exception when calling OnapsoinfraserviceInstantiationApi#disablePort");
            e.printStackTrace();
        }
    }
}</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-disablePort-0-android">
                            <pre class="prettyprint"><code class="language-java">import io.swagger.client.api.OnapsoinfraserviceInstantiationApi;

public class OnapsoinfraserviceInstantiationApiExample {

    public static void main(String[] args) {
        OnapsoinfraserviceInstantiationApi apiInstance = new OnapsoinfraserviceInstantiationApi();
        String version = version_example; // String |
        String serviceInstanceId = serviceInstanceId_example; // String |
        String configurationInstanceId = configurationInstanceId_example; // String |
        String body = body_example; // String |
        try {
            apiInstance.disablePort(version, serviceInstanceId, configurationInstanceId, body);
        } catch (ApiException e) {
            System.err.println("Exception when calling OnapsoinfraserviceInstantiationApi#disablePort");
            e.printStackTrace();
        }
    }
}</code></pre>
                                </div>
                                <!--
  <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-disablePort-0-groovy">
  <pre class="prettyprint language-json prettyprinted" data-type="json"><code>Coming Soon!</code></pre>
  </div> -->
                                <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-disablePort-0-objc">
                              <pre class="prettyprint"><code class="language-cpp">String *version = version_example; //
String *serviceInstanceId = serviceInstanceId_example; //
String *configurationInstanceId = configurationInstanceId_example; //
String *body = body_example; //  (optional)

OnapsoinfraserviceInstantiationApi *apiInstance = [[OnapsoinfraserviceInstantiationApi alloc] init];

// Disable Port Mirroring
[apiInstance disablePortWith:version
    serviceInstanceId:serviceInstanceId
    configurationInstanceId:configurationInstanceId
    body:body
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-disablePort-0-javascript">
                              <pre class="prettyprint"><code class="language-js">var SoGuilinApIs = require('so_guilin_ap_is');

var api = new SoGuilinApIs.OnapsoinfraserviceInstantiationApi()

var version = version_example; // {String}

var serviceInstanceId = serviceInstanceId_example; // {String}

var configurationInstanceId = configurationInstanceId_example; // {String}

var opts = {
  'body': body_example // {String}
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.disablePort(version, serviceInstanceId, configurationInstanceId, opts, callback);
</code></pre>
                                </div>

                                <!--<div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-disablePort-0-angular">
              <pre class="prettyprint language-json prettyprinted" data-type="json"><code>Coming Soon!</code></pre>
            </div>-->
                                <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-disablePort-0-csharp">
                              <pre class="prettyprint"><code class="language-cs">using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class disablePortExample
    {
        public void main()
        {

            var apiInstance = new OnapsoinfraserviceInstantiationApi();
            var version = version_example;  // String |
            var serviceInstanceId = serviceInstanceId_example;  // String |
            var configurationInstanceId = configurationInstanceId_example;  // String |
            var body = body_example;  // String |  (optional)

            try
            {
                // Disable Port Mirroring
                apiInstance.disablePort(version, serviceInstanceId, configurationInstanceId, body);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling OnapsoinfraserviceInstantiationApi.disablePort: " + e.Message );
            }
        }
    }
}
</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-disablePort-0-php">
                              <pre class="prettyprint"><code class="language-php"><&#63;php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\OnapsoinfraserviceInstantiationApi();
$version = version_example; // String |
$serviceInstanceId = serviceInstanceId_example; // String |
$configurationInstanceId = configurationInstanceId_example; // String |
$body = body_example; // String |

try {
    $api_instance->disablePort($version, $serviceInstanceId, $configurationInstanceId, $body);
} catch (Exception $e) {
    echo 'Exception when calling OnapsoinfraserviceInstantiationApi->disablePort: ', $e->getMessage(), PHP_EOL;
}
?></code></pre>
                                </div>

                                <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-disablePort-0-perl">
                              <pre class="prettyprint"><code class="language-perl">use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::OnapsoinfraserviceInstantiationApi;

my $api_instance = WWW::SwaggerClient::OnapsoinfraserviceInstantiationApi->new();
my $version = version_example; # String |
my $serviceInstanceId = serviceInstanceId_example; # String |
my $configurationInstanceId = configurationInstanceId_example; # String |
my $body = WWW::SwaggerClient::Object::String->new(); # String |

eval {
    $api_instance->disablePort(version => $version, serviceInstanceId => $serviceInstanceId, configurationInstanceId => $configurationInstanceId, body => $body);
};
if ($@) {
    warn "Exception when calling OnapsoinfraserviceInstantiationApi->disablePort: $@\n";
}</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-disablePort-0-python">
                              <pre class="prettyprint"><code class="language-python">from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.OnapsoinfraserviceInstantiationApi()
version = version_example # String |
serviceInstanceId = serviceInstanceId_example # String |
configurationInstanceId = configurationInstanceId_example # String |
body = body_example # String |  (optional)

try:
    # Disable Port Mirroring
    api_instance.disable_port(version, serviceInstanceId, configurationInstanceId, body=body)
except ApiException as e:
    print("Exception when calling OnapsoinfraserviceInstantiationApi->disablePort: %s\n" % e)</code></pre>
                                </div>
                            </div>

                            <h2>Parameters</h2>

                            <div class="methodsubtabletitle">Path parameters</div>
                            <table id="methodsubtable">
                                <tr>
                                    <th width="150px">Name</th>
                                    <th>Description</th>
                                </tr>
                                <tr><td style="width:150px;">version*</td>
                                    <td>


                                        <div id="d2e199_disablePort_version">
                                            <div class="json-schema-view">
                                                <div class="primitive">
                <span class="type">
                    String
                </span>

                                                </div>
                                                <div class="inner required">
                                                    Required
                                                </div>
                                            </div>
                                        </div>
                                    </td>
                                </tr>

                                <tr><td style="width:150px;">serviceInstanceId*</td>
                                    <td>


                                        <div id="d2e199_disablePort_serviceInstanceId">
                                            <div class="json-schema-view">
                                                <div class="primitive">
                <span class="type">
                    String
                </span>

                                                </div>
                                                <div class="inner required">
                                                    Required
                                                </div>
                                            </div>
                                        </div>
                                    </td>
                                </tr>

                                <tr><td style="width:150px;">configurationInstanceId*</td>
                                    <td>


                                        <div id="d2e199_disablePort_configurationInstanceId">
                                            <div class="json-schema-view">
                                                <div class="primitive">
                <span class="type">
                    String
                </span>

                                                </div>
                                                <div class="inner required">
                                                    Required
                                                </div>
                                            </div>
                                        </div>
                                    </td>
                                </tr>

                            </table>


                            <div class="methodsubtabletitle">Body parameters</div>
                            <table id="methodsubtable">
                                <tr>
                                    <th width="150px">Name</th>
                                    <th>Description</th>
                                </tr>
                                <tr><td style="width:150px;">body </td>
                                    <td>


                                        <script>
$(document).ready(function() {
  var schemaWrapper = {
  "in" : "body",
  "name" : "body",
  "required" : false,
  "schema" : {
    "type" : "string"
  }
};
  var schema = schemaWrapper.schema;
  if (schema.$ref != null) {
    schema = defsParser.$refs.get(schema.$ref);
  } else {
    schemaWrapper.definitions = Object.assign({}, defs);
    $RefParser.dereference(schemaWrapper).catch(function(err) {
      console.log(err);
    });
  }

  var view = new JSONSchemaView(schema,2,{isBodyParam: true});
  var result = $('#d2e199_disablePort_body');
  result.empty();
  result.append(view.render());
});
</script>
                                        <div id="d2e199_disablePort_body"></div>
                                    </td>
                                </tr>

                            </table>



                            <h2>Responses</h2>
                            <h3> Status: default - successful operation </h3>

                            <ul class="nav nav-tabs nav-tabs-examples" >
                            </ul>

                            <div class="tab-content" style='margin-bottom: 10px;'>
                            </div>

                        </article>
                    </div>
                    <hr>
                    <div id="api-OnapsoinfraserviceInstantiation-enablePort">
                        <article id="api-OnapsoinfraserviceInstantiation-enablePort-0" data-group="User" data-name="enablePort" data-version="0">
                            <div class="pull-left">
                                <h1>enablePort</h1>
                                <p>Enable Port Mirroring</p>
                            </div>
                            <div class="pull-right"></div>
                            <div class="clearfix"></div>
                            <p></p>
                            <p class="marked"></p>
                            <p></p>
                            <br />
                            <pre class="prettyprint language-html prettyprinted" data-type="post"><code><span class="pln">/onap/so/infra/serviceInstantiation/{version}/serviceInstances/{serviceInstanceId}/configurations/{configurationInstanceId}/enablePort</span></code></pre>
                            <p>
                            <h3>Usage and SDK Samples</h3>
                            </p>
                            <ul class="nav nav-tabs nav-tabs-examples">
                                <li class="active"><a href="#examples-OnapsoinfraserviceInstantiation-enablePort-0-curl">Curl</a></li>
                                <li class=""><a href="#examples-OnapsoinfraserviceInstantiation-enablePort-0-java">Java</a></li>
                                <li class=""><a href="#examples-OnapsoinfraserviceInstantiation-enablePort-0-android">Android</a></li>
                                <!--<li class=""><a href="#examples-OnapsoinfraserviceInstantiation-enablePort-0-groovy">Groovy</a></li>-->
                                <li class=""><a href="#examples-OnapsoinfraserviceInstantiation-enablePort-0-objc">Obj-C</a></li>
                                <li class=""><a href="#examples-OnapsoinfraserviceInstantiation-enablePort-0-javascript">JavaScript</a></li>
                                <!--<li class=""><a href="#examples-OnapsoinfraserviceInstantiation-enablePort-0-angular">Angular</a></li>-->
                                <li class=""><a href="#examples-OnapsoinfraserviceInstantiation-enablePort-0-csharp">C#</a></li>
                                <li class=""><a href="#examples-OnapsoinfraserviceInstantiation-enablePort-0-php">PHP</a></li>
                                <li class=""><a href="#examples-OnapsoinfraserviceInstantiation-enablePort-0-perl">Perl</a></li>
                                <li class=""><a href="#examples-OnapsoinfraserviceInstantiation-enablePort-0-python">Python</a></li>
                            </ul>

                            <div class="tab-content">
                                <div class="tab-pane active" id="examples-OnapsoinfraserviceInstantiation-enablePort-0-curl">
                                    <pre class="prettyprint"><code class="language-bsh">curl -X POST "http://localhost/onap/so/infra/serviceInstantiation/{version}/serviceInstances/{serviceInstanceId}/configurations/{configurationInstanceId}/enablePort"</code></pre>
                                </div>
                                <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-enablePort-0-java">
                            <pre class="prettyprint"><code class="language-java">import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.OnapsoinfraserviceInstantiationApi;

import java.io.File;
import java.util.*;

public class OnapsoinfraserviceInstantiationApiExample {

    public static void main(String[] args) {

        OnapsoinfraserviceInstantiationApi apiInstance = new OnapsoinfraserviceInstantiationApi();
        String version = version_example; // String |
        String serviceInstanceId = serviceInstanceId_example; // String |
        String configurationInstanceId = configurationInstanceId_example; // String |
        String body = body_example; // String |
        try {
            apiInstance.enablePort(version, serviceInstanceId, configurationInstanceId, body);
        } catch (ApiException e) {
            System.err.println("Exception when calling OnapsoinfraserviceInstantiationApi#enablePort");
            e.printStackTrace();
        }
    }
}</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-enablePort-0-android">
                            <pre class="prettyprint"><code class="language-java">import io.swagger.client.api.OnapsoinfraserviceInstantiationApi;

public class OnapsoinfraserviceInstantiationApiExample {

    public static void main(String[] args) {
        OnapsoinfraserviceInstantiationApi apiInstance = new OnapsoinfraserviceInstantiationApi();
        String version = version_example; // String |
        String serviceInstanceId = serviceInstanceId_example; // String |
        String configurationInstanceId = configurationInstanceId_example; // String |
        String body = body_example; // String |
        try {
            apiInstance.enablePort(version, serviceInstanceId, configurationInstanceId, body);
        } catch (ApiException e) {
            System.err.println("Exception when calling OnapsoinfraserviceInstantiationApi#enablePort");
            e.printStackTrace();
        }
    }
}</code></pre>
                                </div>
                                <!--
  <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-enablePort-0-groovy">
  <pre class="prettyprint language-json prettyprinted" data-type="json"><code>Coming Soon!</code></pre>
  </div> -->
                                <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-enablePort-0-objc">
                              <pre class="prettyprint"><code class="language-cpp">String *version = version_example; //
String *serviceInstanceId = serviceInstanceId_example; //
String *configurationInstanceId = configurationInstanceId_example; //
String *body = body_example; //  (optional)

OnapsoinfraserviceInstantiationApi *apiInstance = [[OnapsoinfraserviceInstantiationApi alloc] init];

// Enable Port Mirroring
[apiInstance enablePortWith:version
    serviceInstanceId:serviceInstanceId
    configurationInstanceId:configurationInstanceId
    body:body
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-enablePort-0-javascript">
                              <pre class="prettyprint"><code class="language-js">var SoGuilinApIs = require('so_guilin_ap_is');

var api = new SoGuilinApIs.OnapsoinfraserviceInstantiationApi()

var version = version_example; // {String}

var serviceInstanceId = serviceInstanceId_example; // {String}

var configurationInstanceId = configurationInstanceId_example; // {String}

var opts = {
  'body': body_example // {String}
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.enablePort(version, serviceInstanceId, configurationInstanceId, opts, callback);
</code></pre>
                                </div>

                                <!--<div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-enablePort-0-angular">
              <pre class="prettyprint language-json prettyprinted" data-type="json"><code>Coming Soon!</code></pre>
            </div>-->
                                <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-enablePort-0-csharp">
                              <pre class="prettyprint"><code class="language-cs">using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class enablePortExample
    {
        public void main()
        {

            var apiInstance = new OnapsoinfraserviceInstantiationApi();
            var version = version_example;  // String |
            var serviceInstanceId = serviceInstanceId_example;  // String |
            var configurationInstanceId = configurationInstanceId_example;  // String |
            var body = body_example;  // String |  (optional)

            try
            {
                // Enable Port Mirroring
                apiInstance.enablePort(version, serviceInstanceId, configurationInstanceId, body);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling OnapsoinfraserviceInstantiationApi.enablePort: " + e.Message );
            }
        }
    }
}
</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-enablePort-0-php">
                              <pre class="prettyprint"><code class="language-php"><&#63;php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\OnapsoinfraserviceInstantiationApi();
$version = version_example; // String |
$serviceInstanceId = serviceInstanceId_example; // String |
$configurationInstanceId = configurationInstanceId_example; // String |
$body = body_example; // String |

try {
    $api_instance->enablePort($version, $serviceInstanceId, $configurationInstanceId, $body);
} catch (Exception $e) {
    echo 'Exception when calling OnapsoinfraserviceInstantiationApi->enablePort: ', $e->getMessage(), PHP_EOL;
}
?></code></pre>
                                </div>

                                <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-enablePort-0-perl">
                              <pre class="prettyprint"><code class="language-perl">use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::OnapsoinfraserviceInstantiationApi;

my $api_instance = WWW::SwaggerClient::OnapsoinfraserviceInstantiationApi->new();
my $version = version_example; # String |
my $serviceInstanceId = serviceInstanceId_example; # String |
my $configurationInstanceId = configurationInstanceId_example; # String |
my $body = WWW::SwaggerClient::Object::String->new(); # String |

eval {
    $api_instance->enablePort(version => $version, serviceInstanceId => $serviceInstanceId, configurationInstanceId => $configurationInstanceId, body => $body);
};
if ($@) {
    warn "Exception when calling OnapsoinfraserviceInstantiationApi->enablePort: $@\n";
}</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-enablePort-0-python">
                              <pre class="prettyprint"><code class="language-python">from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.OnapsoinfraserviceInstantiationApi()
version = version_example # String |
serviceInstanceId = serviceInstanceId_example # String |
configurationInstanceId = configurationInstanceId_example # String |
body = body_example # String |  (optional)

try:
    # Enable Port Mirroring
    api_instance.enable_port(version, serviceInstanceId, configurationInstanceId, body=body)
except ApiException as e:
    print("Exception when calling OnapsoinfraserviceInstantiationApi->enablePort: %s\n" % e)</code></pre>
                                </div>
                            </div>

                            <h2>Parameters</h2>

                            <div class="methodsubtabletitle">Path parameters</div>
                            <table id="methodsubtable">
                                <tr>
                                    <th width="150px">Name</th>
                                    <th>Description</th>
                                </tr>
                                <tr><td style="width:150px;">version*</td>
                                    <td>


                                        <div id="d2e199_enablePort_version">
                                            <div class="json-schema-view">
                                                <div class="primitive">
                <span class="type">
                    String
                </span>

                                                </div>
                                                <div class="inner required">
                                                    Required
                                                </div>
                                            </div>
                                        </div>
                                    </td>
                                </tr>

                                <tr><td style="width:150px;">serviceInstanceId*</td>
                                    <td>


                                        <div id="d2e199_enablePort_serviceInstanceId">
                                            <div class="json-schema-view">
                                                <div class="primitive">
                <span class="type">
                    String
                </span>

                                                </div>
                                                <div class="inner required">
                                                    Required
                                                </div>
                                            </div>
                                        </div>
                                    </td>
                                </tr>

                                <tr><td style="width:150px;">configurationInstanceId*</td>
                                    <td>


                                        <div id="d2e199_enablePort_configurationInstanceId">
                                            <div class="json-schema-view">
                                                <div class="primitive">
                <span class="type">
                    String
                </span>

                                                </div>
                                                <div class="inner required">
                                                    Required
                                                </div>
                                            </div>
                                        </div>
                                    </td>
                                </tr>

                            </table>


                            <div class="methodsubtabletitle">Body parameters</div>
                            <table id="methodsubtable">
                                <tr>
                                    <th width="150px">Name</th>
                                    <th>Description</th>
                                </tr>
                                <tr><td style="width:150px;">body </td>
                                    <td>


                                        <script>
$(document).ready(function() {
  var schemaWrapper = {
  "in" : "body",
  "name" : "body",
  "required" : false,
  "schema" : {
    "type" : "string"
  }
};
  var schema = schemaWrapper.schema;
  if (schema.$ref != null) {
    schema = defsParser.$refs.get(schema.$ref);
  } else {
    schemaWrapper.definitions = Object.assign({}, defs);
    $RefParser.dereference(schemaWrapper).catch(function(err) {
      console.log(err);
    });
  }

  var view = new JSONSchemaView(schema,2,{isBodyParam: true});
  var result = $('#d2e199_enablePort_body');
  result.empty();
  result.append(view.render());
});
</script>
                                        <div id="d2e199_enablePort_body"></div>
                                    </td>
                                </tr>

                            </table>



                            <h2>Responses</h2>
                            <h3> Status: default - successful operation </h3>

                            <ul class="nav nav-tabs nav-tabs-examples" >
                            </ul>

                            <div class="tab-content" style='margin-bottom: 10px;'>
                            </div>

                        </article>
                    </div>
                    <hr>
                    <div id="api-OnapsoinfraserviceInstantiation-inPlaceSoftwareUpdate">
                        <article id="api-OnapsoinfraserviceInstantiation-inPlaceSoftwareUpdate-0" data-group="User" data-name="inPlaceSoftwareUpdate" data-version="0">
                            <div class="pull-left">
                                <h1>inPlaceSoftwareUpdate</h1>
                                <p>Perform VNF software update</p>
                            </div>
                            <div class="pull-right"></div>
                            <div class="clearfix"></div>
                            <p></p>
                            <p class="marked"></p>
                            <p></p>
                            <br />
                            <pre class="prettyprint language-html prettyprinted" data-type="post"><code><span class="pln">/onap/so/infra/serviceInstantiation/{version}/serviceInstances/{serviceInstanceId}/vnfs/{vnfInstanceId}/inPlaceSoftwareUpdate</span></code></pre>
                            <p>
                            <h3>Usage and SDK Samples</h3>
                            </p>
                            <ul class="nav nav-tabs nav-tabs-examples">
                                <li class="active"><a href="#examples-OnapsoinfraserviceInstantiation-inPlaceSoftwareUpdate-0-curl">Curl</a></li>
                                <li class=""><a href="#examples-OnapsoinfraserviceInstantiation-inPlaceSoftwareUpdate-0-java">Java</a></li>
                                <li class=""><a href="#examples-OnapsoinfraserviceInstantiation-inPlaceSoftwareUpdate-0-android">Android</a></li>
                                <!--<li class=""><a href="#examples-OnapsoinfraserviceInstantiation-inPlaceSoftwareUpdate-0-groovy">Groovy</a></li>-->
                                <li class=""><a href="#examples-OnapsoinfraserviceInstantiation-inPlaceSoftwareUpdate-0-objc">Obj-C</a></li>
                                <li class=""><a href="#examples-OnapsoinfraserviceInstantiation-inPlaceSoftwareUpdate-0-javascript">JavaScript</a></li>
                                <!--<li class=""><a href="#examples-OnapsoinfraserviceInstantiation-inPlaceSoftwareUpdate-0-angular">Angular</a></li>-->
                                <li class=""><a href="#examples-OnapsoinfraserviceInstantiation-inPlaceSoftwareUpdate-0-csharp">C#</a></li>
                                <li class=""><a href="#examples-OnapsoinfraserviceInstantiation-inPlaceSoftwareUpdate-0-php">PHP</a></li>
                                <li class=""><a href="#examples-OnapsoinfraserviceInstantiation-inPlaceSoftwareUpdate-0-perl">Perl</a></li>
                                <li class=""><a href="#examples-OnapsoinfraserviceInstantiation-inPlaceSoftwareUpdate-0-python">Python</a></li>
                            </ul>

                            <div class="tab-content">
                                <div class="tab-pane active" id="examples-OnapsoinfraserviceInstantiation-inPlaceSoftwareUpdate-0-curl">
                                    <pre class="prettyprint"><code class="language-bsh">curl -X POST "http://localhost/onap/so/infra/serviceInstantiation/{version}/serviceInstances/{serviceInstanceId}/vnfs/{vnfInstanceId}/inPlaceSoftwareUpdate"</code></pre>
                                </div>
                                <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-inPlaceSoftwareUpdate-0-java">
                            <pre class="prettyprint"><code class="language-java">import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.OnapsoinfraserviceInstantiationApi;

import java.io.File;
import java.util.*;

public class OnapsoinfraserviceInstantiationApiExample {

    public static void main(String[] args) {

        OnapsoinfraserviceInstantiationApi apiInstance = new OnapsoinfraserviceInstantiationApi();
        String version = version_example; // String |
        String serviceInstanceId = serviceInstanceId_example; // String |
        String vnfInstanceId = vnfInstanceId_example; // String |
        String body = body_example; // String |
        try {
            apiInstance.inPlaceSoftwareUpdate(version, serviceInstanceId, vnfInstanceId, body);
        } catch (ApiException e) {
            System.err.println("Exception when calling OnapsoinfraserviceInstantiationApi#inPlaceSoftwareUpdate");
            e.printStackTrace();
        }
    }
}</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-inPlaceSoftwareUpdate-0-android">
                            <pre class="prettyprint"><code class="language-java">import io.swagger.client.api.OnapsoinfraserviceInstantiationApi;

public class OnapsoinfraserviceInstantiationApiExample {

    public static void main(String[] args) {
        OnapsoinfraserviceInstantiationApi apiInstance = new OnapsoinfraserviceInstantiationApi();
        String version = version_example; // String |
        String serviceInstanceId = serviceInstanceId_example; // String |
        String vnfInstanceId = vnfInstanceId_example; // String |
        String body = body_example; // String |
        try {
            apiInstance.inPlaceSoftwareUpdate(version, serviceInstanceId, vnfInstanceId, body);
        } catch (ApiException e) {
            System.err.println("Exception when calling OnapsoinfraserviceInstantiationApi#inPlaceSoftwareUpdate");
            e.printStackTrace();
        }
    }
}</code></pre>
                                </div>
                                <!--
  <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-inPlaceSoftwareUpdate-0-groovy">
  <pre class="prettyprint language-json prettyprinted" data-type="json"><code>Coming Soon!</code></pre>
  </div> -->
                                <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-inPlaceSoftwareUpdate-0-objc">
                              <pre class="prettyprint"><code class="language-cpp">String *version = version_example; //
String *serviceInstanceId = serviceInstanceId_example; //
String *vnfInstanceId = vnfInstanceId_example; //
String *body = body_example; //  (optional)

OnapsoinfraserviceInstantiationApi *apiInstance = [[OnapsoinfraserviceInstantiationApi alloc] init];

// Perform VNF software update
[apiInstance inPlaceSoftwareUpdateWith:version
    serviceInstanceId:serviceInstanceId
    vnfInstanceId:vnfInstanceId
    body:body
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-inPlaceSoftwareUpdate-0-javascript">
                              <pre class="prettyprint"><code class="language-js">var SoGuilinApIs = require('so_guilin_ap_is');

var api = new SoGuilinApIs.OnapsoinfraserviceInstantiationApi()

var version = version_example; // {String}

var serviceInstanceId = serviceInstanceId_example; // {String}

var vnfInstanceId = vnfInstanceId_example; // {String}

var opts = {
  'body': body_example // {String}
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.inPlaceSoftwareUpdate(version, serviceInstanceId, vnfInstanceId, opts, callback);
</code></pre>
                                </div>

                                <!--<div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-inPlaceSoftwareUpdate-0-angular">
              <pre class="prettyprint language-json prettyprinted" data-type="json"><code>Coming Soon!</code></pre>
            </div>-->
                                <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-inPlaceSoftwareUpdate-0-csharp">
                              <pre class="prettyprint"><code class="language-cs">using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class inPlaceSoftwareUpdateExample
    {
        public void main()
        {

            var apiInstance = new OnapsoinfraserviceInstantiationApi();
            var version = version_example;  // String |
            var serviceInstanceId = serviceInstanceId_example;  // String |
            var vnfInstanceId = vnfInstanceId_example;  // String |
            var body = body_example;  // String |  (optional)

            try
            {
                // Perform VNF software update
                apiInstance.inPlaceSoftwareUpdate(version, serviceInstanceId, vnfInstanceId, body);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling OnapsoinfraserviceInstantiationApi.inPlaceSoftwareUpdate: " + e.Message );
            }
        }
    }
}
</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-inPlaceSoftwareUpdate-0-php">
                              <pre class="prettyprint"><code class="language-php"><&#63;php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\OnapsoinfraserviceInstantiationApi();
$version = version_example; // String |
$serviceInstanceId = serviceInstanceId_example; // String |
$vnfInstanceId = vnfInstanceId_example; // String |
$body = body_example; // String |

try {
    $api_instance->inPlaceSoftwareUpdate($version, $serviceInstanceId, $vnfInstanceId, $body);
} catch (Exception $e) {
    echo 'Exception when calling OnapsoinfraserviceInstantiationApi->inPlaceSoftwareUpdate: ', $e->getMessage(), PHP_EOL;
}
?></code></pre>
                                </div>

                                <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-inPlaceSoftwareUpdate-0-perl">
                              <pre class="prettyprint"><code class="language-perl">use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::OnapsoinfraserviceInstantiationApi;

my $api_instance = WWW::SwaggerClient::OnapsoinfraserviceInstantiationApi->new();
my $version = version_example; # String |
my $serviceInstanceId = serviceInstanceId_example; # String |
my $vnfInstanceId = vnfInstanceId_example; # String |
my $body = WWW::SwaggerClient::Object::String->new(); # String |

eval {
    $api_instance->inPlaceSoftwareUpdate(version => $version, serviceInstanceId => $serviceInstanceId, vnfInstanceId => $vnfInstanceId, body => $body);
};
if ($@) {
    warn "Exception when calling OnapsoinfraserviceInstantiationApi->inPlaceSoftwareUpdate: $@\n";
}</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-inPlaceSoftwareUpdate-0-python">
                              <pre class="prettyprint"><code class="language-python">from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.OnapsoinfraserviceInstantiationApi()
version = version_example # String |
serviceInstanceId = serviceInstanceId_example # String |
vnfInstanceId = vnfInstanceId_example # String |
body = body_example # String |  (optional)

try:
    # Perform VNF software update
    api_instance.in_place_software_update(version, serviceInstanceId, vnfInstanceId, body=body)
except ApiException as e:
    print("Exception when calling OnapsoinfraserviceInstantiationApi->inPlaceSoftwareUpdate: %s\n" % e)</code></pre>
                                </div>
                            </div>

                            <h2>Parameters</h2>

                            <div class="methodsubtabletitle">Path parameters</div>
                            <table id="methodsubtable">
                                <tr>
                                    <th width="150px">Name</th>
                                    <th>Description</th>
                                </tr>
                                <tr><td style="width:150px;">version*</td>
                                    <td>


                                        <div id="d2e199_inPlaceSoftwareUpdate_version">
                                            <div class="json-schema-view">
                                                <div class="primitive">
                <span class="type">
                    String
                </span>

                                                </div>
                                                <div class="inner required">
                                                    Required
                                                </div>
                                            </div>
                                        </div>
                                    </td>
                                </tr>

                                <tr><td style="width:150px;">serviceInstanceId*</td>
                                    <td>


                                        <div id="d2e199_inPlaceSoftwareUpdate_serviceInstanceId">
                                            <div class="json-schema-view">
                                                <div class="primitive">
                <span class="type">
                    String
                </span>

                                                </div>
                                                <div class="inner required">
                                                    Required
                                                </div>
                                            </div>
                                        </div>
                                    </td>
                                </tr>

                                <tr><td style="width:150px;">vnfInstanceId*</td>
                                    <td>


                                        <div id="d2e199_inPlaceSoftwareUpdate_vnfInstanceId">
                                            <div class="json-schema-view">
                                                <div class="primitive">
                <span class="type">
                    String
                </span>

                                                </div>
                                                <div class="inner required">
                                                    Required
                                                </div>
                                            </div>
                                        </div>
                                    </td>
                                </tr>

                            </table>


                            <div class="methodsubtabletitle">Body parameters</div>
                            <table id="methodsubtable">
                                <tr>
                                    <th width="150px">Name</th>
                                    <th>Description</th>
                                </tr>
                                <tr><td style="width:150px;">body </td>
                                    <td>


                                        <script>
$(document).ready(function() {
  var schemaWrapper = {
  "in" : "body",
  "name" : "body",
  "required" : false,
  "schema" : {
    "type" : "string"
  }
};
  var schema = schemaWrapper.schema;
  if (schema.$ref != null) {
    schema = defsParser.$refs.get(schema.$ref);
  } else {
    schemaWrapper.definitions = Object.assign({}, defs);
    $RefParser.dereference(schemaWrapper).catch(function(err) {
      console.log(err);
    });
  }

  var view = new JSONSchemaView(schema,2,{isBodyParam: true});
  var result = $('#d2e199_inPlaceSoftwareUpdate_body');
  result.empty();
  result.append(view.render());
});
</script>
                                        <div id="d2e199_inPlaceSoftwareUpdate_body"></div>
                                    </td>
                                </tr>

                            </table>



                            <h2>Responses</h2>
                            <h3> Status: default - successful operation </h3>

                            <ul class="nav nav-tabs nav-tabs-examples" >
                            </ul>

                            <div class="tab-content" style='margin-bottom: 10px;'>
                            </div>

                        </article>
                    </div>
                    <hr>
                    <div id="api-OnapsoinfraserviceInstantiation-removeRelationships">
                        <article id="api-OnapsoinfraserviceInstantiation-removeRelationships-0" data-group="User" data-name="removeRelationships" data-version="0">
                            <div class="pull-left">
                                <h1>removeRelationships</h1>
                                <p>Remove Relationships from Service Instance</p>
                            </div>
                            <div class="pull-right"></div>
                            <div class="clearfix"></div>
                            <p></p>
                            <p class="marked"></p>
                            <p></p>
                            <br />
                            <pre class="prettyprint language-html prettyprinted" data-type="post"><code><span class="pln">/onap/so/infra/serviceInstantiation/{version}/serviceInstances/{serviceInstanceId}/removeRelationships</span></code></pre>
                            <p>
                            <h3>Usage and SDK Samples</h3>
                            </p>
                            <ul class="nav nav-tabs nav-tabs-examples">
                                <li class="active"><a href="#examples-OnapsoinfraserviceInstantiation-removeRelationships-0-curl">Curl</a></li>
                                <li class=""><a href="#examples-OnapsoinfraserviceInstantiation-removeRelationships-0-java">Java</a></li>
                                <li class=""><a href="#examples-OnapsoinfraserviceInstantiation-removeRelationships-0-android">Android</a></li>
                                <!--<li class=""><a href="#examples-OnapsoinfraserviceInstantiation-removeRelationships-0-groovy">Groovy</a></li>-->
                                <li class=""><a href="#examples-OnapsoinfraserviceInstantiation-removeRelationships-0-objc">Obj-C</a></li>
                                <li class=""><a href="#examples-OnapsoinfraserviceInstantiation-removeRelationships-0-javascript">JavaScript</a></li>
                                <!--<li class=""><a href="#examples-OnapsoinfraserviceInstantiation-removeRelationships-0-angular">Angular</a></li>-->
                                <li class=""><a href="#examples-OnapsoinfraserviceInstantiation-removeRelationships-0-csharp">C#</a></li>
                                <li class=""><a href="#examples-OnapsoinfraserviceInstantiation-removeRelationships-0-php">PHP</a></li>
                                <li class=""><a href="#examples-OnapsoinfraserviceInstantiation-removeRelationships-0-perl">Perl</a></li>
                                <li class=""><a href="#examples-OnapsoinfraserviceInstantiation-removeRelationships-0-python">Python</a></li>
                            </ul>

                            <div class="tab-content">
                                <div class="tab-pane active" id="examples-OnapsoinfraserviceInstantiation-removeRelationships-0-curl">
                                    <pre class="prettyprint"><code class="language-bsh">curl -X POST "http://localhost/onap/so/infra/serviceInstantiation/{version}/serviceInstances/{serviceInstanceId}/removeRelationships"</code></pre>
                                </div>
                                <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-removeRelationships-0-java">
                            <pre class="prettyprint"><code class="language-java">import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.OnapsoinfraserviceInstantiationApi;

import java.io.File;
import java.util.*;

public class OnapsoinfraserviceInstantiationApiExample {

    public static void main(String[] args) {

        OnapsoinfraserviceInstantiationApi apiInstance = new OnapsoinfraserviceInstantiationApi();
        String version = version_example; // String |
        String serviceInstanceId = serviceInstanceId_example; // String |
        String body = body_example; // String |
        try {
            apiInstance.removeRelationships(version, serviceInstanceId, body);
        } catch (ApiException e) {
            System.err.println("Exception when calling OnapsoinfraserviceInstantiationApi#removeRelationships");
            e.printStackTrace();
        }
    }
}</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-removeRelationships-0-android">
                            <pre class="prettyprint"><code class="language-java">import io.swagger.client.api.OnapsoinfraserviceInstantiationApi;

public class OnapsoinfraserviceInstantiationApiExample {

    public static void main(String[] args) {
        OnapsoinfraserviceInstantiationApi apiInstance = new OnapsoinfraserviceInstantiationApi();
        String version = version_example; // String |
        String serviceInstanceId = serviceInstanceId_example; // String |
        String body = body_example; // String |
        try {
            apiInstance.removeRelationships(version, serviceInstanceId, body);
        } catch (ApiException e) {
            System.err.println("Exception when calling OnapsoinfraserviceInstantiationApi#removeRelationships");
            e.printStackTrace();
        }
    }
}</code></pre>
                                </div>
                                <!--
  <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-removeRelationships-0-groovy">
  <pre class="prettyprint language-json prettyprinted" data-type="json"><code>Coming Soon!</code></pre>
  </div> -->
                                <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-removeRelationships-0-objc">
                              <pre class="prettyprint"><code class="language-cpp">String *version = version_example; //
String *serviceInstanceId = serviceInstanceId_example; //
String *body = body_example; //  (optional)

OnapsoinfraserviceInstantiationApi *apiInstance = [[OnapsoinfraserviceInstantiationApi alloc] init];

// Remove Relationships from Service Instance
[apiInstance removeRelationshipsWith:version
    serviceInstanceId:serviceInstanceId
    body:body
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-removeRelationships-0-javascript">
                              <pre class="prettyprint"><code class="language-js">var SoGuilinApIs = require('so_guilin_ap_is');

var api = new SoGuilinApIs.OnapsoinfraserviceInstantiationApi()

var version = version_example; // {String}

var serviceInstanceId = serviceInstanceId_example; // {String}

var opts = {
  'body': body_example // {String}
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.removeRelationships(version, serviceInstanceId, opts, callback);
</code></pre>
                                </div>

                                <!--<div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-removeRelationships-0-angular">
              <pre class="prettyprint language-json prettyprinted" data-type="json"><code>Coming Soon!</code></pre>
            </div>-->
                                <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-removeRelationships-0-csharp">
                              <pre class="prettyprint"><code class="language-cs">using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class removeRelationshipsExample
    {
        public void main()
        {

            var apiInstance = new OnapsoinfraserviceInstantiationApi();
            var version = version_example;  // String |
            var serviceInstanceId = serviceInstanceId_example;  // String |
            var body = body_example;  // String |  (optional)

            try
            {
                // Remove Relationships from Service Instance
                apiInstance.removeRelationships(version, serviceInstanceId, body);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling OnapsoinfraserviceInstantiationApi.removeRelationships: " + e.Message );
            }
        }
    }
}
</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-removeRelationships-0-php">
                              <pre class="prettyprint"><code class="language-php"><&#63;php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\OnapsoinfraserviceInstantiationApi();
$version = version_example; // String |
$serviceInstanceId = serviceInstanceId_example; // String |
$body = body_example; // String |

try {
    $api_instance->removeRelationships($version, $serviceInstanceId, $body);
} catch (Exception $e) {
    echo 'Exception when calling OnapsoinfraserviceInstantiationApi->removeRelationships: ', $e->getMessage(), PHP_EOL;
}
?></code></pre>
                                </div>

                                <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-removeRelationships-0-perl">
                              <pre class="prettyprint"><code class="language-perl">use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::OnapsoinfraserviceInstantiationApi;

my $api_instance = WWW::SwaggerClient::OnapsoinfraserviceInstantiationApi->new();
my $version = version_example; # String |
my $serviceInstanceId = serviceInstanceId_example; # String |
my $body = WWW::SwaggerClient::Object::String->new(); # String |

eval {
    $api_instance->removeRelationships(version => $version, serviceInstanceId => $serviceInstanceId, body => $body);
};
if ($@) {
    warn "Exception when calling OnapsoinfraserviceInstantiationApi->removeRelationships: $@\n";
}</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-removeRelationships-0-python">
                              <pre class="prettyprint"><code class="language-python">from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.OnapsoinfraserviceInstantiationApi()
version = version_example # String |
serviceInstanceId = serviceInstanceId_example # String |
body = body_example # String |  (optional)

try:
    # Remove Relationships from Service Instance
    api_instance.remove_relationships(version, serviceInstanceId, body=body)
except ApiException as e:
    print("Exception when calling OnapsoinfraserviceInstantiationApi->removeRelationships: %s\n" % e)</code></pre>
                                </div>
                            </div>

                            <h2>Parameters</h2>

                            <div class="methodsubtabletitle">Path parameters</div>
                            <table id="methodsubtable">
                                <tr>
                                    <th width="150px">Name</th>
                                    <th>Description</th>
                                </tr>
                                <tr><td style="width:150px;">version*</td>
                                    <td>


                                        <div id="d2e199_removeRelationships_version">
                                            <div class="json-schema-view">
                                                <div class="primitive">
                <span class="type">
                    String
                </span>

                                                </div>
                                                <div class="inner required">
                                                    Required
                                                </div>
                                            </div>
                                        </div>
                                    </td>
                                </tr>

                                <tr><td style="width:150px;">serviceInstanceId*</td>
                                    <td>


                                        <div id="d2e199_removeRelationships_serviceInstanceId">
                                            <div class="json-schema-view">
                                                <div class="primitive">
                <span class="type">
                    String
                </span>

                                                </div>
                                                <div class="inner required">
                                                    Required
                                                </div>
                                            </div>
                                        </div>
                                    </td>
                                </tr>

                            </table>


                            <div class="methodsubtabletitle">Body parameters</div>
                            <table id="methodsubtable">
                                <tr>
                                    <th width="150px">Name</th>
                                    <th>Description</th>
                                </tr>
                                <tr><td style="width:150px;">body </td>
                                    <td>


                                        <script>
$(document).ready(function() {
  var schemaWrapper = {
  "in" : "body",
  "name" : "body",
  "required" : false,
  "schema" : {
    "type" : "string"
  }
};
  var schema = schemaWrapper.schema;
  if (schema.$ref != null) {
    schema = defsParser.$refs.get(schema.$ref);
  } else {
    schemaWrapper.definitions = Object.assign({}, defs);
    $RefParser.dereference(schemaWrapper).catch(function(err) {
      console.log(err);
    });
  }

  var view = new JSONSchemaView(schema,2,{isBodyParam: true});
  var result = $('#d2e199_removeRelationships_body');
  result.empty();
  result.append(view.render());
});
</script>
                                        <div id="d2e199_removeRelationships_body"></div>
                                    </td>
                                </tr>

                            </table>



                            <h2>Responses</h2>
                            <h3> Status: default - successful operation </h3>

                            <ul class="nav nav-tabs nav-tabs-examples" >
                            </ul>

                            <div class="tab-content" style='margin-bottom: 10px;'>
                            </div>

                        </article>
                    </div>
                    <hr>
                    <div id="api-OnapsoinfraserviceInstantiation-replaceVfModuleInstance">
                        <article id="api-OnapsoinfraserviceInstantiation-replaceVfModuleInstance-0" data-group="User" data-name="replaceVfModuleInstance" data-version="0">
                            <div class="pull-left">
                                <h1>replaceVfModuleInstance</h1>
                                <p>Create VfModule on a specified version, serviceInstance and vnfInstance</p>
                            </div>
                            <div class="pull-right"></div>
                            <div class="clearfix"></div>
                            <p></p>
                            <p class="marked"></p>
                            <p></p>
                            <br />
                            <pre class="prettyprint language-html prettyprinted" data-type="post"><code><span class="pln">/onap/so/infra/serviceInstantiation/{version}/serviceInstances/{serviceInstanceId}/vnfs/{vnfInstanceId}/vfModules/{vfmoduleInstanceId}/replace</span></code></pre>
                            <p>
                            <h3>Usage and SDK Samples</h3>
                            </p>
                            <ul class="nav nav-tabs nav-tabs-examples">
                                <li class="active"><a href="#examples-OnapsoinfraserviceInstantiation-replaceVfModuleInstance-0-curl">Curl</a></li>
                                <li class=""><a href="#examples-OnapsoinfraserviceInstantiation-replaceVfModuleInstance-0-java">Java</a></li>
                                <li class=""><a href="#examples-OnapsoinfraserviceInstantiation-replaceVfModuleInstance-0-android">Android</a></li>
                                <!--<li class=""><a href="#examples-OnapsoinfraserviceInstantiation-replaceVfModuleInstance-0-groovy">Groovy</a></li>-->
                                <li class=""><a href="#examples-OnapsoinfraserviceInstantiation-replaceVfModuleInstance-0-objc">Obj-C</a></li>
                                <li class=""><a href="#examples-OnapsoinfraserviceInstantiation-replaceVfModuleInstance-0-javascript">JavaScript</a></li>
                                <!--<li class=""><a href="#examples-OnapsoinfraserviceInstantiation-replaceVfModuleInstance-0-angular">Angular</a></li>-->
                                <li class=""><a href="#examples-OnapsoinfraserviceInstantiation-replaceVfModuleInstance-0-csharp">C#</a></li>
                                <li class=""><a href="#examples-OnapsoinfraserviceInstantiation-replaceVfModuleInstance-0-php">PHP</a></li>
                                <li class=""><a href="#examples-OnapsoinfraserviceInstantiation-replaceVfModuleInstance-0-perl">Perl</a></li>
                                <li class=""><a href="#examples-OnapsoinfraserviceInstantiation-replaceVfModuleInstance-0-python">Python</a></li>
                            </ul>

                            <div class="tab-content">
                                <div class="tab-pane active" id="examples-OnapsoinfraserviceInstantiation-replaceVfModuleInstance-0-curl">
                                    <pre class="prettyprint"><code class="language-bsh">curl -X POST "http://localhost/onap/so/infra/serviceInstantiation/{version}/serviceInstances/{serviceInstanceId}/vnfs/{vnfInstanceId}/vfModules/{vfmoduleInstanceId}/replace"</code></pre>
                                </div>
                                <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-replaceVfModuleInstance-0-java">
                            <pre class="prettyprint"><code class="language-java">import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.OnapsoinfraserviceInstantiationApi;

import java.io.File;
import java.util.*;

public class OnapsoinfraserviceInstantiationApiExample {

    public static void main(String[] args) {

        OnapsoinfraserviceInstantiationApi apiInstance = new OnapsoinfraserviceInstantiationApi();
        String version = version_example; // String |
        String serviceInstanceId = serviceInstanceId_example; // String |
        String vnfInstanceId = vnfInstanceId_example; // String |
        String vfmoduleInstanceId = vfmoduleInstanceId_example; // String |
        String body = body_example; // String |
        try {
            apiInstance.replaceVfModuleInstance(version, serviceInstanceId, vnfInstanceId, vfmoduleInstanceId, body);
        } catch (ApiException e) {
            System.err.println("Exception when calling OnapsoinfraserviceInstantiationApi#replaceVfModuleInstance");
            e.printStackTrace();
        }
    }
}</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-replaceVfModuleInstance-0-android">
                            <pre class="prettyprint"><code class="language-java">import io.swagger.client.api.OnapsoinfraserviceInstantiationApi;

public class OnapsoinfraserviceInstantiationApiExample {

    public static void main(String[] args) {
        OnapsoinfraserviceInstantiationApi apiInstance = new OnapsoinfraserviceInstantiationApi();
        String version = version_example; // String |
        String serviceInstanceId = serviceInstanceId_example; // String |
        String vnfInstanceId = vnfInstanceId_example; // String |
        String vfmoduleInstanceId = vfmoduleInstanceId_example; // String |
        String body = body_example; // String |
        try {
            apiInstance.replaceVfModuleInstance(version, serviceInstanceId, vnfInstanceId, vfmoduleInstanceId, body);
        } catch (ApiException e) {
            System.err.println("Exception when calling OnapsoinfraserviceInstantiationApi#replaceVfModuleInstance");
            e.printStackTrace();
        }
    }
}</code></pre>
                                </div>
                                <!--
  <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-replaceVfModuleInstance-0-groovy">
  <pre class="prettyprint language-json prettyprinted" data-type="json"><code>Coming Soon!</code></pre>
  </div> -->
                                <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-replaceVfModuleInstance-0-objc">
                              <pre class="prettyprint"><code class="language-cpp">String *version = version_example; //
String *serviceInstanceId = serviceInstanceId_example; //
String *vnfInstanceId = vnfInstanceId_example; //
String *vfmoduleInstanceId = vfmoduleInstanceId_example; //
String *body = body_example; //  (optional)

OnapsoinfraserviceInstantiationApi *apiInstance = [[OnapsoinfraserviceInstantiationApi alloc] init];

// Create VfModule on a specified version, serviceInstance and vnfInstance
[apiInstance replaceVfModuleInstanceWith:version
    serviceInstanceId:serviceInstanceId
    vnfInstanceId:vnfInstanceId
    vfmoduleInstanceId:vfmoduleInstanceId
    body:body
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-replaceVfModuleInstance-0-javascript">
                              <pre class="prettyprint"><code class="language-js">var SoGuilinApIs = require('so_guilin_ap_is');

var api = new SoGuilinApIs.OnapsoinfraserviceInstantiationApi()

var version = version_example; // {String}

var serviceInstanceId = serviceInstanceId_example; // {String}

var vnfInstanceId = vnfInstanceId_example; // {String}

var vfmoduleInstanceId = vfmoduleInstanceId_example; // {String}

var opts = {
  'body': body_example // {String}
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.replaceVfModuleInstance(version, serviceInstanceId, vnfInstanceId, vfmoduleInstanceId, opts, callback);
</code></pre>
                                </div>

                                <!--<div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-replaceVfModuleInstance-0-angular">
              <pre class="prettyprint language-json prettyprinted" data-type="json"><code>Coming Soon!</code></pre>
            </div>-->
                                <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-replaceVfModuleInstance-0-csharp">
                              <pre class="prettyprint"><code class="language-cs">using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class replaceVfModuleInstanceExample
    {
        public void main()
        {

            var apiInstance = new OnapsoinfraserviceInstantiationApi();
            var version = version_example;  // String |
            var serviceInstanceId = serviceInstanceId_example;  // String |
            var vnfInstanceId = vnfInstanceId_example;  // String |
            var vfmoduleInstanceId = vfmoduleInstanceId_example;  // String |
            var body = body_example;  // String |  (optional)

            try
            {
                // Create VfModule on a specified version, serviceInstance and vnfInstance
                apiInstance.replaceVfModuleInstance(version, serviceInstanceId, vnfInstanceId, vfmoduleInstanceId, body);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling OnapsoinfraserviceInstantiationApi.replaceVfModuleInstance: " + e.Message );
            }
        }
    }
}
</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-replaceVfModuleInstance-0-php">
                              <pre class="prettyprint"><code class="language-php"><&#63;php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\OnapsoinfraserviceInstantiationApi();
$version = version_example; // String |
$serviceInstanceId = serviceInstanceId_example; // String |
$vnfInstanceId = vnfInstanceId_example; // String |
$vfmoduleInstanceId = vfmoduleInstanceId_example; // String |
$body = body_example; // String |

try {
    $api_instance->replaceVfModuleInstance($version, $serviceInstanceId, $vnfInstanceId, $vfmoduleInstanceId, $body);
} catch (Exception $e) {
    echo 'Exception when calling OnapsoinfraserviceInstantiationApi->replaceVfModuleInstance: ', $e->getMessage(), PHP_EOL;
}
?></code></pre>
                                </div>

                                <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-replaceVfModuleInstance-0-perl">
                              <pre class="prettyprint"><code class="language-perl">use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::OnapsoinfraserviceInstantiationApi;

my $api_instance = WWW::SwaggerClient::OnapsoinfraserviceInstantiationApi->new();
my $version = version_example; # String |
my $serviceInstanceId = serviceInstanceId_example; # String |
my $vnfInstanceId = vnfInstanceId_example; # String |
my $vfmoduleInstanceId = vfmoduleInstanceId_example; # String |
my $body = WWW::SwaggerClient::Object::String->new(); # String |

eval {
    $api_instance->replaceVfModuleInstance(version => $version, serviceInstanceId => $serviceInstanceId, vnfInstanceId => $vnfInstanceId, vfmoduleInstanceId => $vfmoduleInstanceId, body => $body);
};
if ($@) {
    warn "Exception when calling OnapsoinfraserviceInstantiationApi->replaceVfModuleInstance: $@\n";
}</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-replaceVfModuleInstance-0-python">
                              <pre class="prettyprint"><code class="language-python">from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.OnapsoinfraserviceInstantiationApi()
version = version_example # String |
serviceInstanceId = serviceInstanceId_example # String |
vnfInstanceId = vnfInstanceId_example # String |
vfmoduleInstanceId = vfmoduleInstanceId_example # String |
body = body_example # String |  (optional)

try:
    # Create VfModule on a specified version, serviceInstance and vnfInstance
    api_instance.replace_vf_module_instance(version, serviceInstanceId, vnfInstanceId, vfmoduleInstanceId, body=body)
except ApiException as e:
    print("Exception when calling OnapsoinfraserviceInstantiationApi->replaceVfModuleInstance: %s\n" % e)</code></pre>
                                </div>
                            </div>

                            <h2>Parameters</h2>

                            <div class="methodsubtabletitle">Path parameters</div>
                            <table id="methodsubtable">
                                <tr>
                                    <th width="150px">Name</th>
                                    <th>Description</th>
                                </tr>
                                <tr><td style="width:150px;">version*</td>
                                    <td>


                                        <div id="d2e199_replaceVfModuleInstance_version">
                                            <div class="json-schema-view">
                                                <div class="primitive">
                <span class="type">
                    String
                </span>

                                                </div>
                                                <div class="inner required">
                                                    Required
                                                </div>
                                            </div>
                                        </div>
                                    </td>
                                </tr>

                                <tr><td style="width:150px;">serviceInstanceId*</td>
                                    <td>


                                        <div id="d2e199_replaceVfModuleInstance_serviceInstanceId">
                                            <div class="json-schema-view">
                                                <div class="primitive">
                <span class="type">
                    String
                </span>

                                                </div>
                                                <div class="inner required">
                                                    Required
                                                </div>
                                            </div>
                                        </div>
                                    </td>
                                </tr>

                                <tr><td style="width:150px;">vnfInstanceId*</td>
                                    <td>


                                        <div id="d2e199_replaceVfModuleInstance_vnfInstanceId">
                                            <div class="json-schema-view">
                                                <div class="primitive">
                <span class="type">
                    String
                </span>

                                                </div>
                                                <div class="inner required">
                                                    Required
                                                </div>
                                            </div>
                                        </div>
                                    </td>
                                </tr>

                                <tr><td style="width:150px;">vfmoduleInstanceId*</td>
                                    <td>


                                        <div id="d2e199_replaceVfModuleInstance_vfmoduleInstanceId">
                                            <div class="json-schema-view">
                                                <div class="primitive">
                <span class="type">
                    String
                </span>

                                                </div>
                                                <div class="inner required">
                                                    Required
                                                </div>
                                            </div>
                                        </div>
                                    </td>
                                </tr>

                            </table>


                            <div class="methodsubtabletitle">Body parameters</div>
                            <table id="methodsubtable">
                                <tr>
                                    <th width="150px">Name</th>
                                    <th>Description</th>
                                </tr>
                                <tr><td style="width:150px;">body </td>
                                    <td>


                                        <script>
$(document).ready(function() {
  var schemaWrapper = {
  "in" : "body",
  "name" : "body",
  "required" : false,
  "schema" : {
    "type" : "string"
  }
};
  var schema = schemaWrapper.schema;
  if (schema.$ref != null) {
    schema = defsParser.$refs.get(schema.$ref);
  } else {
    schemaWrapper.definitions = Object.assign({}, defs);
    $RefParser.dereference(schemaWrapper).catch(function(err) {
      console.log(err);
    });
  }

  var view = new JSONSchemaView(schema,2,{isBodyParam: true});
  var result = $('#d2e199_replaceVfModuleInstance_body');
  result.empty();
  result.append(view.render());
});
</script>
                                        <div id="d2e199_replaceVfModuleInstance_body"></div>
                                    </td>
                                </tr>

                            </table>



                            <h2>Responses</h2>
                            <h3> Status: default - successful operation </h3>

                            <ul class="nav nav-tabs nav-tabs-examples" >
                            </ul>

                            <div class="tab-content" style='margin-bottom: 10px;'>
                            </div>

                        </article>
                    </div>
                    <hr>
                    <div id="api-OnapsoinfraserviceInstantiation-replaceVnfInstance">
                        <article id="api-OnapsoinfraserviceInstantiation-replaceVnfInstance-0" data-group="User" data-name="replaceVnfInstance" data-version="0">
                            <div class="pull-left">
                                <h1>replaceVnfInstance</h1>
                                <p>Replace provided VNF instance</p>
                            </div>
                            <div class="pull-right"></div>
                            <div class="clearfix"></div>
                            <p></p>
                            <p class="marked"></p>
                            <p></p>
                            <br />
                            <pre class="prettyprint language-html prettyprinted" data-type="post"><code><span class="pln">/onap/so/infra/serviceInstantiation/{version}/serviceInstances/{serviceInstanceId}/vnfs/{vnfInstanceId}/replace</span></code></pre>
                            <p>
                            <h3>Usage and SDK Samples</h3>
                            </p>
                            <ul class="nav nav-tabs nav-tabs-examples">
                                <li class="active"><a href="#examples-OnapsoinfraserviceInstantiation-replaceVnfInstance-0-curl">Curl</a></li>
                                <li class=""><a href="#examples-OnapsoinfraserviceInstantiation-replaceVnfInstance-0-java">Java</a></li>
                                <li class=""><a href="#examples-OnapsoinfraserviceInstantiation-replaceVnfInstance-0-android">Android</a></li>
                                <!--<li class=""><a href="#examples-OnapsoinfraserviceInstantiation-replaceVnfInstance-0-groovy">Groovy</a></li>-->
                                <li class=""><a href="#examples-OnapsoinfraserviceInstantiation-replaceVnfInstance-0-objc">Obj-C</a></li>
                                <li class=""><a href="#examples-OnapsoinfraserviceInstantiation-replaceVnfInstance-0-javascript">JavaScript</a></li>
                                <!--<li class=""><a href="#examples-OnapsoinfraserviceInstantiation-replaceVnfInstance-0-angular">Angular</a></li>-->
                                <li class=""><a href="#examples-OnapsoinfraserviceInstantiation-replaceVnfInstance-0-csharp">C#</a></li>
                                <li class=""><a href="#examples-OnapsoinfraserviceInstantiation-replaceVnfInstance-0-php">PHP</a></li>
                                <li class=""><a href="#examples-OnapsoinfraserviceInstantiation-replaceVnfInstance-0-perl">Perl</a></li>
                                <li class=""><a href="#examples-OnapsoinfraserviceInstantiation-replaceVnfInstance-0-python">Python</a></li>
                            </ul>

                            <div class="tab-content">
                                <div class="tab-pane active" id="examples-OnapsoinfraserviceInstantiation-replaceVnfInstance-0-curl">
                                    <pre class="prettyprint"><code class="language-bsh">curl -X POST "http://localhost/onap/so/infra/serviceInstantiation/{version}/serviceInstances/{serviceInstanceId}/vnfs/{vnfInstanceId}/replace"</code></pre>
                                </div>
                                <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-replaceVnfInstance-0-java">
                            <pre class="prettyprint"><code class="language-java">import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.OnapsoinfraserviceInstantiationApi;

import java.io.File;
import java.util.*;

public class OnapsoinfraserviceInstantiationApiExample {

    public static void main(String[] args) {

        OnapsoinfraserviceInstantiationApi apiInstance = new OnapsoinfraserviceInstantiationApi();
        String version = version_example; // String |
        String serviceInstanceId = serviceInstanceId_example; // String |
        String vnfInstanceId = vnfInstanceId_example; // String |
        String body = body_example; // String |
        try {
            apiInstance.replaceVnfInstance(version, serviceInstanceId, vnfInstanceId, body);
        } catch (ApiException e) {
            System.err.println("Exception when calling OnapsoinfraserviceInstantiationApi#replaceVnfInstance");
            e.printStackTrace();
        }
    }
}</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-replaceVnfInstance-0-android">
                            <pre class="prettyprint"><code class="language-java">import io.swagger.client.api.OnapsoinfraserviceInstantiationApi;

public class OnapsoinfraserviceInstantiationApiExample {

    public static void main(String[] args) {
        OnapsoinfraserviceInstantiationApi apiInstance = new OnapsoinfraserviceInstantiationApi();
        String version = version_example; // String |
        String serviceInstanceId = serviceInstanceId_example; // String |
        String vnfInstanceId = vnfInstanceId_example; // String |
        String body = body_example; // String |
        try {
            apiInstance.replaceVnfInstance(version, serviceInstanceId, vnfInstanceId, body);
        } catch (ApiException e) {
            System.err.println("Exception when calling OnapsoinfraserviceInstantiationApi#replaceVnfInstance");
            e.printStackTrace();
        }
    }
}</code></pre>
                                </div>
                                <!--
  <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-replaceVnfInstance-0-groovy">
  <pre class="prettyprint language-json prettyprinted" data-type="json"><code>Coming Soon!</code></pre>
  </div> -->
                                <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-replaceVnfInstance-0-objc">
                              <pre class="prettyprint"><code class="language-cpp">String *version = version_example; //
String *serviceInstanceId = serviceInstanceId_example; //
String *vnfInstanceId = vnfInstanceId_example; //
String *body = body_example; //  (optional)

OnapsoinfraserviceInstantiationApi *apiInstance = [[OnapsoinfraserviceInstantiationApi alloc] init];

// Replace provided VNF instance
[apiInstance replaceVnfInstanceWith:version
    serviceInstanceId:serviceInstanceId
    vnfInstanceId:vnfInstanceId
    body:body
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-replaceVnfInstance-0-javascript">
                              <pre class="prettyprint"><code class="language-js">var SoGuilinApIs = require('so_guilin_ap_is');

var api = new SoGuilinApIs.OnapsoinfraserviceInstantiationApi()

var version = version_example; // {String}

var serviceInstanceId = serviceInstanceId_example; // {String}

var vnfInstanceId = vnfInstanceId_example; // {String}

var opts = {
  'body': body_example // {String}
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.replaceVnfInstance(version, serviceInstanceId, vnfInstanceId, opts, callback);
</code></pre>
                                </div>

                                <!--<div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-replaceVnfInstance-0-angular">
              <pre class="prettyprint language-json prettyprinted" data-type="json"><code>Coming Soon!</code></pre>
            </div>-->
                                <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-replaceVnfInstance-0-csharp">
                              <pre class="prettyprint"><code class="language-cs">using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class replaceVnfInstanceExample
    {
        public void main()
        {

            var apiInstance = new OnapsoinfraserviceInstantiationApi();
            var version = version_example;  // String |
            var serviceInstanceId = serviceInstanceId_example;  // String |
            var vnfInstanceId = vnfInstanceId_example;  // String |
            var body = body_example;  // String |  (optional)

            try
            {
                // Replace provided VNF instance
                apiInstance.replaceVnfInstance(version, serviceInstanceId, vnfInstanceId, body);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling OnapsoinfraserviceInstantiationApi.replaceVnfInstance: " + e.Message );
            }
        }
    }
}
</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-replaceVnfInstance-0-php">
                              <pre class="prettyprint"><code class="language-php"><&#63;php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\OnapsoinfraserviceInstantiationApi();
$version = version_example; // String |
$serviceInstanceId = serviceInstanceId_example; // String |
$vnfInstanceId = vnfInstanceId_example; // String |
$body = body_example; // String |

try {
    $api_instance->replaceVnfInstance($version, $serviceInstanceId, $vnfInstanceId, $body);
} catch (Exception $e) {
    echo 'Exception when calling OnapsoinfraserviceInstantiationApi->replaceVnfInstance: ', $e->getMessage(), PHP_EOL;
}
?></code></pre>
                                </div>

                                <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-replaceVnfInstance-0-perl">
                              <pre class="prettyprint"><code class="language-perl">use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::OnapsoinfraserviceInstantiationApi;

my $api_instance = WWW::SwaggerClient::OnapsoinfraserviceInstantiationApi->new();
my $version = version_example; # String |
my $serviceInstanceId = serviceInstanceId_example; # String |
my $vnfInstanceId = vnfInstanceId_example; # String |
my $body = WWW::SwaggerClient::Object::String->new(); # String |

eval {
    $api_instance->replaceVnfInstance(version => $version, serviceInstanceId => $serviceInstanceId, vnfInstanceId => $vnfInstanceId, body => $body);
};
if ($@) {
    warn "Exception when calling OnapsoinfraserviceInstantiationApi->replaceVnfInstance: $@\n";
}</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-replaceVnfInstance-0-python">
                              <pre class="prettyprint"><code class="language-python">from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.OnapsoinfraserviceInstantiationApi()
version = version_example # String |
serviceInstanceId = serviceInstanceId_example # String |
vnfInstanceId = vnfInstanceId_example # String |
body = body_example # String |  (optional)

try:
    # Replace provided VNF instance
    api_instance.replace_vnf_instance(version, serviceInstanceId, vnfInstanceId, body=body)
except ApiException as e:
    print("Exception when calling OnapsoinfraserviceInstantiationApi->replaceVnfInstance: %s\n" % e)</code></pre>
                                </div>
                            </div>

                            <h2>Parameters</h2>

                            <div class="methodsubtabletitle">Path parameters</div>
                            <table id="methodsubtable">
                                <tr>
                                    <th width="150px">Name</th>
                                    <th>Description</th>
                                </tr>
                                <tr><td style="width:150px;">version*</td>
                                    <td>


                                        <div id="d2e199_replaceVnfInstance_version">
                                            <div class="json-schema-view">
                                                <div class="primitive">
                <span class="type">
                    String
                </span>

                                                </div>
                                                <div class="inner required">
                                                    Required
                                                </div>
                                            </div>
                                        </div>
                                    </td>
                                </tr>

                                <tr><td style="width:150px;">serviceInstanceId*</td>
                                    <td>


                                        <div id="d2e199_replaceVnfInstance_serviceInstanceId">
                                            <div class="json-schema-view">
                                                <div class="primitive">
                <span class="type">
                    String
                </span>

                                                </div>
                                                <div class="inner required">
                                                    Required
                                                </div>
                                            </div>
                                        </div>
                                    </td>
                                </tr>

                                <tr><td style="width:150px;">vnfInstanceId*</td>
                                    <td>


                                        <div id="d2e199_replaceVnfInstance_vnfInstanceId">
                                            <div class="json-schema-view">
                                                <div class="primitive">
                <span class="type">
                    String
                </span>

                                                </div>
                                                <div class="inner required">
                                                    Required
                                                </div>
                                            </div>
                                        </div>
                                    </td>
                                </tr>

                            </table>


                            <div class="methodsubtabletitle">Body parameters</div>
                            <table id="methodsubtable">
                                <tr>
                                    <th width="150px">Name</th>
                                    <th>Description</th>
                                </tr>
                                <tr><td style="width:150px;">body </td>
                                    <td>


                                        <script>
$(document).ready(function() {
  var schemaWrapper = {
  "in" : "body",
  "name" : "body",
  "required" : false,
  "schema" : {
    "type" : "string"
  }
};
  var schema = schemaWrapper.schema;
  if (schema.$ref != null) {
    schema = defsParser.$refs.get(schema.$ref);
  } else {
    schemaWrapper.definitions = Object.assign({}, defs);
    $RefParser.dereference(schemaWrapper).catch(function(err) {
      console.log(err);
    });
  }

  var view = new JSONSchemaView(schema,2,{isBodyParam: true});
  var result = $('#d2e199_replaceVnfInstance_body');
  result.empty();
  result.append(view.render());
});
</script>
                                        <div id="d2e199_replaceVnfInstance_body"></div>
                                    </td>
                                </tr>

                            </table>



                            <h2>Responses</h2>
                            <h3> Status: default - successful operation </h3>

                            <ul class="nav nav-tabs nav-tabs-examples" >
                            </ul>

                            <div class="tab-content" style='margin-bottom: 10px;'>
                            </div>

                        </article>
                    </div>
                    <hr>
                    <div id="api-OnapsoinfraserviceInstantiation-scaleOutVfModule">
                        <article id="api-OnapsoinfraserviceInstantiation-scaleOutVfModule-0" data-group="User" data-name="scaleOutVfModule" data-version="0">
                            <div class="pull-left">
                                <h1>scaleOutVfModule</h1>
                                <p>VF Auto Scale Out</p>
                            </div>
                            <div class="pull-right"></div>
                            <div class="clearfix"></div>
                            <p></p>
                            <p class="marked"></p>
                            <p></p>
                            <br />
                            <pre class="prettyprint language-html prettyprinted" data-type="post"><code><span class="pln">/onap/so/infra/serviceInstantiation/{version}/serviceInstances/{serviceInstanceId}/vnfs/{vnfInstanceId}/vfModules/scaleOut</span></code></pre>
                            <p>
                            <h3>Usage and SDK Samples</h3>
                            </p>
                            <ul class="nav nav-tabs nav-tabs-examples">
                                <li class="active"><a href="#examples-OnapsoinfraserviceInstantiation-scaleOutVfModule-0-curl">Curl</a></li>
                                <li class=""><a href="#examples-OnapsoinfraserviceInstantiation-scaleOutVfModule-0-java">Java</a></li>
                                <li class=""><a href="#examples-OnapsoinfraserviceInstantiation-scaleOutVfModule-0-android">Android</a></li>
                                <!--<li class=""><a href="#examples-OnapsoinfraserviceInstantiation-scaleOutVfModule-0-groovy">Groovy</a></li>-->
                                <li class=""><a href="#examples-OnapsoinfraserviceInstantiation-scaleOutVfModule-0-objc">Obj-C</a></li>
                                <li class=""><a href="#examples-OnapsoinfraserviceInstantiation-scaleOutVfModule-0-javascript">JavaScript</a></li>
                                <!--<li class=""><a href="#examples-OnapsoinfraserviceInstantiation-scaleOutVfModule-0-angular">Angular</a></li>-->
                                <li class=""><a href="#examples-OnapsoinfraserviceInstantiation-scaleOutVfModule-0-csharp">C#</a></li>
                                <li class=""><a href="#examples-OnapsoinfraserviceInstantiation-scaleOutVfModule-0-php">PHP</a></li>
                                <li class=""><a href="#examples-OnapsoinfraserviceInstantiation-scaleOutVfModule-0-perl">Perl</a></li>
                                <li class=""><a href="#examples-OnapsoinfraserviceInstantiation-scaleOutVfModule-0-python">Python</a></li>
                            </ul>

                            <div class="tab-content">
                                <div class="tab-pane active" id="examples-OnapsoinfraserviceInstantiation-scaleOutVfModule-0-curl">
                                    <pre class="prettyprint"><code class="language-bsh">curl -X POST "http://localhost/onap/so/infra/serviceInstantiation/{version}/serviceInstances/{serviceInstanceId}/vnfs/{vnfInstanceId}/vfModules/scaleOut"</code></pre>
                                </div>
                                <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-scaleOutVfModule-0-java">
                            <pre class="prettyprint"><code class="language-java">import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.OnapsoinfraserviceInstantiationApi;

import java.io.File;
import java.util.*;

public class OnapsoinfraserviceInstantiationApiExample {

    public static void main(String[] args) {

        OnapsoinfraserviceInstantiationApi apiInstance = new OnapsoinfraserviceInstantiationApi();
        String version = version_example; // String |
        String serviceInstanceId = serviceInstanceId_example; // String |
        String vnfInstanceId = vnfInstanceId_example; // String |
        String body = body_example; // String |
        try {
            apiInstance.scaleOutVfModule(version, serviceInstanceId, vnfInstanceId, body);
        } catch (ApiException e) {
            System.err.println("Exception when calling OnapsoinfraserviceInstantiationApi#scaleOutVfModule");
            e.printStackTrace();
        }
    }
}</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-scaleOutVfModule-0-android">
                            <pre class="prettyprint"><code class="language-java">import io.swagger.client.api.OnapsoinfraserviceInstantiationApi;

public class OnapsoinfraserviceInstantiationApiExample {

    public static void main(String[] args) {
        OnapsoinfraserviceInstantiationApi apiInstance = new OnapsoinfraserviceInstantiationApi();
        String version = version_example; // String |
        String serviceInstanceId = serviceInstanceId_example; // String |
        String vnfInstanceId = vnfInstanceId_example; // String |
        String body = body_example; // String |
        try {
            apiInstance.scaleOutVfModule(version, serviceInstanceId, vnfInstanceId, body);
        } catch (ApiException e) {
            System.err.println("Exception when calling OnapsoinfraserviceInstantiationApi#scaleOutVfModule");
            e.printStackTrace();
        }
    }
}</code></pre>
                                </div>
                                <!--
  <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-scaleOutVfModule-0-groovy">
  <pre class="prettyprint language-json prettyprinted" data-type="json"><code>Coming Soon!</code></pre>
  </div> -->
                                <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-scaleOutVfModule-0-objc">
                              <pre class="prettyprint"><code class="language-cpp">String *version = version_example; //
String *serviceInstanceId = serviceInstanceId_example; //
String *vnfInstanceId = vnfInstanceId_example; //
String *body = body_example; //  (optional)

OnapsoinfraserviceInstantiationApi *apiInstance = [[OnapsoinfraserviceInstantiationApi alloc] init];

// VF Auto Scale Out
[apiInstance scaleOutVfModuleWith:version
    serviceInstanceId:serviceInstanceId
    vnfInstanceId:vnfInstanceId
    body:body
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-scaleOutVfModule-0-javascript">
                              <pre class="prettyprint"><code class="language-js">var SoGuilinApIs = require('so_guilin_ap_is');

var api = new SoGuilinApIs.OnapsoinfraserviceInstantiationApi()

var version = version_example; // {String}

var serviceInstanceId = serviceInstanceId_example; // {String}

var vnfInstanceId = vnfInstanceId_example; // {String}

var opts = {
  'body': body_example // {String}
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.scaleOutVfModule(version, serviceInstanceId, vnfInstanceId, opts, callback);
</code></pre>
                                </div>

                                <!--<div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-scaleOutVfModule-0-angular">
              <pre class="prettyprint language-json prettyprinted" data-type="json"><code>Coming Soon!</code></pre>
            </div>-->
                                <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-scaleOutVfModule-0-csharp">
                              <pre class="prettyprint"><code class="language-cs">using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class scaleOutVfModuleExample
    {
        public void main()
        {

            var apiInstance = new OnapsoinfraserviceInstantiationApi();
            var version = version_example;  // String |
            var serviceInstanceId = serviceInstanceId_example;  // String |
            var vnfInstanceId = vnfInstanceId_example;  // String |
            var body = body_example;  // String |  (optional)

            try
            {
                // VF Auto Scale Out
                apiInstance.scaleOutVfModule(version, serviceInstanceId, vnfInstanceId, body);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling OnapsoinfraserviceInstantiationApi.scaleOutVfModule: " + e.Message );
            }
        }
    }
}
</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-scaleOutVfModule-0-php">
                              <pre class="prettyprint"><code class="language-php"><&#63;php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\OnapsoinfraserviceInstantiationApi();
$version = version_example; // String |
$serviceInstanceId = serviceInstanceId_example; // String |
$vnfInstanceId = vnfInstanceId_example; // String |
$body = body_example; // String |

try {
    $api_instance->scaleOutVfModule($version, $serviceInstanceId, $vnfInstanceId, $body);
} catch (Exception $e) {
    echo 'Exception when calling OnapsoinfraserviceInstantiationApi->scaleOutVfModule: ', $e->getMessage(), PHP_EOL;
}
?></code></pre>
                                </div>

                                <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-scaleOutVfModule-0-perl">
                              <pre class="prettyprint"><code class="language-perl">use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::OnapsoinfraserviceInstantiationApi;

my $api_instance = WWW::SwaggerClient::OnapsoinfraserviceInstantiationApi->new();
my $version = version_example; # String |
my $serviceInstanceId = serviceInstanceId_example; # String |
my $vnfInstanceId = vnfInstanceId_example; # String |
my $body = WWW::SwaggerClient::Object::String->new(); # String |

eval {
    $api_instance->scaleOutVfModule(version => $version, serviceInstanceId => $serviceInstanceId, vnfInstanceId => $vnfInstanceId, body => $body);
};
if ($@) {
    warn "Exception when calling OnapsoinfraserviceInstantiationApi->scaleOutVfModule: $@\n";
}</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-scaleOutVfModule-0-python">
                              <pre class="prettyprint"><code class="language-python">from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.OnapsoinfraserviceInstantiationApi()
version = version_example # String |
serviceInstanceId = serviceInstanceId_example # String |
vnfInstanceId = vnfInstanceId_example # String |
body = body_example # String |  (optional)

try:
    # VF Auto Scale Out
    api_instance.scale_out_vf_module(version, serviceInstanceId, vnfInstanceId, body=body)
except ApiException as e:
    print("Exception when calling OnapsoinfraserviceInstantiationApi->scaleOutVfModule: %s\n" % e)</code></pre>
                                </div>
                            </div>

                            <h2>Parameters</h2>

                            <div class="methodsubtabletitle">Path parameters</div>
                            <table id="methodsubtable">
                                <tr>
                                    <th width="150px">Name</th>
                                    <th>Description</th>
                                </tr>
                                <tr><td style="width:150px;">version*</td>
                                    <td>


                                        <div id="d2e199_scaleOutVfModule_version">
                                            <div class="json-schema-view">
                                                <div class="primitive">
                <span class="type">
                    String
                </span>

                                                </div>
                                                <div class="inner required">
                                                    Required
                                                </div>
                                            </div>
                                        </div>
                                    </td>
                                </tr>

                                <tr><td style="width:150px;">serviceInstanceId*</td>
                                    <td>


                                        <div id="d2e199_scaleOutVfModule_serviceInstanceId">
                                            <div class="json-schema-view">
                                                <div class="primitive">
                <span class="type">
                    String
                </span>

                                                </div>
                                                <div class="inner required">
                                                    Required
                                                </div>
                                            </div>
                                        </div>
                                    </td>
                                </tr>

                                <tr><td style="width:150px;">vnfInstanceId*</td>
                                    <td>


                                        <div id="d2e199_scaleOutVfModule_vnfInstanceId">
                                            <div class="json-schema-view">
                                                <div class="primitive">
                <span class="type">
                    String
                </span>

                                                </div>
                                                <div class="inner required">
                                                    Required
                                                </div>
                                            </div>
                                        </div>
                                    </td>
                                </tr>

                            </table>


                            <div class="methodsubtabletitle">Body parameters</div>
                            <table id="methodsubtable">
                                <tr>
                                    <th width="150px">Name</th>
                                    <th>Description</th>
                                </tr>
                                <tr><td style="width:150px;">body </td>
                                    <td>


                                        <script>
$(document).ready(function() {
  var schemaWrapper = {
  "in" : "body",
  "name" : "body",
  "required" : false,
  "schema" : {
    "type" : "string"
  }
};
  var schema = schemaWrapper.schema;
  if (schema.$ref != null) {
    schema = defsParser.$refs.get(schema.$ref);
  } else {
    schemaWrapper.definitions = Object.assign({}, defs);
    $RefParser.dereference(schemaWrapper).catch(function(err) {
      console.log(err);
    });
  }

  var view = new JSONSchemaView(schema,2,{isBodyParam: true});
  var result = $('#d2e199_scaleOutVfModule_body');
  result.empty();
  result.append(view.render());
});
</script>
                                        <div id="d2e199_scaleOutVfModule_body"></div>
                                    </td>
                                </tr>

                            </table>



                            <h2>Responses</h2>
                            <h3> Status: default - successful operation </h3>

                            <ul class="nav nav-tabs nav-tabs-examples" >
                            </ul>

                            <div class="tab-content" style='margin-bottom: 10px;'>
                            </div>

                        </article>
                    </div>
                    <hr>
                    <div id="api-OnapsoinfraserviceInstantiation-unassignServiceInstance">
                        <article id="api-OnapsoinfraserviceInstantiation-unassignServiceInstance-0" data-group="User" data-name="unassignServiceInstance" data-version="0">
                            <div class="pull-left">
                                <h1>unassignServiceInstance</h1>
                                <p>Unassign Service Instance</p>
                            </div>
                            <div class="pull-right"></div>
                            <div class="clearfix"></div>
                            <p></p>
                            <p class="marked"></p>
                            <p></p>
                            <br />
                            <pre class="prettyprint language-html prettyprinted" data-type="post"><code><span class="pln">/onap/so/infra/serviceInstantiation/{version}/serviceInstances/{serviceInstanceId}/unassign</span></code></pre>
                            <p>
                            <h3>Usage and SDK Samples</h3>
                            </p>
                            <ul class="nav nav-tabs nav-tabs-examples">
                                <li class="active"><a href="#examples-OnapsoinfraserviceInstantiation-unassignServiceInstance-0-curl">Curl</a></li>
                                <li class=""><a href="#examples-OnapsoinfraserviceInstantiation-unassignServiceInstance-0-java">Java</a></li>
                                <li class=""><a href="#examples-OnapsoinfraserviceInstantiation-unassignServiceInstance-0-android">Android</a></li>
                                <!--<li class=""><a href="#examples-OnapsoinfraserviceInstantiation-unassignServiceInstance-0-groovy">Groovy</a></li>-->
                                <li class=""><a href="#examples-OnapsoinfraserviceInstantiation-unassignServiceInstance-0-objc">Obj-C</a></li>
                                <li class=""><a href="#examples-OnapsoinfraserviceInstantiation-unassignServiceInstance-0-javascript">JavaScript</a></li>
                                <!--<li class=""><a href="#examples-OnapsoinfraserviceInstantiation-unassignServiceInstance-0-angular">Angular</a></li>-->
                                <li class=""><a href="#examples-OnapsoinfraserviceInstantiation-unassignServiceInstance-0-csharp">C#</a></li>
                                <li class=""><a href="#examples-OnapsoinfraserviceInstantiation-unassignServiceInstance-0-php">PHP</a></li>
                                <li class=""><a href="#examples-OnapsoinfraserviceInstantiation-unassignServiceInstance-0-perl">Perl</a></li>
                                <li class=""><a href="#examples-OnapsoinfraserviceInstantiation-unassignServiceInstance-0-python">Python</a></li>
                            </ul>

                            <div class="tab-content">
                                <div class="tab-pane active" id="examples-OnapsoinfraserviceInstantiation-unassignServiceInstance-0-curl">
                                    <pre class="prettyprint"><code class="language-bsh">curl -X POST "http://localhost/onap/so/infra/serviceInstantiation/{version}/serviceInstances/{serviceInstanceId}/unassign"</code></pre>
                                </div>
                                <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-unassignServiceInstance-0-java">
                            <pre class="prettyprint"><code class="language-java">import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.OnapsoinfraserviceInstantiationApi;

import java.io.File;
import java.util.*;

public class OnapsoinfraserviceInstantiationApiExample {

    public static void main(String[] args) {

        OnapsoinfraserviceInstantiationApi apiInstance = new OnapsoinfraserviceInstantiationApi();
        String version = version_example; // String |
        String serviceInstanceId = serviceInstanceId_example; // String |
        String body = body_example; // String |
        try {
            apiInstance.unassignServiceInstance(version, serviceInstanceId, body);
        } catch (ApiException e) {
            System.err.println("Exception when calling OnapsoinfraserviceInstantiationApi#unassignServiceInstance");
            e.printStackTrace();
        }
    }
}</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-unassignServiceInstance-0-android">
                            <pre class="prettyprint"><code class="language-java">import io.swagger.client.api.OnapsoinfraserviceInstantiationApi;

public class OnapsoinfraserviceInstantiationApiExample {

    public static void main(String[] args) {
        OnapsoinfraserviceInstantiationApi apiInstance = new OnapsoinfraserviceInstantiationApi();
        String version = version_example; // String |
        String serviceInstanceId = serviceInstanceId_example; // String |
        String body = body_example; // String |
        try {
            apiInstance.unassignServiceInstance(version, serviceInstanceId, body);
        } catch (ApiException e) {
            System.err.println("Exception when calling OnapsoinfraserviceInstantiationApi#unassignServiceInstance");
            e.printStackTrace();
        }
    }
}</code></pre>
                                </div>
                                <!--
  <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-unassignServiceInstance-0-groovy">
  <pre class="prettyprint language-json prettyprinted" data-type="json"><code>Coming Soon!</code></pre>
  </div> -->
                                <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-unassignServiceInstance-0-objc">
                              <pre class="prettyprint"><code class="language-cpp">String *version = version_example; //
String *serviceInstanceId = serviceInstanceId_example; //
String *body = body_example; //  (optional)

OnapsoinfraserviceInstantiationApi *apiInstance = [[OnapsoinfraserviceInstantiationApi alloc] init];

// Unassign Service Instance
[apiInstance unassignServiceInstanceWith:version
    serviceInstanceId:serviceInstanceId
    body:body
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-unassignServiceInstance-0-javascript">
                              <pre class="prettyprint"><code class="language-js">var SoGuilinApIs = require('so_guilin_ap_is');

var api = new SoGuilinApIs.OnapsoinfraserviceInstantiationApi()

var version = version_example; // {String}

var serviceInstanceId = serviceInstanceId_example; // {String}

var opts = {
  'body': body_example // {String}
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.unassignServiceInstance(version, serviceInstanceId, opts, callback);
</code></pre>
                                </div>

                                <!--<div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-unassignServiceInstance-0-angular">
              <pre class="prettyprint language-json prettyprinted" data-type="json"><code>Coming Soon!</code></pre>
            </div>-->
                                <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-unassignServiceInstance-0-csharp">
                              <pre class="prettyprint"><code class="language-cs">using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class unassignServiceInstanceExample
    {
        public void main()
        {

            var apiInstance = new OnapsoinfraserviceInstantiationApi();
            var version = version_example;  // String |
            var serviceInstanceId = serviceInstanceId_example;  // String |
            var body = body_example;  // String |  (optional)

            try
            {
                // Unassign Service Instance
                apiInstance.unassignServiceInstance(version, serviceInstanceId, body);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling OnapsoinfraserviceInstantiationApi.unassignServiceInstance: " + e.Message );
            }
        }
    }
}
</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-unassignServiceInstance-0-php">
                              <pre class="prettyprint"><code class="language-php"><&#63;php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\OnapsoinfraserviceInstantiationApi();
$version = version_example; // String |
$serviceInstanceId = serviceInstanceId_example; // String |
$body = body_example; // String |

try {
    $api_instance->unassignServiceInstance($version, $serviceInstanceId, $body);
} catch (Exception $e) {
    echo 'Exception when calling OnapsoinfraserviceInstantiationApi->unassignServiceInstance: ', $e->getMessage(), PHP_EOL;
}
?></code></pre>
                                </div>

                                <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-unassignServiceInstance-0-perl">
                              <pre class="prettyprint"><code class="language-perl">use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::OnapsoinfraserviceInstantiationApi;

my $api_instance = WWW::SwaggerClient::OnapsoinfraserviceInstantiationApi->new();
my $version = version_example; # String |
my $serviceInstanceId = serviceInstanceId_example; # String |
my $body = WWW::SwaggerClient::Object::String->new(); # String |

eval {
    $api_instance->unassignServiceInstance(version => $version, serviceInstanceId => $serviceInstanceId, body => $body);
};
if ($@) {
    warn "Exception when calling OnapsoinfraserviceInstantiationApi->unassignServiceInstance: $@\n";
}</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-unassignServiceInstance-0-python">
                              <pre class="prettyprint"><code class="language-python">from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.OnapsoinfraserviceInstantiationApi()
version = version_example # String |
serviceInstanceId = serviceInstanceId_example # String |
body = body_example # String |  (optional)

try:
    # Unassign Service Instance
    api_instance.unassign_service_instance(version, serviceInstanceId, body=body)
except ApiException as e:
    print("Exception when calling OnapsoinfraserviceInstantiationApi->unassignServiceInstance: %s\n" % e)</code></pre>
                                </div>
                            </div>

                            <h2>Parameters</h2>

                            <div class="methodsubtabletitle">Path parameters</div>
                            <table id="methodsubtable">
                                <tr>
                                    <th width="150px">Name</th>
                                    <th>Description</th>
                                </tr>
                                <tr><td style="width:150px;">version*</td>
                                    <td>


                                        <div id="d2e199_unassignServiceInstance_version">
                                            <div class="json-schema-view">
                                                <div class="primitive">
                <span class="type">
                    String
                </span>

                                                </div>
                                                <div class="inner required">
                                                    Required
                                                </div>
                                            </div>
                                        </div>
                                    </td>
                                </tr>

                                <tr><td style="width:150px;">serviceInstanceId*</td>
                                    <td>


                                        <div id="d2e199_unassignServiceInstance_serviceInstanceId">
                                            <div class="json-schema-view">
                                                <div class="primitive">
                <span class="type">
                    String
                </span>

                                                </div>
                                                <div class="inner required">
                                                    Required
                                                </div>
                                            </div>
                                        </div>
                                    </td>
                                </tr>

                            </table>


                            <div class="methodsubtabletitle">Body parameters</div>
                            <table id="methodsubtable">
                                <tr>
                                    <th width="150px">Name</th>
                                    <th>Description</th>
                                </tr>
                                <tr><td style="width:150px;">body </td>
                                    <td>


                                        <script>
$(document).ready(function() {
  var schemaWrapper = {
  "in" : "body",
  "name" : "body",
  "required" : false,
  "schema" : {
    "type" : "string"
  }
};
  var schema = schemaWrapper.schema;
  if (schema.$ref != null) {
    schema = defsParser.$refs.get(schema.$ref);
  } else {
    schemaWrapper.definitions = Object.assign({}, defs);
    $RefParser.dereference(schemaWrapper).catch(function(err) {
      console.log(err);
    });
  }

  var view = new JSONSchemaView(schema,2,{isBodyParam: true});
  var result = $('#d2e199_unassignServiceInstance_body');
  result.empty();
  result.append(view.render());
});
</script>
                                        <div id="d2e199_unassignServiceInstance_body"></div>
                                    </td>
                                </tr>

                            </table>



                            <h2>Responses</h2>
                            <h3> Status: default - successful operation </h3>

                            <ul class="nav nav-tabs nav-tabs-examples" >
                            </ul>

                            <div class="tab-content" style='margin-bottom: 10px;'>
                            </div>

                        </article>
                    </div>
                    <hr>
                    <div id="api-OnapsoinfraserviceInstantiation-updateNetworkInstance">
                        <article id="api-OnapsoinfraserviceInstantiation-updateNetworkInstance-0" data-group="User" data-name="updateNetworkInstance" data-version="0">
                            <div class="pull-left">
                                <h1>updateNetworkInstance</h1>
                                <p>Update VolumeGroup on a specified version, serviceInstance, networkInstance</p>
                            </div>
                            <div class="pull-right"></div>
                            <div class="clearfix"></div>
                            <p></p>
                            <p class="marked"></p>
                            <p></p>
                            <br />
                            <pre class="prettyprint language-html prettyprinted" data-type="put"><code><span class="pln">/onap/so/infra/serviceInstantiation/{version}/serviceInstances/{serviceInstanceId}/networks/{networkInstanceId}</span></code></pre>
                            <p>
                            <h3>Usage and SDK Samples</h3>
                            </p>
                            <ul class="nav nav-tabs nav-tabs-examples">
                                <li class="active"><a href="#examples-OnapsoinfraserviceInstantiation-updateNetworkInstance-0-curl">Curl</a></li>
                                <li class=""><a href="#examples-OnapsoinfraserviceInstantiation-updateNetworkInstance-0-java">Java</a></li>
                                <li class=""><a href="#examples-OnapsoinfraserviceInstantiation-updateNetworkInstance-0-android">Android</a></li>
                                <!--<li class=""><a href="#examples-OnapsoinfraserviceInstantiation-updateNetworkInstance-0-groovy">Groovy</a></li>-->
                                <li class=""><a href="#examples-OnapsoinfraserviceInstantiation-updateNetworkInstance-0-objc">Obj-C</a></li>
                                <li class=""><a href="#examples-OnapsoinfraserviceInstantiation-updateNetworkInstance-0-javascript">JavaScript</a></li>
                                <!--<li class=""><a href="#examples-OnapsoinfraserviceInstantiation-updateNetworkInstance-0-angular">Angular</a></li>-->
                                <li class=""><a href="#examples-OnapsoinfraserviceInstantiation-updateNetworkInstance-0-csharp">C#</a></li>
                                <li class=""><a href="#examples-OnapsoinfraserviceInstantiation-updateNetworkInstance-0-php">PHP</a></li>
                                <li class=""><a href="#examples-OnapsoinfraserviceInstantiation-updateNetworkInstance-0-perl">Perl</a></li>
                                <li class=""><a href="#examples-OnapsoinfraserviceInstantiation-updateNetworkInstance-0-python">Python</a></li>
                            </ul>

                            <div class="tab-content">
                                <div class="tab-pane active" id="examples-OnapsoinfraserviceInstantiation-updateNetworkInstance-0-curl">
                                    <pre class="prettyprint"><code class="language-bsh">curl -X PUT "http://localhost/onap/so/infra/serviceInstantiation/{version}/serviceInstances/{serviceInstanceId}/networks/{networkInstanceId}"</code></pre>
                                </div>
                                <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-updateNetworkInstance-0-java">
                            <pre class="prettyprint"><code class="language-java">import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.OnapsoinfraserviceInstantiationApi;

import java.io.File;
import java.util.*;

public class OnapsoinfraserviceInstantiationApiExample {

    public static void main(String[] args) {

        OnapsoinfraserviceInstantiationApi apiInstance = new OnapsoinfraserviceInstantiationApi();
        String version = version_example; // String |
        String serviceInstanceId = serviceInstanceId_example; // String |
        String networkInstanceId = networkInstanceId_example; // String |
        String body = body_example; // String |
        try {
            apiInstance.updateNetworkInstance(version, serviceInstanceId, networkInstanceId, body);
        } catch (ApiException e) {
            System.err.println("Exception when calling OnapsoinfraserviceInstantiationApi#updateNetworkInstance");
            e.printStackTrace();
        }
    }
}</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-updateNetworkInstance-0-android">
                            <pre class="prettyprint"><code class="language-java">import io.swagger.client.api.OnapsoinfraserviceInstantiationApi;

public class OnapsoinfraserviceInstantiationApiExample {

    public static void main(String[] args) {
        OnapsoinfraserviceInstantiationApi apiInstance = new OnapsoinfraserviceInstantiationApi();
        String version = version_example; // String |
        String serviceInstanceId = serviceInstanceId_example; // String |
        String networkInstanceId = networkInstanceId_example; // String |
        String body = body_example; // String |
        try {
            apiInstance.updateNetworkInstance(version, serviceInstanceId, networkInstanceId, body);
        } catch (ApiException e) {
            System.err.println("Exception when calling OnapsoinfraserviceInstantiationApi#updateNetworkInstance");
            e.printStackTrace();
        }
    }
}</code></pre>
                                </div>
                                <!--
  <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-updateNetworkInstance-0-groovy">
  <pre class="prettyprint language-json prettyprinted" data-type="json"><code>Coming Soon!</code></pre>
  </div> -->
                                <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-updateNetworkInstance-0-objc">
                              <pre class="prettyprint"><code class="language-cpp">String *version = version_example; //
String *serviceInstanceId = serviceInstanceId_example; //
String *networkInstanceId = networkInstanceId_example; //
String *body = body_example; //  (optional)

OnapsoinfraserviceInstantiationApi *apiInstance = [[OnapsoinfraserviceInstantiationApi alloc] init];

// Update VolumeGroup on a specified version, serviceInstance, networkInstance
[apiInstance updateNetworkInstanceWith:version
    serviceInstanceId:serviceInstanceId
    networkInstanceId:networkInstanceId
    body:body
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-updateNetworkInstance-0-javascript">
                              <pre class="prettyprint"><code class="language-js">var SoGuilinApIs = require('so_guilin_ap_is');

var api = new SoGuilinApIs.OnapsoinfraserviceInstantiationApi()

var version = version_example; // {String}

var serviceInstanceId = serviceInstanceId_example; // {String}

var networkInstanceId = networkInstanceId_example; // {String}

var opts = {
  'body': body_example // {String}
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.updateNetworkInstance(version, serviceInstanceId, networkInstanceId, opts, callback);
</code></pre>
                                </div>

                                <!--<div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-updateNetworkInstance-0-angular">
              <pre class="prettyprint language-json prettyprinted" data-type="json"><code>Coming Soon!</code></pre>
            </div>-->
                                <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-updateNetworkInstance-0-csharp">
                              <pre class="prettyprint"><code class="language-cs">using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class updateNetworkInstanceExample
    {
        public void main()
        {

            var apiInstance = new OnapsoinfraserviceInstantiationApi();
            var version = version_example;  // String |
            var serviceInstanceId = serviceInstanceId_example;  // String |
            var networkInstanceId = networkInstanceId_example;  // String |
            var body = body_example;  // String |  (optional)

            try
            {
                // Update VolumeGroup on a specified version, serviceInstance, networkInstance
                apiInstance.updateNetworkInstance(version, serviceInstanceId, networkInstanceId, body);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling OnapsoinfraserviceInstantiationApi.updateNetworkInstance: " + e.Message );
            }
        }
    }
}
</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-updateNetworkInstance-0-php">
                              <pre class="prettyprint"><code class="language-php"><&#63;php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\OnapsoinfraserviceInstantiationApi();
$version = version_example; // String |
$serviceInstanceId = serviceInstanceId_example; // String |
$networkInstanceId = networkInstanceId_example; // String |
$body = body_example; // String |

try {
    $api_instance->updateNetworkInstance($version, $serviceInstanceId, $networkInstanceId, $body);
} catch (Exception $e) {
    echo 'Exception when calling OnapsoinfraserviceInstantiationApi->updateNetworkInstance: ', $e->getMessage(), PHP_EOL;
}
?></code></pre>
                                </div>

                                <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-updateNetworkInstance-0-perl">
                              <pre class="prettyprint"><code class="language-perl">use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::OnapsoinfraserviceInstantiationApi;

my $api_instance = WWW::SwaggerClient::OnapsoinfraserviceInstantiationApi->new();
my $version = version_example; # String |
my $serviceInstanceId = serviceInstanceId_example; # String |
my $networkInstanceId = networkInstanceId_example; # String |
my $body = WWW::SwaggerClient::Object::String->new(); # String |

eval {
    $api_instance->updateNetworkInstance(version => $version, serviceInstanceId => $serviceInstanceId, networkInstanceId => $networkInstanceId, body => $body);
};
if ($@) {
    warn "Exception when calling OnapsoinfraserviceInstantiationApi->updateNetworkInstance: $@\n";
}</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-updateNetworkInstance-0-python">
                              <pre class="prettyprint"><code class="language-python">from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.OnapsoinfraserviceInstantiationApi()
version = version_example # String |
serviceInstanceId = serviceInstanceId_example # String |
networkInstanceId = networkInstanceId_example # String |
body = body_example # String |  (optional)

try:
    # Update VolumeGroup on a specified version, serviceInstance, networkInstance
    api_instance.update_network_instance(version, serviceInstanceId, networkInstanceId, body=body)
except ApiException as e:
    print("Exception when calling OnapsoinfraserviceInstantiationApi->updateNetworkInstance: %s\n" % e)</code></pre>
                                </div>
                            </div>

                            <h2>Parameters</h2>

                            <div class="methodsubtabletitle">Path parameters</div>
                            <table id="methodsubtable">
                                <tr>
                                    <th width="150px">Name</th>
                                    <th>Description</th>
                                </tr>
                                <tr><td style="width:150px;">version*</td>
                                    <td>


                                        <div id="d2e199_updateNetworkInstance_version">
                                            <div class="json-schema-view">
                                                <div class="primitive">
                <span class="type">
                    String
                </span>

                                                </div>
                                                <div class="inner required">
                                                    Required
                                                </div>
                                            </div>
                                        </div>
                                    </td>
                                </tr>

                                <tr><td style="width:150px;">serviceInstanceId*</td>
                                    <td>


                                        <div id="d2e199_updateNetworkInstance_serviceInstanceId">
                                            <div class="json-schema-view">
                                                <div class="primitive">
                <span class="type">
                    String
                </span>

                                                </div>
                                                <div class="inner required">
                                                    Required
                                                </div>
                                            </div>
                                        </div>
                                    </td>
                                </tr>

                                <tr><td style="width:150px;">networkInstanceId*</td>
                                    <td>


                                        <div id="d2e199_updateNetworkInstance_networkInstanceId">
                                            <div class="json-schema-view">
                                                <div class="primitive">
                <span class="type">
                    String
                </span>

                                                </div>
                                                <div class="inner required">
                                                    Required
                                                </div>
                                            </div>
                                        </div>
                                    </td>
                                </tr>

                            </table>


                            <div class="methodsubtabletitle">Body parameters</div>
                            <table id="methodsubtable">
                                <tr>
                                    <th width="150px">Name</th>
                                    <th>Description</th>
                                </tr>
                                <tr><td style="width:150px;">body </td>
                                    <td>


                                        <script>
$(document).ready(function() {
  var schemaWrapper = {
  "in" : "body",
  "name" : "body",
  "required" : false,
  "schema" : {
    "type" : "string"
  }
};
  var schema = schemaWrapper.schema;
  if (schema.$ref != null) {
    schema = defsParser.$refs.get(schema.$ref);
  } else {
    schemaWrapper.definitions = Object.assign({}, defs);
    $RefParser.dereference(schemaWrapper).catch(function(err) {
      console.log(err);
    });
  }

  var view = new JSONSchemaView(schema,2,{isBodyParam: true});
  var result = $('#d2e199_updateNetworkInstance_body');
  result.empty();
  result.append(view.render());
});
</script>
                                        <div id="d2e199_updateNetworkInstance_body"></div>
                                    </td>
                                </tr>

                            </table>



                            <h2>Responses</h2>
                            <h3> Status: default - successful operation </h3>

                            <ul class="nav nav-tabs nav-tabs-examples" >
                            </ul>

                            <div class="tab-content" style='margin-bottom: 10px;'>
                            </div>

                        </article>
                    </div>
                    <hr>
                    <div id="api-OnapsoinfraserviceInstantiation-updateVfModuleInstance">
                        <article id="api-OnapsoinfraserviceInstantiation-updateVfModuleInstance-0" data-group="User" data-name="updateVfModuleInstance" data-version="0">
                            <div class="pull-left">
                                <h1>updateVfModuleInstance</h1>
                                <p>Update VfModule on a specified version, serviceInstance, vnfInstance and vfModule</p>
                            </div>
                            <div class="pull-right"></div>
                            <div class="clearfix"></div>
                            <p></p>
                            <p class="marked"></p>
                            <p></p>
                            <br />
                            <pre class="prettyprint language-html prettyprinted" data-type="put"><code><span class="pln">/onap/so/infra/serviceInstantiation/{version}/serviceInstances/{serviceInstanceId}/vnfs/{vnfInstanceId}/vfModules/{vfmoduleInstanceId}</span></code></pre>
                            <p>
                            <h3>Usage and SDK Samples</h3>
                            </p>
                            <ul class="nav nav-tabs nav-tabs-examples">
                                <li class="active"><a href="#examples-OnapsoinfraserviceInstantiation-updateVfModuleInstance-0-curl">Curl</a></li>
                                <li class=""><a href="#examples-OnapsoinfraserviceInstantiation-updateVfModuleInstance-0-java">Java</a></li>
                                <li class=""><a href="#examples-OnapsoinfraserviceInstantiation-updateVfModuleInstance-0-android">Android</a></li>
                                <!--<li class=""><a href="#examples-OnapsoinfraserviceInstantiation-updateVfModuleInstance-0-groovy">Groovy</a></li>-->
                                <li class=""><a href="#examples-OnapsoinfraserviceInstantiation-updateVfModuleInstance-0-objc">Obj-C</a></li>
                                <li class=""><a href="#examples-OnapsoinfraserviceInstantiation-updateVfModuleInstance-0-javascript">JavaScript</a></li>
                                <!--<li class=""><a href="#examples-OnapsoinfraserviceInstantiation-updateVfModuleInstance-0-angular">Angular</a></li>-->
                                <li class=""><a href="#examples-OnapsoinfraserviceInstantiation-updateVfModuleInstance-0-csharp">C#</a></li>
                                <li class=""><a href="#examples-OnapsoinfraserviceInstantiation-updateVfModuleInstance-0-php">PHP</a></li>
                                <li class=""><a href="#examples-OnapsoinfraserviceInstantiation-updateVfModuleInstance-0-perl">Perl</a></li>
                                <li class=""><a href="#examples-OnapsoinfraserviceInstantiation-updateVfModuleInstance-0-python">Python</a></li>
                            </ul>

                            <div class="tab-content">
                                <div class="tab-pane active" id="examples-OnapsoinfraserviceInstantiation-updateVfModuleInstance-0-curl">
                                    <pre class="prettyprint"><code class="language-bsh">curl -X PUT "http://localhost/onap/so/infra/serviceInstantiation/{version}/serviceInstances/{serviceInstanceId}/vnfs/{vnfInstanceId}/vfModules/{vfmoduleInstanceId}"</code></pre>
                                </div>
                                <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-updateVfModuleInstance-0-java">
                            <pre class="prettyprint"><code class="language-java">import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.OnapsoinfraserviceInstantiationApi;

import java.io.File;
import java.util.*;

public class OnapsoinfraserviceInstantiationApiExample {

    public static void main(String[] args) {

        OnapsoinfraserviceInstantiationApi apiInstance = new OnapsoinfraserviceInstantiationApi();
        String version = version_example; // String |
        String serviceInstanceId = serviceInstanceId_example; // String |
        String vnfInstanceId = vnfInstanceId_example; // String |
        String vfmoduleInstanceId = vfmoduleInstanceId_example; // String |
        String body = body_example; // String |
        try {
            apiInstance.updateVfModuleInstance(version, serviceInstanceId, vnfInstanceId, vfmoduleInstanceId, body);
        } catch (ApiException e) {
            System.err.println("Exception when calling OnapsoinfraserviceInstantiationApi#updateVfModuleInstance");
            e.printStackTrace();
        }
    }
}</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-updateVfModuleInstance-0-android">
                            <pre class="prettyprint"><code class="language-java">import io.swagger.client.api.OnapsoinfraserviceInstantiationApi;

public class OnapsoinfraserviceInstantiationApiExample {

    public static void main(String[] args) {
        OnapsoinfraserviceInstantiationApi apiInstance = new OnapsoinfraserviceInstantiationApi();
        String version = version_example; // String |
        String serviceInstanceId = serviceInstanceId_example; // String |
        String vnfInstanceId = vnfInstanceId_example; // String |
        String vfmoduleInstanceId = vfmoduleInstanceId_example; // String |
        String body = body_example; // String |
        try {
            apiInstance.updateVfModuleInstance(version, serviceInstanceId, vnfInstanceId, vfmoduleInstanceId, body);
        } catch (ApiException e) {
            System.err.println("Exception when calling OnapsoinfraserviceInstantiationApi#updateVfModuleInstance");
            e.printStackTrace();
        }
    }
}</code></pre>
                                </div>
                                <!--
  <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-updateVfModuleInstance-0-groovy">
  <pre class="prettyprint language-json prettyprinted" data-type="json"><code>Coming Soon!</code></pre>
  </div> -->
                                <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-updateVfModuleInstance-0-objc">
                              <pre class="prettyprint"><code class="language-cpp">String *version = version_example; //
String *serviceInstanceId = serviceInstanceId_example; //
String *vnfInstanceId = vnfInstanceId_example; //
String *vfmoduleInstanceId = vfmoduleInstanceId_example; //
String *body = body_example; //  (optional)

OnapsoinfraserviceInstantiationApi *apiInstance = [[OnapsoinfraserviceInstantiationApi alloc] init];

// Update VfModule on a specified version, serviceInstance, vnfInstance and vfModule
[apiInstance updateVfModuleInstanceWith:version
    serviceInstanceId:serviceInstanceId
    vnfInstanceId:vnfInstanceId
    vfmoduleInstanceId:vfmoduleInstanceId
    body:body
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-updateVfModuleInstance-0-javascript">
                              <pre class="prettyprint"><code class="language-js">var SoGuilinApIs = require('so_guilin_ap_is');

var api = new SoGuilinApIs.OnapsoinfraserviceInstantiationApi()

var version = version_example; // {String}

var serviceInstanceId = serviceInstanceId_example; // {String}

var vnfInstanceId = vnfInstanceId_example; // {String}

var vfmoduleInstanceId = vfmoduleInstanceId_example; // {String}

var opts = {
  'body': body_example // {String}
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.updateVfModuleInstance(version, serviceInstanceId, vnfInstanceId, vfmoduleInstanceId, opts, callback);
</code></pre>
                                </div>

                                <!--<div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-updateVfModuleInstance-0-angular">
              <pre class="prettyprint language-json prettyprinted" data-type="json"><code>Coming Soon!</code></pre>
            </div>-->
                                <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-updateVfModuleInstance-0-csharp">
                              <pre class="prettyprint"><code class="language-cs">using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class updateVfModuleInstanceExample
    {
        public void main()
        {

            var apiInstance = new OnapsoinfraserviceInstantiationApi();
            var version = version_example;  // String |
            var serviceInstanceId = serviceInstanceId_example;  // String |
            var vnfInstanceId = vnfInstanceId_example;  // String |
            var vfmoduleInstanceId = vfmoduleInstanceId_example;  // String |
            var body = body_example;  // String |  (optional)

            try
            {
                // Update VfModule on a specified version, serviceInstance, vnfInstance and vfModule
                apiInstance.updateVfModuleInstance(version, serviceInstanceId, vnfInstanceId, vfmoduleInstanceId, body);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling OnapsoinfraserviceInstantiationApi.updateVfModuleInstance: " + e.Message );
            }
        }
    }
}
</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-updateVfModuleInstance-0-php">
                              <pre class="prettyprint"><code class="language-php"><&#63;php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\OnapsoinfraserviceInstantiationApi();
$version = version_example; // String |
$serviceInstanceId = serviceInstanceId_example; // String |
$vnfInstanceId = vnfInstanceId_example; // String |
$vfmoduleInstanceId = vfmoduleInstanceId_example; // String |
$body = body_example; // String |

try {
    $api_instance->updateVfModuleInstance($version, $serviceInstanceId, $vnfInstanceId, $vfmoduleInstanceId, $body);
} catch (Exception $e) {
    echo 'Exception when calling OnapsoinfraserviceInstantiationApi->updateVfModuleInstance: ', $e->getMessage(), PHP_EOL;
}
?></code></pre>
                                </div>

                                <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-updateVfModuleInstance-0-perl">
                              <pre class="prettyprint"><code class="language-perl">use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::OnapsoinfraserviceInstantiationApi;

my $api_instance = WWW::SwaggerClient::OnapsoinfraserviceInstantiationApi->new();
my $version = version_example; # String |
my $serviceInstanceId = serviceInstanceId_example; # String |
my $vnfInstanceId = vnfInstanceId_example; # String |
my $vfmoduleInstanceId = vfmoduleInstanceId_example; # String |
my $body = WWW::SwaggerClient::Object::String->new(); # String |

eval {
    $api_instance->updateVfModuleInstance(version => $version, serviceInstanceId => $serviceInstanceId, vnfInstanceId => $vnfInstanceId, vfmoduleInstanceId => $vfmoduleInstanceId, body => $body);
};
if ($@) {
    warn "Exception when calling OnapsoinfraserviceInstantiationApi->updateVfModuleInstance: $@\n";
}</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-updateVfModuleInstance-0-python">
                              <pre class="prettyprint"><code class="language-python">from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.OnapsoinfraserviceInstantiationApi()
version = version_example # String |
serviceInstanceId = serviceInstanceId_example # String |
vnfInstanceId = vnfInstanceId_example # String |
vfmoduleInstanceId = vfmoduleInstanceId_example # String |
body = body_example # String |  (optional)

try:
    # Update VfModule on a specified version, serviceInstance, vnfInstance and vfModule
    api_instance.update_vf_module_instance(version, serviceInstanceId, vnfInstanceId, vfmoduleInstanceId, body=body)
except ApiException as e:
    print("Exception when calling OnapsoinfraserviceInstantiationApi->updateVfModuleInstance: %s\n" % e)</code></pre>
                                </div>
                            </div>

                            <h2>Parameters</h2>

                            <div class="methodsubtabletitle">Path parameters</div>
                            <table id="methodsubtable">
                                <tr>
                                    <th width="150px">Name</th>
                                    <th>Description</th>
                                </tr>
                                <tr><td style="width:150px;">version*</td>
                                    <td>


                                        <div id="d2e199_updateVfModuleInstance_version">
                                            <div class="json-schema-view">
                                                <div class="primitive">
                <span class="type">
                    String
                </span>

                                                </div>
                                                <div class="inner required">
                                                    Required
                                                </div>
                                            </div>
                                        </div>
                                    </td>
                                </tr>

                                <tr><td style="width:150px;">serviceInstanceId*</td>
                                    <td>


                                        <div id="d2e199_updateVfModuleInstance_serviceInstanceId">
                                            <div class="json-schema-view">
                                                <div class="primitive">
                <span class="type">
                    String
                </span>

                                                </div>
                                                <div class="inner required">
                                                    Required
                                                </div>
                                            </div>
                                        </div>
                                    </td>
                                </tr>

                                <tr><td style="width:150px;">vnfInstanceId*</td>
                                    <td>


                                        <div id="d2e199_updateVfModuleInstance_vnfInstanceId">
                                            <div class="json-schema-view">
                                                <div class="primitive">
                <span class="type">
                    String
                </span>

                                                </div>
                                                <div class="inner required">
                                                    Required
                                                </div>
                                            </div>
                                        </div>
                                    </td>
                                </tr>

                                <tr><td style="width:150px;">vfmoduleInstanceId*</td>
                                    <td>


                                        <div id="d2e199_updateVfModuleInstance_vfmoduleInstanceId">
                                            <div class="json-schema-view">
                                                <div class="primitive">
                <span class="type">
                    String
                </span>

                                                </div>
                                                <div class="inner required">
                                                    Required
                                                </div>
                                            </div>
                                        </div>
                                    </td>
                                </tr>

                            </table>


                            <div class="methodsubtabletitle">Body parameters</div>
                            <table id="methodsubtable">
                                <tr>
                                    <th width="150px">Name</th>
                                    <th>Description</th>
                                </tr>
                                <tr><td style="width:150px;">body </td>
                                    <td>


                                        <script>
$(document).ready(function() {
  var schemaWrapper = {
  "in" : "body",
  "name" : "body",
  "required" : false,
  "schema" : {
    "type" : "string"
  }
};
  var schema = schemaWrapper.schema;
  if (schema.$ref != null) {
    schema = defsParser.$refs.get(schema.$ref);
  } else {
    schemaWrapper.definitions = Object.assign({}, defs);
    $RefParser.dereference(schemaWrapper).catch(function(err) {
      console.log(err);
    });
  }

  var view = new JSONSchemaView(schema,2,{isBodyParam: true});
  var result = $('#d2e199_updateVfModuleInstance_body');
  result.empty();
  result.append(view.render());
});
</script>
                                        <div id="d2e199_updateVfModuleInstance_body"></div>
                                    </td>
                                </tr>

                            </table>



                            <h2>Responses</h2>
                            <h3> Status: default - successful operation </h3>

                            <ul class="nav nav-tabs nav-tabs-examples" >
                            </ul>

                            <div class="tab-content" style='margin-bottom: 10px;'>
                            </div>

                        </article>
                    </div>
                    <hr>
                    <div id="api-OnapsoinfraserviceInstantiation-updateVnfInstance">
                        <article id="api-OnapsoinfraserviceInstantiation-updateVnfInstance-0" data-group="User" data-name="updateVnfInstance" data-version="0">
                            <div class="pull-left">
                                <h1>updateVnfInstance</h1>
                                <p>Update VNF on a specified version, serviceInstance and vnfInstance</p>
                            </div>
                            <div class="pull-right"></div>
                            <div class="clearfix"></div>
                            <p></p>
                            <p class="marked"></p>
                            <p></p>
                            <br />
                            <pre class="prettyprint language-html prettyprinted" data-type="put"><code><span class="pln">/onap/so/infra/serviceInstantiation/{version}/serviceInstances/{serviceInstanceId}/vnfs/{vnfInstanceId}</span></code></pre>
                            <p>
                            <h3>Usage and SDK Samples</h3>
                            </p>
                            <ul class="nav nav-tabs nav-tabs-examples">
                                <li class="active"><a href="#examples-OnapsoinfraserviceInstantiation-updateVnfInstance-0-curl">Curl</a></li>
                                <li class=""><a href="#examples-OnapsoinfraserviceInstantiation-updateVnfInstance-0-java">Java</a></li>
                                <li class=""><a href="#examples-OnapsoinfraserviceInstantiation-updateVnfInstance-0-android">Android</a></li>
                                <!--<li class=""><a href="#examples-OnapsoinfraserviceInstantiation-updateVnfInstance-0-groovy">Groovy</a></li>-->
                                <li class=""><a href="#examples-OnapsoinfraserviceInstantiation-updateVnfInstance-0-objc">Obj-C</a></li>
                                <li class=""><a href="#examples-OnapsoinfraserviceInstantiation-updateVnfInstance-0-javascript">JavaScript</a></li>
                                <!--<li class=""><a href="#examples-OnapsoinfraserviceInstantiation-updateVnfInstance-0-angular">Angular</a></li>-->
                                <li class=""><a href="#examples-OnapsoinfraserviceInstantiation-updateVnfInstance-0-csharp">C#</a></li>
                                <li class=""><a href="#examples-OnapsoinfraserviceInstantiation-updateVnfInstance-0-php">PHP</a></li>
                                <li class=""><a href="#examples-OnapsoinfraserviceInstantiation-updateVnfInstance-0-perl">Perl</a></li>
                                <li class=""><a href="#examples-OnapsoinfraserviceInstantiation-updateVnfInstance-0-python">Python</a></li>
                            </ul>

                            <div class="tab-content">
                                <div class="tab-pane active" id="examples-OnapsoinfraserviceInstantiation-updateVnfInstance-0-curl">
                                    <pre class="prettyprint"><code class="language-bsh">curl -X PUT "http://localhost/onap/so/infra/serviceInstantiation/{version}/serviceInstances/{serviceInstanceId}/vnfs/{vnfInstanceId}"</code></pre>
                                </div>
                                <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-updateVnfInstance-0-java">
                            <pre class="prettyprint"><code class="language-java">import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.OnapsoinfraserviceInstantiationApi;

import java.io.File;
import java.util.*;

public class OnapsoinfraserviceInstantiationApiExample {

    public static void main(String[] args) {

        OnapsoinfraserviceInstantiationApi apiInstance = new OnapsoinfraserviceInstantiationApi();
        String version = version_example; // String |
        String serviceInstanceId = serviceInstanceId_example; // String |
        String vnfInstanceId = vnfInstanceId_example; // String |
        String body = body_example; // String |
        try {
            apiInstance.updateVnfInstance(version, serviceInstanceId, vnfInstanceId, body);
        } catch (ApiException e) {
            System.err.println("Exception when calling OnapsoinfraserviceInstantiationApi#updateVnfInstance");
            e.printStackTrace();
        }
    }
}</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-updateVnfInstance-0-android">
                            <pre class="prettyprint"><code class="language-java">import io.swagger.client.api.OnapsoinfraserviceInstantiationApi;

public class OnapsoinfraserviceInstantiationApiExample {

    public static void main(String[] args) {
        OnapsoinfraserviceInstantiationApi apiInstance = new OnapsoinfraserviceInstantiationApi();
        String version = version_example; // String |
        String serviceInstanceId = serviceInstanceId_example; // String |
        String vnfInstanceId = vnfInstanceId_example; // String |
        String body = body_example; // String |
        try {
            apiInstance.updateVnfInstance(version, serviceInstanceId, vnfInstanceId, body);
        } catch (ApiException e) {
            System.err.println("Exception when calling OnapsoinfraserviceInstantiationApi#updateVnfInstance");
            e.printStackTrace();
        }
    }
}</code></pre>
                                </div>
                                <!--
  <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-updateVnfInstance-0-groovy">
  <pre class="prettyprint language-json prettyprinted" data-type="json"><code>Coming Soon!</code></pre>
  </div> -->
                                <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-updateVnfInstance-0-objc">
                              <pre class="prettyprint"><code class="language-cpp">String *version = version_example; //
String *serviceInstanceId = serviceInstanceId_example; //
String *vnfInstanceId = vnfInstanceId_example; //
String *body = body_example; //  (optional)

OnapsoinfraserviceInstantiationApi *apiInstance = [[OnapsoinfraserviceInstantiationApi alloc] init];

// Update VNF on a specified version, serviceInstance and vnfInstance
[apiInstance updateVnfInstanceWith:version
    serviceInstanceId:serviceInstanceId
    vnfInstanceId:vnfInstanceId
    body:body
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-updateVnfInstance-0-javascript">
                              <pre class="prettyprint"><code class="language-js">var SoGuilinApIs = require('so_guilin_ap_is');

var api = new SoGuilinApIs.OnapsoinfraserviceInstantiationApi()

var version = version_example; // {String}

var serviceInstanceId = serviceInstanceId_example; // {String}

var vnfInstanceId = vnfInstanceId_example; // {String}

var opts = {
  'body': body_example // {String}
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.updateVnfInstance(version, serviceInstanceId, vnfInstanceId, opts, callback);
</code></pre>
                                </div>

                                <!--<div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-updateVnfInstance-0-angular">
              <pre class="prettyprint language-json prettyprinted" data-type="json"><code>Coming Soon!</code></pre>
            </div>-->
                                <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-updateVnfInstance-0-csharp">
                              <pre class="prettyprint"><code class="language-cs">using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class updateVnfInstanceExample
    {
        public void main()
        {

            var apiInstance = new OnapsoinfraserviceInstantiationApi();
            var version = version_example;  // String |
            var serviceInstanceId = serviceInstanceId_example;  // String |
            var vnfInstanceId = vnfInstanceId_example;  // String |
            var body = body_example;  // String |  (optional)

            try
            {
                // Update VNF on a specified version, serviceInstance and vnfInstance
                apiInstance.updateVnfInstance(version, serviceInstanceId, vnfInstanceId, body);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling OnapsoinfraserviceInstantiationApi.updateVnfInstance: " + e.Message );
            }
        }
    }
}
</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-updateVnfInstance-0-php">
                              <pre class="prettyprint"><code class="language-php"><&#63;php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\OnapsoinfraserviceInstantiationApi();
$version = version_example; // String |
$serviceInstanceId = serviceInstanceId_example; // String |
$vnfInstanceId = vnfInstanceId_example; // String |
$body = body_example; // String |

try {
    $api_instance->updateVnfInstance($version, $serviceInstanceId, $vnfInstanceId, $body);
} catch (Exception $e) {
    echo 'Exception when calling OnapsoinfraserviceInstantiationApi->updateVnfInstance: ', $e->getMessage(), PHP_EOL;
}
?></code></pre>
                                </div>

                                <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-updateVnfInstance-0-perl">
                              <pre class="prettyprint"><code class="language-perl">use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::OnapsoinfraserviceInstantiationApi;

my $api_instance = WWW::SwaggerClient::OnapsoinfraserviceInstantiationApi->new();
my $version = version_example; # String |
my $serviceInstanceId = serviceInstanceId_example; # String |
my $vnfInstanceId = vnfInstanceId_example; # String |
my $body = WWW::SwaggerClient::Object::String->new(); # String |

eval {
    $api_instance->updateVnfInstance(version => $version, serviceInstanceId => $serviceInstanceId, vnfInstanceId => $vnfInstanceId, body => $body);
};
if ($@) {
    warn "Exception when calling OnapsoinfraserviceInstantiationApi->updateVnfInstance: $@\n";
}</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-updateVnfInstance-0-python">
                              <pre class="prettyprint"><code class="language-python">from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.OnapsoinfraserviceInstantiationApi()
version = version_example # String |
serviceInstanceId = serviceInstanceId_example # String |
vnfInstanceId = vnfInstanceId_example # String |
body = body_example # String |  (optional)

try:
    # Update VNF on a specified version, serviceInstance and vnfInstance
    api_instance.update_vnf_instance(version, serviceInstanceId, vnfInstanceId, body=body)
except ApiException as e:
    print("Exception when calling OnapsoinfraserviceInstantiationApi->updateVnfInstance: %s\n" % e)</code></pre>
                                </div>
                            </div>

                            <h2>Parameters</h2>

                            <div class="methodsubtabletitle">Path parameters</div>
                            <table id="methodsubtable">
                                <tr>
                                    <th width="150px">Name</th>
                                    <th>Description</th>
                                </tr>
                                <tr><td style="width:150px;">version*</td>
                                    <td>


                                        <div id="d2e199_updateVnfInstance_version">
                                            <div class="json-schema-view">
                                                <div class="primitive">
                <span class="type">
                    String
                </span>

                                                </div>
                                                <div class="inner required">
                                                    Required
                                                </div>
                                            </div>
                                        </div>
                                    </td>
                                </tr>

                                <tr><td style="width:150px;">serviceInstanceId*</td>
                                    <td>


                                        <div id="d2e199_updateVnfInstance_serviceInstanceId">
                                            <div class="json-schema-view">
                                                <div class="primitive">
                <span class="type">
                    String
                </span>

                                                </div>
                                                <div class="inner required">
                                                    Required
                                                </div>
                                            </div>
                                        </div>
                                    </td>
                                </tr>

                                <tr><td style="width:150px;">vnfInstanceId*</td>
                                    <td>


                                        <div id="d2e199_updateVnfInstance_vnfInstanceId">
                                            <div class="json-schema-view">
                                                <div class="primitive">
                <span class="type">
                    String
                </span>

                                                </div>
                                                <div class="inner required">
                                                    Required
                                                </div>
                                            </div>
                                        </div>
                                    </td>
                                </tr>

                            </table>


                            <div class="methodsubtabletitle">Body parameters</div>
                            <table id="methodsubtable">
                                <tr>
                                    <th width="150px">Name</th>
                                    <th>Description</th>
                                </tr>
                                <tr><td style="width:150px;">body </td>
                                    <td>


                                        <script>
$(document).ready(function() {
  var schemaWrapper = {
  "in" : "body",
  "name" : "body",
  "required" : false,
  "schema" : {
    "type" : "string"
  }
};
  var schema = schemaWrapper.schema;
  if (schema.$ref != null) {
    schema = defsParser.$refs.get(schema.$ref);
  } else {
    schemaWrapper.definitions = Object.assign({}, defs);
    $RefParser.dereference(schemaWrapper).catch(function(err) {
      console.log(err);
    });
  }

  var view = new JSONSchemaView(schema,2,{isBodyParam: true});
  var result = $('#d2e199_updateVnfInstance_body');
  result.empty();
  result.append(view.render());
});
</script>
                                        <div id="d2e199_updateVnfInstance_body"></div>
                                    </td>
                                </tr>

                            </table>



                            <h2>Responses</h2>
                            <h3> Status: default - successful operation </h3>

                            <ul class="nav nav-tabs nav-tabs-examples" >
                            </ul>

                            <div class="tab-content" style='margin-bottom: 10px;'>
                            </div>

                        </article>
                    </div>
                    <hr>
                    <div id="api-OnapsoinfraserviceInstantiation-updateVolumeGroupInstance">
                        <article id="api-OnapsoinfraserviceInstantiation-updateVolumeGroupInstance-0" data-group="User" data-name="updateVolumeGroupInstance" data-version="0">
                            <div class="pull-left">
                                <h1>updateVolumeGroupInstance</h1>
                                <p>Update VolumeGroup on a specified version, serviceInstance, vnfInstance and volumeGroup</p>
                            </div>
                            <div class="pull-right"></div>
                            <div class="clearfix"></div>
                            <p></p>
                            <p class="marked"></p>
                            <p></p>
                            <br />
                            <pre class="prettyprint language-html prettyprinted" data-type="put"><code><span class="pln">/onap/so/infra/serviceInstantiation/{version}/serviceInstances/{serviceInstanceId}/vnfs/{vnfInstanceId}/volumeGroups/{volumeGroupInstanceId}</span></code></pre>
                            <p>
                            <h3>Usage and SDK Samples</h3>
                            </p>
                            <ul class="nav nav-tabs nav-tabs-examples">
                                <li class="active"><a href="#examples-OnapsoinfraserviceInstantiation-updateVolumeGroupInstance-0-curl">Curl</a></li>
                                <li class=""><a href="#examples-OnapsoinfraserviceInstantiation-updateVolumeGroupInstance-0-java">Java</a></li>
                                <li class=""><a href="#examples-OnapsoinfraserviceInstantiation-updateVolumeGroupInstance-0-android">Android</a></li>
                                <!--<li class=""><a href="#examples-OnapsoinfraserviceInstantiation-updateVolumeGroupInstance-0-groovy">Groovy</a></li>-->
                                <li class=""><a href="#examples-OnapsoinfraserviceInstantiation-updateVolumeGroupInstance-0-objc">Obj-C</a></li>
                                <li class=""><a href="#examples-OnapsoinfraserviceInstantiation-updateVolumeGroupInstance-0-javascript">JavaScript</a></li>
                                <!--<li class=""><a href="#examples-OnapsoinfraserviceInstantiation-updateVolumeGroupInstance-0-angular">Angular</a></li>-->
                                <li class=""><a href="#examples-OnapsoinfraserviceInstantiation-updateVolumeGroupInstance-0-csharp">C#</a></li>
                                <li class=""><a href="#examples-OnapsoinfraserviceInstantiation-updateVolumeGroupInstance-0-php">PHP</a></li>
                                <li class=""><a href="#examples-OnapsoinfraserviceInstantiation-updateVolumeGroupInstance-0-perl">Perl</a></li>
                                <li class=""><a href="#examples-OnapsoinfraserviceInstantiation-updateVolumeGroupInstance-0-python">Python</a></li>
                            </ul>

                            <div class="tab-content">
                                <div class="tab-pane active" id="examples-OnapsoinfraserviceInstantiation-updateVolumeGroupInstance-0-curl">
                                    <pre class="prettyprint"><code class="language-bsh">curl -X PUT "http://localhost/onap/so/infra/serviceInstantiation/{version}/serviceInstances/{serviceInstanceId}/vnfs/{vnfInstanceId}/volumeGroups/{volumeGroupInstanceId}"</code></pre>
                                </div>
                                <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-updateVolumeGroupInstance-0-java">
                            <pre class="prettyprint"><code class="language-java">import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.OnapsoinfraserviceInstantiationApi;

import java.io.File;
import java.util.*;

public class OnapsoinfraserviceInstantiationApiExample {

    public static void main(String[] args) {

        OnapsoinfraserviceInstantiationApi apiInstance = new OnapsoinfraserviceInstantiationApi();
        String version = version_example; // String |
        String serviceInstanceId = serviceInstanceId_example; // String |
        String vnfInstanceId = vnfInstanceId_example; // String |
        String volumeGroupInstanceId = volumeGroupInstanceId_example; // String |
        String body = body_example; // String |
        try {
            apiInstance.updateVolumeGroupInstance(version, serviceInstanceId, vnfInstanceId, volumeGroupInstanceId, body);
        } catch (ApiException e) {
            System.err.println("Exception when calling OnapsoinfraserviceInstantiationApi#updateVolumeGroupInstance");
            e.printStackTrace();
        }
    }
}</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-updateVolumeGroupInstance-0-android">
                            <pre class="prettyprint"><code class="language-java">import io.swagger.client.api.OnapsoinfraserviceInstantiationApi;

public class OnapsoinfraserviceInstantiationApiExample {

    public static void main(String[] args) {
        OnapsoinfraserviceInstantiationApi apiInstance = new OnapsoinfraserviceInstantiationApi();
        String version = version_example; // String |
        String serviceInstanceId = serviceInstanceId_example; // String |
        String vnfInstanceId = vnfInstanceId_example; // String |
        String volumeGroupInstanceId = volumeGroupInstanceId_example; // String |
        String body = body_example; // String |
        try {
            apiInstance.updateVolumeGroupInstance(version, serviceInstanceId, vnfInstanceId, volumeGroupInstanceId, body);
        } catch (ApiException e) {
            System.err.println("Exception when calling OnapsoinfraserviceInstantiationApi#updateVolumeGroupInstance");
            e.printStackTrace();
        }
    }
}</code></pre>
                                </div>
                                <!--
  <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-updateVolumeGroupInstance-0-groovy">
  <pre class="prettyprint language-json prettyprinted" data-type="json"><code>Coming Soon!</code></pre>
  </div> -->
                                <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-updateVolumeGroupInstance-0-objc">
                              <pre class="prettyprint"><code class="language-cpp">String *version = version_example; //
String *serviceInstanceId = serviceInstanceId_example; //
String *vnfInstanceId = vnfInstanceId_example; //
String *volumeGroupInstanceId = volumeGroupInstanceId_example; //
String *body = body_example; //  (optional)

OnapsoinfraserviceInstantiationApi *apiInstance = [[OnapsoinfraserviceInstantiationApi alloc] init];

// Update VolumeGroup on a specified version, serviceInstance, vnfInstance and volumeGroup
[apiInstance updateVolumeGroupInstanceWith:version
    serviceInstanceId:serviceInstanceId
    vnfInstanceId:vnfInstanceId
    volumeGroupInstanceId:volumeGroupInstanceId
    body:body
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-updateVolumeGroupInstance-0-javascript">
                              <pre class="prettyprint"><code class="language-js">var SoGuilinApIs = require('so_guilin_ap_is');

var api = new SoGuilinApIs.OnapsoinfraserviceInstantiationApi()

var version = version_example; // {String}

var serviceInstanceId = serviceInstanceId_example; // {String}

var vnfInstanceId = vnfInstanceId_example; // {String}

var volumeGroupInstanceId = volumeGroupInstanceId_example; // {String}

var opts = {
  'body': body_example // {String}
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.updateVolumeGroupInstance(version, serviceInstanceId, vnfInstanceId, volumeGroupInstanceId, opts, callback);
</code></pre>
                                </div>

                                <!--<div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-updateVolumeGroupInstance-0-angular">
              <pre class="prettyprint language-json prettyprinted" data-type="json"><code>Coming Soon!</code></pre>
            </div>-->
                                <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-updateVolumeGroupInstance-0-csharp">
                              <pre class="prettyprint"><code class="language-cs">using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class updateVolumeGroupInstanceExample
    {
        public void main()
        {

            var apiInstance = new OnapsoinfraserviceInstantiationApi();
            var version = version_example;  // String |
            var serviceInstanceId = serviceInstanceId_example;  // String |
            var vnfInstanceId = vnfInstanceId_example;  // String |
            var volumeGroupInstanceId = volumeGroupInstanceId_example;  // String |
            var body = body_example;  // String |  (optional)

            try
            {
                // Update VolumeGroup on a specified version, serviceInstance, vnfInstance and volumeGroup
                apiInstance.updateVolumeGroupInstance(version, serviceInstanceId, vnfInstanceId, volumeGroupInstanceId, body);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling OnapsoinfraserviceInstantiationApi.updateVolumeGroupInstance: " + e.Message );
            }
        }
    }
}
</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-updateVolumeGroupInstance-0-php">
                              <pre class="prettyprint"><code class="language-php"><&#63;php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\OnapsoinfraserviceInstantiationApi();
$version = version_example; // String |
$serviceInstanceId = serviceInstanceId_example; // String |
$vnfInstanceId = vnfInstanceId_example; // String |
$volumeGroupInstanceId = volumeGroupInstanceId_example; // String |
$body = body_example; // String |

try {
    $api_instance->updateVolumeGroupInstance($version, $serviceInstanceId, $vnfInstanceId, $volumeGroupInstanceId, $body);
} catch (Exception $e) {
    echo 'Exception when calling OnapsoinfraserviceInstantiationApi->updateVolumeGroupInstance: ', $e->getMessage(), PHP_EOL;
}
?></code></pre>
                                </div>

                                <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-updateVolumeGroupInstance-0-perl">
                              <pre class="prettyprint"><code class="language-perl">use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::OnapsoinfraserviceInstantiationApi;

my $api_instance = WWW::SwaggerClient::OnapsoinfraserviceInstantiationApi->new();
my $version = version_example; # String |
my $serviceInstanceId = serviceInstanceId_example; # String |
my $vnfInstanceId = vnfInstanceId_example; # String |
my $volumeGroupInstanceId = volumeGroupInstanceId_example; # String |
my $body = WWW::SwaggerClient::Object::String->new(); # String |

eval {
    $api_instance->updateVolumeGroupInstance(version => $version, serviceInstanceId => $serviceInstanceId, vnfInstanceId => $vnfInstanceId, volumeGroupInstanceId => $volumeGroupInstanceId, body => $body);
};
if ($@) {
    warn "Exception when calling OnapsoinfraserviceInstantiationApi->updateVolumeGroupInstance: $@\n";
}</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-OnapsoinfraserviceInstantiation-updateVolumeGroupInstance-0-python">
                              <pre class="prettyprint"><code class="language-python">from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.OnapsoinfraserviceInstantiationApi()
version = version_example # String |
serviceInstanceId = serviceInstanceId_example # String |
vnfInstanceId = vnfInstanceId_example # String |
volumeGroupInstanceId = volumeGroupInstanceId_example # String |
body = body_example # String |  (optional)

try:
    # Update VolumeGroup on a specified version, serviceInstance, vnfInstance and volumeGroup
    api_instance.update_volume_group_instance(version, serviceInstanceId, vnfInstanceId, volumeGroupInstanceId, body=body)
except ApiException as e:
    print("Exception when calling OnapsoinfraserviceInstantiationApi->updateVolumeGroupInstance: %s\n" % e)</code></pre>
                                </div>
                            </div>

                            <h2>Parameters</h2>

                            <div class="methodsubtabletitle">Path parameters</div>
                            <table id="methodsubtable">
                                <tr>
                                    <th width="150px">Name</th>
                                    <th>Description</th>
                                </tr>
                                <tr><td style="width:150px;">version*</td>
                                    <td>


                                        <div id="d2e199_updateVolumeGroupInstance_version">
                                            <div class="json-schema-view">
                                                <div class="primitive">
                <span class="type">
                    String
                </span>

                                                </div>
                                                <div class="inner required">
                                                    Required
                                                </div>
                                            </div>
                                        </div>
                                    </td>
                                </tr>

                                <tr><td style="width:150px;">serviceInstanceId*</td>
                                    <td>


                                        <div id="d2e199_updateVolumeGroupInstance_serviceInstanceId">
                                            <div class="json-schema-view">
                                                <div class="primitive">
                <span class="type">
                    String
                </span>

                                                </div>
                                                <div class="inner required">
                                                    Required
                                                </div>
                                            </div>
                                        </div>
                                    </td>
                                </tr>

                                <tr><td style="width:150px;">vnfInstanceId*</td>
                                    <td>


                                        <div id="d2e199_updateVolumeGroupInstance_vnfInstanceId">
                                            <div class="json-schema-view">
                                                <div class="primitive">
                <span class="type">
                    String
                </span>

                                                </div>
                                                <div class="inner required">
                                                    Required
                                                </div>
                                            </div>
                                        </div>
                                    </td>
                                </tr>

                                <tr><td style="width:150px;">volumeGroupInstanceId*</td>
                                    <td>


                                        <div id="d2e199_updateVolumeGroupInstance_volumeGroupInstanceId">
                                            <div class="json-schema-view">
                                                <div class="primitive">
                <span class="type">
                    String
                </span>

                                                </div>
                                                <div class="inner required">
                                                    Required
                                                </div>
                                            </div>
                                        </div>
                                    </td>
                                </tr>

                            </table>


                            <div class="methodsubtabletitle">Body parameters</div>
                            <table id="methodsubtable">
                                <tr>
                                    <th width="150px">Name</th>
                                    <th>Description</th>
                                </tr>
                                <tr><td style="width:150px;">body </td>
                                    <td>


                                        <script>
$(document).ready(function() {
  var schemaWrapper = {
  "in" : "body",
  "name" : "body",
  "required" : false,
  "schema" : {
    "type" : "string"
  }
};
  var schema = schemaWrapper.schema;
  if (schema.$ref != null) {
    schema = defsParser.$refs.get(schema.$ref);
  } else {
    schemaWrapper.definitions = Object.assign({}, defs);
    $RefParser.dereference(schemaWrapper).catch(function(err) {
      console.log(err);
    });
  }

  var view = new JSONSchemaView(schema,2,{isBodyParam: true});
  var result = $('#d2e199_updateVolumeGroupInstance_body');
  result.empty();
  result.append(view.render());
});
</script>
                                        <div id="d2e199_updateVolumeGroupInstance_body"></div>
                                    </td>
                                </tr>

                            </table>



                            <h2>Responses</h2>
                            <h3> Status: default - successful operation </h3>

                            <ul class="nav nav-tabs nav-tabs-examples" >
                            </ul>

                            <div class="tab-content" style='margin-bottom: 10px;'>
                            </div>

                        </article>
                    </div>
                    <hr>
                </section>
                <section id="api-Onapsoinfratasks">
                    <h1>Onapsoinfratasks</h1>
                    <div id="api-Onapsoinfratasks-queryFilters">
                        <article id="api-Onapsoinfratasks-queryFilters-0" data-group="User" data-name="queryFilters" data-version="0">
                            <div class="pull-left">
                                <h1>queryFilters</h1>
                                <p>Finds Manual Tasks</p>
                            </div>
                            <div class="pull-right"></div>
                            <div class="clearfix"></div>
                            <p></p>
                            <p class="marked"></p>
                            <p></p>
                            <br />
                            <pre class="prettyprint language-html prettyprinted" data-type="get"><code><span class="pln">/onap/so/infra/tasks/{version}</span></code></pre>
                            <p>
                            <h3>Usage and SDK Samples</h3>
                            </p>
                            <ul class="nav nav-tabs nav-tabs-examples">
                                <li class="active"><a href="#examples-Onapsoinfratasks-queryFilters-0-curl">Curl</a></li>
                                <li class=""><a href="#examples-Onapsoinfratasks-queryFilters-0-java">Java</a></li>
                                <li class=""><a href="#examples-Onapsoinfratasks-queryFilters-0-android">Android</a></li>
                                <!--<li class=""><a href="#examples-Onapsoinfratasks-queryFilters-0-groovy">Groovy</a></li>-->
                                <li class=""><a href="#examples-Onapsoinfratasks-queryFilters-0-objc">Obj-C</a></li>
                                <li class=""><a href="#examples-Onapsoinfratasks-queryFilters-0-javascript">JavaScript</a></li>
                                <!--<li class=""><a href="#examples-Onapsoinfratasks-queryFilters-0-angular">Angular</a></li>-->
                                <li class=""><a href="#examples-Onapsoinfratasks-queryFilters-0-csharp">C#</a></li>
                                <li class=""><a href="#examples-Onapsoinfratasks-queryFilters-0-php">PHP</a></li>
                                <li class=""><a href="#examples-Onapsoinfratasks-queryFilters-0-perl">Perl</a></li>
                                <li class=""><a href="#examples-Onapsoinfratasks-queryFilters-0-python">Python</a></li>
                            </ul>

                            <div class="tab-content">
                                <div class="tab-pane active" id="examples-Onapsoinfratasks-queryFilters-0-curl">
                                    <pre class="prettyprint"><code class="language-bsh">curl -X GET "http://localhost/onap/so/infra/tasks/{version}?taskId=&originalRequestId=&subscriptionServiceType=&nfRole=&buildingBlockName=&originalRequestDate=&originalRequestorId="</code></pre>
                                </div>
                                <div class="tab-pane" id="examples-Onapsoinfratasks-queryFilters-0-java">
                            <pre class="prettyprint"><code class="language-java">import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.OnapsoinfratasksApi;

import java.io.File;
import java.util.*;

public class OnapsoinfratasksApiExample {

    public static void main(String[] args) {

        OnapsoinfratasksApi apiInstance = new OnapsoinfratasksApi();
        String version = version_example; // String |
        String taskId = taskId_example; // String |
        String originalRequestId = originalRequestId_example; // String |
        String subscriptionServiceType = subscriptionServiceType_example; // String |
        String nfRole = nfRole_example; // String |
        String buildingBlockName = buildingBlockName_example; // String |
        String originalRequestDate = originalRequestDate_example; // String |
        String originalRequestorId = originalRequestorId_example; // String |
        try {
            apiInstance.queryFilters(version, taskId, originalRequestId, subscriptionServiceType, nfRole, buildingBlockName, originalRequestDate, originalRequestorId);
        } catch (ApiException e) {
            System.err.println("Exception when calling OnapsoinfratasksApi#queryFilters");
            e.printStackTrace();
        }
    }
}</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-Onapsoinfratasks-queryFilters-0-android">
                            <pre class="prettyprint"><code class="language-java">import io.swagger.client.api.OnapsoinfratasksApi;

public class OnapsoinfratasksApiExample {

    public static void main(String[] args) {
        OnapsoinfratasksApi apiInstance = new OnapsoinfratasksApi();
        String version = version_example; // String |
        String taskId = taskId_example; // String |
        String originalRequestId = originalRequestId_example; // String |
        String subscriptionServiceType = subscriptionServiceType_example; // String |
        String nfRole = nfRole_example; // String |
        String buildingBlockName = buildingBlockName_example; // String |
        String originalRequestDate = originalRequestDate_example; // String |
        String originalRequestorId = originalRequestorId_example; // String |
        try {
            apiInstance.queryFilters(version, taskId, originalRequestId, subscriptionServiceType, nfRole, buildingBlockName, originalRequestDate, originalRequestorId);
        } catch (ApiException e) {
            System.err.println("Exception when calling OnapsoinfratasksApi#queryFilters");
            e.printStackTrace();
        }
    }
}</code></pre>
                                </div>
                                <!--
  <div class="tab-pane" id="examples-Onapsoinfratasks-queryFilters-0-groovy">
  <pre class="prettyprint language-json prettyprinted" data-type="json"><code>Coming Soon!</code></pre>
  </div> -->
                                <div class="tab-pane" id="examples-Onapsoinfratasks-queryFilters-0-objc">
                              <pre class="prettyprint"><code class="language-cpp">String *version = version_example; //
String *taskId = taskId_example; //  (optional)
String *originalRequestId = originalRequestId_example; //  (optional)
String *subscriptionServiceType = subscriptionServiceType_example; //  (optional)
String *nfRole = nfRole_example; //  (optional)
String *buildingBlockName = buildingBlockName_example; //  (optional)
String *originalRequestDate = originalRequestDate_example; //  (optional)
String *originalRequestorId = originalRequestorId_example; //  (optional)

OnapsoinfratasksApi *apiInstance = [[OnapsoinfratasksApi alloc] init];

// Finds Manual Tasks
[apiInstance queryFiltersWith:version
    taskId:taskId
    originalRequestId:originalRequestId
    subscriptionServiceType:subscriptionServiceType
    nfRole:nfRole
    buildingBlockName:buildingBlockName
    originalRequestDate:originalRequestDate
    originalRequestorId:originalRequestorId
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-Onapsoinfratasks-queryFilters-0-javascript">
                              <pre class="prettyprint"><code class="language-js">var SoGuilinApIs = require('so_guilin_ap_is');

var api = new SoGuilinApIs.OnapsoinfratasksApi()

var version = version_example; // {String}

var opts = {
  'taskId': taskId_example, // {String}
  'originalRequestId': originalRequestId_example, // {String}
  'subscriptionServiceType': subscriptionServiceType_example, // {String}
  'nfRole': nfRole_example, // {String}
  'buildingBlockName': buildingBlockName_example, // {String}
  'originalRequestDate': originalRequestDate_example, // {String}
  'originalRequestorId': originalRequestorId_example // {String}
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.queryFilters(version, opts, callback);
</code></pre>
                                </div>

                                <!--<div class="tab-pane" id="examples-Onapsoinfratasks-queryFilters-0-angular">
              <pre class="prettyprint language-json prettyprinted" data-type="json"><code>Coming Soon!</code></pre>
            </div>-->
                                <div class="tab-pane" id="examples-Onapsoinfratasks-queryFilters-0-csharp">
                              <pre class="prettyprint"><code class="language-cs">using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class queryFiltersExample
    {
        public void main()
        {

            var apiInstance = new OnapsoinfratasksApi();
            var version = version_example;  // String |
            var taskId = taskId_example;  // String |  (optional)
            var originalRequestId = originalRequestId_example;  // String |  (optional)
            var subscriptionServiceType = subscriptionServiceType_example;  // String |  (optional)
            var nfRole = nfRole_example;  // String |  (optional)
            var buildingBlockName = buildingBlockName_example;  // String |  (optional)
            var originalRequestDate = originalRequestDate_example;  // String |  (optional)
            var originalRequestorId = originalRequestorId_example;  // String |  (optional)

            try
            {
                // Finds Manual Tasks
                apiInstance.queryFilters(version, taskId, originalRequestId, subscriptionServiceType, nfRole, buildingBlockName, originalRequestDate, originalRequestorId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling OnapsoinfratasksApi.queryFilters: " + e.Message );
            }
        }
    }
}
</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-Onapsoinfratasks-queryFilters-0-php">
                              <pre class="prettyprint"><code class="language-php"><&#63;php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\OnapsoinfratasksApi();
$version = version_example; // String |
$taskId = taskId_example; // String |
$originalRequestId = originalRequestId_example; // String |
$subscriptionServiceType = subscriptionServiceType_example; // String |
$nfRole = nfRole_example; // String |
$buildingBlockName = buildingBlockName_example; // String |
$originalRequestDate = originalRequestDate_example; // String |
$originalRequestorId = originalRequestorId_example; // String |

try {
    $api_instance->queryFilters($version, $taskId, $originalRequestId, $subscriptionServiceType, $nfRole, $buildingBlockName, $originalRequestDate, $originalRequestorId);
} catch (Exception $e) {
    echo 'Exception when calling OnapsoinfratasksApi->queryFilters: ', $e->getMessage(), PHP_EOL;
}
?></code></pre>
                                </div>

                                <div class="tab-pane" id="examples-Onapsoinfratasks-queryFilters-0-perl">
                              <pre class="prettyprint"><code class="language-perl">use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::OnapsoinfratasksApi;

my $api_instance = WWW::SwaggerClient::OnapsoinfratasksApi->new();
my $version = version_example; # String |
my $taskId = taskId_example; # String |
my $originalRequestId = originalRequestId_example; # String |
my $subscriptionServiceType = subscriptionServiceType_example; # String |
my $nfRole = nfRole_example; # String |
my $buildingBlockName = buildingBlockName_example; # String |
my $originalRequestDate = originalRequestDate_example; # String |
my $originalRequestorId = originalRequestorId_example; # String |

eval {
    $api_instance->queryFilters(version => $version, taskId => $taskId, originalRequestId => $originalRequestId, subscriptionServiceType => $subscriptionServiceType, nfRole => $nfRole, buildingBlockName => $buildingBlockName, originalRequestDate => $originalRequestDate, originalRequestorId => $originalRequestorId);
};
if ($@) {
    warn "Exception when calling OnapsoinfratasksApi->queryFilters: $@\n";
}</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-Onapsoinfratasks-queryFilters-0-python">
                              <pre class="prettyprint"><code class="language-python">from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.OnapsoinfratasksApi()
version = version_example # String |
taskId = taskId_example # String |  (optional)
originalRequestId = originalRequestId_example # String |  (optional)
subscriptionServiceType = subscriptionServiceType_example # String |  (optional)
nfRole = nfRole_example # String |  (optional)
buildingBlockName = buildingBlockName_example # String |  (optional)
originalRequestDate = originalRequestDate_example # String |  (optional)
originalRequestorId = originalRequestorId_example # String |  (optional)

try:
    # Finds Manual Tasks
    api_instance.query_filters(version, taskId=taskId, originalRequestId=originalRequestId, subscriptionServiceType=subscriptionServiceType, nfRole=nfRole, buildingBlockName=buildingBlockName, originalRequestDate=originalRequestDate, originalRequestorId=originalRequestorId)
except ApiException as e:
    print("Exception when calling OnapsoinfratasksApi->queryFilters: %s\n" % e)</code></pre>
                                </div>
                            </div>

                            <h2>Parameters</h2>

                            <div class="methodsubtabletitle">Path parameters</div>
                            <table id="methodsubtable">
                                <tr>
                                    <th width="150px">Name</th>
                                    <th>Description</th>
                                </tr>
                                <tr><td style="width:150px;">version*</td>
                                    <td>


                                        <div id="d2e199_queryFilters_version">
                                            <div class="json-schema-view">
                                                <div class="primitive">
                <span class="type">
                    String
                </span>

                                                </div>
                                                <div class="inner required">
                                                    Required
                                                </div>
                                            </div>
                                        </div>
                                    </td>
                                </tr>

                            </table>




                            <div class="methodsubtabletitle">Query parameters</div>
                            <table id="methodsubtable">
                                <tr>
                                    <th width="150px">Name</th>
                                    <th>Description</th>
                                </tr>
                                <tr><td style="width:150px;">taskId</td>
                                    <td>


                                        <div id="d2e199_queryFilters_taskId">
                                            <div class="json-schema-view">
                                                <div class="primitive">
                <span class="type">
                    String
                </span>

                                                </div>
                                            </div>
                                        </div>
                                    </td>
                                </tr>

                                <tr><td style="width:150px;">originalRequestId</td>
                                    <td>


                                        <div id="d2e199_queryFilters_originalRequestId">
                                            <div class="json-schema-view">
                                                <div class="primitive">
                <span class="type">
                    String
                </span>

                                                </div>
                                            </div>
                                        </div>
                                    </td>
                                </tr>

                                <tr><td style="width:150px;">subscriptionServiceType</td>
                                    <td>


                                        <div id="d2e199_queryFilters_subscriptionServiceType">
                                            <div class="json-schema-view">
                                                <div class="primitive">
                <span class="type">
                    String
                </span>

                                                </div>
                                            </div>
                                        </div>
                                    </td>
                                </tr>

                                <tr><td style="width:150px;">nfRole</td>
                                    <td>


                                        <div id="d2e199_queryFilters_nfRole">
                                            <div class="json-schema-view">
                                                <div class="primitive">
                <span class="type">
                    String
                </span>

                                                </div>
                                            </div>
                                        </div>
                                    </td>
                                </tr>

                                <tr><td style="width:150px;">buildingBlockName</td>
                                    <td>


                                        <div id="d2e199_queryFilters_buildingBlockName">
                                            <div class="json-schema-view">
                                                <div class="primitive">
                <span class="type">
                    String
                </span>

                                                </div>
                                            </div>
                                        </div>
                                    </td>
                                </tr>

                                <tr><td style="width:150px;">originalRequestDate</td>
                                    <td>


                                        <div id="d2e199_queryFilters_originalRequestDate">
                                            <div class="json-schema-view">
                                                <div class="primitive">
                <span class="type">
                    String
                </span>

                                                </div>
                                            </div>
                                        </div>
                                    </td>
                                </tr>

                                <tr><td style="width:150px;">originalRequestorId</td>
                                    <td>


                                        <div id="d2e199_queryFilters_originalRequestorId">
                                            <div class="json-schema-view">
                                                <div class="primitive">
                <span class="type">
                    String
                </span>

                                                </div>
                                            </div>
                                        </div>
                                    </td>
                                </tr>

                            </table>

                            <h2>Responses</h2>
                            <h3> Status: default - successful operation </h3>

                            <ul class="nav nav-tabs nav-tabs-examples" >
                            </ul>

                            <div class="tab-content" style='margin-bottom: 10px;'>
                            </div>

                        </article>
                    </div>
                    <hr>
                </section>
                <section id="api-OnapsoinfraworkflowSpecifications">
                    <h1>OnapsoinfraworkflowSpecifications</h1>
                    <div id="api-OnapsoinfraworkflowSpecifications-queryWorkflowSpecifications">
                        <article id="api-OnapsoinfraworkflowSpecifications-queryWorkflowSpecifications-0" data-group="User" data-name="queryWorkflowSpecifications" data-version="0">
                            <div class="pull-left">
                                <h1>queryWorkflowSpecifications</h1>
                                <p>Retrieve Workflow details based on the filter criteria</p>
                            </div>
                            <div class="pull-right"></div>
                            <div class="clearfix"></div>
                            <p></p>
                            <p class="marked"></p>
                            <p></p>
                            <br />
                            <pre class="prettyprint language-html prettyprinted" data-type="get"><code><span class="pln">/onap/so/infra/workflowSpecifications/{version}/workflows</span></code></pre>
                            <p>
                            <h3>Usage and SDK Samples</h3>
                            </p>
                            <ul class="nav nav-tabs nav-tabs-examples">
                                <li class="active"><a href="#examples-OnapsoinfraworkflowSpecifications-queryWorkflowSpecifications-0-curl">Curl</a></li>
                                <li class=""><a href="#examples-OnapsoinfraworkflowSpecifications-queryWorkflowSpecifications-0-java">Java</a></li>
                                <li class=""><a href="#examples-OnapsoinfraworkflowSpecifications-queryWorkflowSpecifications-0-android">Android</a></li>
                                <!--<li class=""><a href="#examples-OnapsoinfraworkflowSpecifications-queryWorkflowSpecifications-0-groovy">Groovy</a></li>-->
                                <li class=""><a href="#examples-OnapsoinfraworkflowSpecifications-queryWorkflowSpecifications-0-objc">Obj-C</a></li>
                                <li class=""><a href="#examples-OnapsoinfraworkflowSpecifications-queryWorkflowSpecifications-0-javascript">JavaScript</a></li>
                                <!--<li class=""><a href="#examples-OnapsoinfraworkflowSpecifications-queryWorkflowSpecifications-0-angular">Angular</a></li>-->
                                <li class=""><a href="#examples-OnapsoinfraworkflowSpecifications-queryWorkflowSpecifications-0-csharp">C#</a></li>
                                <li class=""><a href="#examples-OnapsoinfraworkflowSpecifications-queryWorkflowSpecifications-0-php">PHP</a></li>
                                <li class=""><a href="#examples-OnapsoinfraworkflowSpecifications-queryWorkflowSpecifications-0-perl">Perl</a></li>
                                <li class=""><a href="#examples-OnapsoinfraworkflowSpecifications-queryWorkflowSpecifications-0-python">Python</a></li>
                            </ul>

                            <div class="tab-content">
                                <div class="tab-pane active" id="examples-OnapsoinfraworkflowSpecifications-queryWorkflowSpecifications-0-curl">
                                    <pre class="prettyprint"><code class="language-bsh">curl -X GET "http://localhost/onap/so/infra/workflowSpecifications/{version}/workflows?resourceTarget="</code></pre>
                                </div>
                                <div class="tab-pane" id="examples-OnapsoinfraworkflowSpecifications-queryWorkflowSpecifications-0-java">
                            <pre class="prettyprint"><code class="language-java">import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.OnapsoinfraworkflowSpecificationsApi;

import java.io.File;
import java.util.*;

public class OnapsoinfraworkflowSpecificationsApiExample {

    public static void main(String[] args) {

        OnapsoinfraworkflowSpecificationsApi apiInstance = new OnapsoinfraworkflowSpecificationsApi();
        String version = version_example; // String |
        String resourceTarget = resourceTarget_example; // String |
        try {
            RetrievingWorkflowResponse result = apiInstance.queryWorkflowSpecifications(version, resourceTarget);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling OnapsoinfraworkflowSpecificationsApi#queryWorkflowSpecifications");
            e.printStackTrace();
        }
    }
}</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-OnapsoinfraworkflowSpecifications-queryWorkflowSpecifications-0-android">
                            <pre class="prettyprint"><code class="language-java">import io.swagger.client.api.OnapsoinfraworkflowSpecificationsApi;

public class OnapsoinfraworkflowSpecificationsApiExample {

    public static void main(String[] args) {
        OnapsoinfraworkflowSpecificationsApi apiInstance = new OnapsoinfraworkflowSpecificationsApi();
        String version = version_example; // String |
        String resourceTarget = resourceTarget_example; // String |
        try {
            RetrievingWorkflowResponse result = apiInstance.queryWorkflowSpecifications(version, resourceTarget);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling OnapsoinfraworkflowSpecificationsApi#queryWorkflowSpecifications");
            e.printStackTrace();
        }
    }
}</code></pre>
                                </div>
                                <!--
  <div class="tab-pane" id="examples-OnapsoinfraworkflowSpecifications-queryWorkflowSpecifications-0-groovy">
  <pre class="prettyprint language-json prettyprinted" data-type="json"><code>Coming Soon!</code></pre>
  </div> -->
                                <div class="tab-pane" id="examples-OnapsoinfraworkflowSpecifications-queryWorkflowSpecifications-0-objc">
                              <pre class="prettyprint"><code class="language-cpp">String *version = version_example; //
String *resourceTarget = resourceTarget_example; //  (optional)

OnapsoinfraworkflowSpecificationsApi *apiInstance = [[OnapsoinfraworkflowSpecificationsApi alloc] init];

// Retrieve Workflow details based on the filter criteria
[apiInstance queryWorkflowSpecificationsWith:version
    resourceTarget:resourceTarget
              completionHandler: ^(RetrievingWorkflowResponse output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-OnapsoinfraworkflowSpecifications-queryWorkflowSpecifications-0-javascript">
                              <pre class="prettyprint"><code class="language-js">var SoGuilinApIs = require('so_guilin_ap_is');

var api = new SoGuilinApIs.OnapsoinfraworkflowSpecificationsApi()

var version = version_example; // {String}

var opts = {
  'resourceTarget': resourceTarget_example // {String}
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.queryWorkflowSpecifications(version, opts, callback);
</code></pre>
                                </div>

                                <!--<div class="tab-pane" id="examples-OnapsoinfraworkflowSpecifications-queryWorkflowSpecifications-0-angular">
              <pre class="prettyprint language-json prettyprinted" data-type="json"><code>Coming Soon!</code></pre>
            </div>-->
                                <div class="tab-pane" id="examples-OnapsoinfraworkflowSpecifications-queryWorkflowSpecifications-0-csharp">
                              <pre class="prettyprint"><code class="language-cs">using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class queryWorkflowSpecificationsExample
    {
        public void main()
        {

            var apiInstance = new OnapsoinfraworkflowSpecificationsApi();
            var version = version_example;  // String |
            var resourceTarget = resourceTarget_example;  // String |  (optional)

            try
            {
                // Retrieve Workflow details based on the filter criteria
                RetrievingWorkflowResponse result = apiInstance.queryWorkflowSpecifications(version, resourceTarget);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling OnapsoinfraworkflowSpecificationsApi.queryWorkflowSpecifications: " + e.Message );
            }
        }
    }
}
</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-OnapsoinfraworkflowSpecifications-queryWorkflowSpecifications-0-php">
                              <pre class="prettyprint"><code class="language-php"><&#63;php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\OnapsoinfraworkflowSpecificationsApi();
$version = version_example; // String |
$resourceTarget = resourceTarget_example; // String |

try {
    $result = $api_instance->queryWorkflowSpecifications($version, $resourceTarget);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling OnapsoinfraworkflowSpecificationsApi->queryWorkflowSpecifications: ', $e->getMessage(), PHP_EOL;
}
?></code></pre>
                                </div>

                                <div class="tab-pane" id="examples-OnapsoinfraworkflowSpecifications-queryWorkflowSpecifications-0-perl">
                              <pre class="prettyprint"><code class="language-perl">use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::OnapsoinfraworkflowSpecificationsApi;

my $api_instance = WWW::SwaggerClient::OnapsoinfraworkflowSpecificationsApi->new();
my $version = version_example; # String |
my $resourceTarget = resourceTarget_example; # String |

eval {
    my $result = $api_instance->queryWorkflowSpecifications(version => $version, resourceTarget => $resourceTarget);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling OnapsoinfraworkflowSpecificationsApi->queryWorkflowSpecifications: $@\n";
}</code></pre>
                                </div>

                                <div class="tab-pane" id="examples-OnapsoinfraworkflowSpecifications-queryWorkflowSpecifications-0-python">
                              <pre class="prettyprint"><code class="language-python">from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.OnapsoinfraworkflowSpecificationsApi()
version = version_example # String |
resourceTarget = resourceTarget_example # String |  (optional)

try:
    # Retrieve Workflow details based on the filter criteria
    api_response = api_instance.query_workflow_specifications(version, resourceTarget=resourceTarget)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling OnapsoinfraworkflowSpecificationsApi->queryWorkflowSpecifications: %s\n" % e)</code></pre>
                                </div>
                            </div>

                            <h2>Parameters</h2>

                            <div class="methodsubtabletitle">Path parameters</div>
                            <table id="methodsubtable">
                                <tr>
                                    <th width="150px">Name</th>
                                    <th>Description</th>
                                </tr>
                                <tr><td style="width:150px;">version*</td>
                                    <td>


                                        <div id="d2e199_queryWorkflowSpecifications_version">
                                            <div class="json-schema-view">
                                                <div class="primitive">
                <span class="type">
                    String
                </span>

                                                </div>
                                                <div class="inner required">
                                                    Required
                                                </div>
                                            </div>
                                        </div>
                                    </td>
                                </tr>

                            </table>




                            <div class="methodsubtabletitle">Query parameters</div>
                            <table id="methodsubtable">
                                <tr>
                                    <th width="150px">Name</th>
                                    <th>Description</th>
                                </tr>
                                <tr><td style="width:150px;">resourceTarget</td>
                                    <td>


                                        <div id="d2e199_queryWorkflowSpecifications_resourceTarget">
                                            <div class="json-schema-view">
                                                <div class="primitive">
                <span class="type">
                    String
                </span>

                                                </div>
                                            </div>
                                        </div>
                                    </td>
                                </tr>

                            </table>

                            <h2>Responses</h2>
                            <h3> Status: default - List of workflow specifications on successful operation </h3>

                            <ul class="nav nav-tabs nav-tabs-examples" >
                                <li class="active">
                                    <a data-toggle="tab" href="#responses-queryWorkflowSpecifications-default-schema">Schema</a>
                                </li>

                            </ul>

                            <div class="tab-content" style='margin-bottom: 10px;'>
                                <div class="tab-pane active" id="responses-queryWorkflowSpecifications-default-schema">
                                    <div id='responses-queryWorkflowSpecifications-default-schema-default' style="padding: 30px; border-left: 1px solid #eee; border-right: 1px solid #eee; border-bottom: 1px solid #eee;">
                                        <script>
                                      $(document).ready(function() {
                                        var schemaWrapper = {
  "description" : "List of workflow specifications on successful operation",
  "schema" : {
    "$ref" : "#/definitions/RetrievingWorkflowResponse"
  }
};
                                        var schema = schemaWrapper.schema;
                                        if (schema.$ref != null) {
                                          schema = defsParser.$refs.get(schema.$ref);
                                        } else {
                                          schemaWrapper.definitions = defs;
                                          $RefParser.dereference(schemaWrapper).catch(function(err) {
                                            console.log(err);
                                          });
                                        }

                                        //console.log(JSON.stringify(schema));
                                        var view = new JSONSchemaView(schema, 3);
                                        $('#responses-queryWorkflowSpecifications-default-schema-data').val(stringify(schema));
                                        var result = $('#responses-queryWorkflowSpecifications-default-schema-default');
                                        result.empty();
                                        result.append(view.render());
                                      });
                                    </script>
                                    </div>
                                    <input id='responses-queryWorkflowSpecifications-default-schema-data' type='hidden' value=''></input>
                                </div>
                            </div>

                        </article>
                    </div>
                    <hr>
                </section>
            </div>
            <div id="footer">
                <div id="api-_footer">
                    <p>Suggestions, contact, support and error reporting;
                    <div class="app-desc">Information URL: <a href="https://helloreverb.com">https://helloreverb.com</a></div>
                    <div class="app-desc">Contact Info: <a href="hello@helloreverb.com">hello@helloreverb.com</a></div>
                    </p>
                    <div class="license-info">All rights reserved</div>
                    <div class="license-url">http://apache.org/licenses/LICENSE-2.0.html</div>
                </div>
            </div>
        </div>
    </div>
</div>
<script>
(function webpackUniversalModuleDefinition(root, factory) {
	if(typeof exports === 'object' && typeof module === 'object')
		module.exports = factory();
	else if(typeof define === 'function' && define.amd)
		define("JSONFormatter", [], factory);
	else if(typeof exports === 'object')
		exports["JSONFormatter"] = factory();
	else
		root["JSONFormatter"] = factory();
})(this, function() {
return /******/ (function(modules) { // webpackBootstrap
/******/ 	// The module cache
/******/ 	var installedModules = {};
/******/
/******/ 	// The require function
/******/ 	function __webpack_require__(moduleId) {
/******/
/******/ 		// Check if module is in cache
/******/ 		if(installedModules[moduleId])
/******/ 			return installedModules[moduleId].exports;
/******/
/******/ 		// Create a new module (and put it into the cache)
/******/ 		var module = installedModules[moduleId] = {
/******/ 			exports: {},
/******/ 			id: moduleId,
/******/ 			loaded: false
/******/ 		};
/******/
/******/ 		// Execute the module function
/******/ 		modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
/******/
/******/ 		// Flag the module as loaded
/******/ 		module.loaded = true;
/******/
/******/ 		// Return the exports of the module
/******/ 		return module.exports;
/******/ 	}
/******/
/******/
/******/ 	// expose the modules object (__webpack_modules__)
/******/ 	__webpack_require__.m = modules;
/******/
/******/ 	// expose the module cache
/******/ 	__webpack_require__.c = installedModules;
/******/
/******/ 	// __webpack_public_path__
/******/ 	__webpack_require__.p = "dist";
/******/
/******/ 	// Load entry module and return exports
/******/ 	return __webpack_require__(0);
/******/ })
/************************************************************************/
/******/ ([
/* 0 */
/***/ function(module, exports, __webpack_require__) {

	module.exports = __webpack_require__(1);


/***/ },
/* 1 */
/***/ function(module, exports, __webpack_require__) {

	"use strict";
	__webpack_require__(2);
	var helpers_ts_1 = __webpack_require__(6);
	var DATE_STRING_REGEX = /(^\d{1,4}[\.|\\/|-]\d{1,2}[\.|\\/|-]\d{1,4})(\s*(?:0?[1-9]:[0-5]|1(?=[012])\d:[0-5])\d\s*[ap]m)?$/;
	var PARTIAL_DATE_REGEX = /\d{2}:\d{2}:\d{2} GMT-\d{4}/;
	var JSON_DATE_REGEX = /\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}.\d{3}Z/;
	// When toggleing, don't animated removal or addition of more than a few items
	var MAX_ANIMATED_TOGGLE_ITEMS = 10;
	var requestAnimationFrame = window.requestAnimationFrame || function (cb) { cb(); return 0; };
	;
	var _defaultConfig = {
	    hoverPreviewEnabled: false,
	    hoverPreviewArrayCount: 100,
	    hoverPreviewFieldCount: 5,
	    animateOpen: true,
	    animateClose: true,
	    theme: null
	};
	module.exports = (function () {
	    /**
	     * @param {object} json The JSON object you want to render. It has to be an
	     * object or array. Do NOT pass raw JSON string.
	     *
	     * @param {number} [open=1] his number indicates up to how many levels the
	     * rendered tree should expand. Set it to `0` to make the whole tree collapsed
	     * or set it to `Infinity` to expand the tree deeply
	     *
	     * @param {object} [config=defaultConfig] -
	     *  defaultConfig = {
	     *   hoverPreviewEnabled: false,
	     *   hoverPreviewArrayCount: 100,
	     *   hoverPreviewFieldCount: 5
	     * }
	     *
	     * Available configurations:
	     *  #####Hover Preview
	     * * `hoverPreviewEnabled`:  enable preview on hover
	     * * `hoverPreviewArrayCount`: number of array items to show in preview Any
	     *    array larger than this number will be shown as `Array[XXX]` where `XXX`
	     *    is length of the array.
	     * * `hoverPreviewFieldCount`: number of object properties to show for object
	     *   preview. Any object with more properties that thin number will be
	     *   truncated.
	     *
	     * @param {string} [key=undefined] The key that this object in it's parent
	     * context
	    */
	    function JSONFormatter(json, open, config, key) {
	        if (open === void 0) { open = 1; }
	        if (config === void 0) { config = _defaultConfig; }
	        this.json = json;
	        this.open = open;
	        this.config = config;
	        this.key = key;
	        // Hold the open state after the toggler is used
	        this._isOpen = null;
	        // Setting default values for config object
	        if (this.config.hoverPreviewEnabled === undefined) {
	            this.config.hoverPreviewEnabled = _defaultConfig.hoverPreviewEnabled;
	        }
	        if (this.config.hoverPreviewArrayCount === undefined) {
	            this.config.hoverPreviewArrayCount = _defaultConfig.hoverPreviewArrayCount;
	        }
	        if (this.config.hoverPreviewFieldCount === undefined) {
	            this.config.hoverPreviewFieldCount = _defaultConfig.hoverPreviewFieldCount;
	        }
	    }
	    Object.defineProperty(JSONFormatter.prototype, "isOpen", {
	        /*
	         * is formatter open?
	        */
	        get: function () {
	            if (this._isOpen !== null) {
	                return this._isOpen;
	            }
	            else {
	                return this.open > 0;
	            }
	        },
	        /*
	         * set open state (from toggler)
	        */
	        set: function (value) {
	            this._isOpen = value;
	        },
	        enumerable: true,
	        configurable: true
	    });
	    Object.defineProperty(JSONFormatter.prototype, "isDate", {
	        /*
	         * is this a date string?
	        */
	        get: function () {
	            return (this.type === 'string') &&
	                (DATE_STRING_REGEX.test(this.json) ||
	                    JSON_DATE_REGEX.test(this.json) ||
	                    PARTIAL_DATE_REGEX.test(this.json));
	        },
	        enumerable: true,
	        configurable: true
	    });
	    Object.defineProperty(JSONFormatter.prototype, "isUrl", {
	        /*
	         * is this a URL string?
	        */
	        get: function () {
	            return this.type === 'string' && (this.json.indexOf('http') === 0);
	        },
	        enumerable: true,
	        configurable: true
	    });
	    Object.defineProperty(JSONFormatter.prototype, "isArray", {
	        /*
	         * is this an array?
	        */
	        get: function () {
	            return Array.isArray(this.json);
	        },
	        enumerable: true,
	        configurable: true
	    });
	    Object.defineProperty(JSONFormatter.prototype, "isObject", {
	        /*
	         * is this an object?
	         * Note: In this context arrays are object as well
	        */
	        get: function () {
	            return helpers_ts_1.isObject(this.json);
	        },
	        enumerable: true,
	        configurable: true
	    });
	    Object.defineProperty(JSONFormatter.prototype, "isEmptyObject", {
	        /*
	         * is this an empty object with no properties?
	        */
	        get: function () {
	            return !this.keys.length && !this.isArray;
	        },
	        enumerable: true,
	        configurable: true
	    });
	    Object.defineProperty(JSONFormatter.prototype, "isEmpty", {
	        /*
	         * is this an empty object or array?
	        */
	        get: function () {
	            return this.isEmptyObject || (this.keys && !this.keys.length && this.isArray);
	        },
	        enumerable: true,
	        configurable: true
	    });
	    Object.defineProperty(JSONFormatter.prototype, "hasKey", {
	        /*
	         * did we receive a key argument?
	         * This means that the formatter was called as a sub formatter of a parent formatter
	        */
	        get: function () {
	            return typeof this.key !== 'undefined';
	        },
	        enumerable: true,
	        configurable: true
	    });
	    Object.defineProperty(JSONFormatter.prototype, "constructorName", {
	        /*
	         * if this is an object, get constructor function name
	        */
	        get: function () {
	            return helpers_ts_1.getObjectName(this.json);
	        },
	        enumerable: true,
	        configurable: true
	    });
	    Object.defineProperty(JSONFormatter.prototype, "type", {
	        /*
	         * get type of this value
	         * Possible values: all JavaScript primitive types plus "array" and "null"
	        */
	        get: function () {
	            return helpers_ts_1.getType(this.json);
	        },
	        enumerable: true,
	        configurable: true
	    });
	    Object.defineProperty(JSONFormatter.prototype, "keys", {
	        /*
	         * get object keys
	         * If there is an empty key we pad it wit quotes to make it visible
	        */
	        get: function () {
	            if (this.isObject) {
	                return Object.keys(this.json).map(function (key) { return key ? key : '""'; });
	            }
	            else {
	                return [];
	            }
	        },
	        enumerable: true,
	        configurable: true
	    });
	    /**
	     * Toggles `isOpen` state
	     *
	    */
	    JSONFormatter.prototype.toggleOpen = function () {
	        this.isOpen = !this.isOpen;
	        if (this.element) {
	            if (this.isOpen) {
	                this.appendChildren(this.config.animateOpen);
	            }
	            else {
	                this.removeChildren(this.config.animateClose);
	            }
	            this.element.classList.toggle(helpers_ts_1.cssClass('open'));
	        }
	    };
	    /**
	    * Open all children up to a certain depth.
	    * Allows actions such as expand all/collapse all
	    *
	    */
	    JSONFormatter.prototype.openAtDepth = function (depth) {
	        if (depth === void 0) { depth = 1; }
	        if (depth < 0) {
	            return;
	        }
	        this.open = depth;
	        this.isOpen = (depth !== 0);
	        if (this.element) {
	            this.removeChildren(false);
	            if (depth === 0) {
	                this.element.classList.remove(helpers_ts_1.cssClass('open'));
	            }
	            else {
	                this.appendChildren(this.config.animateOpen);
	                this.element.classList.add(helpers_ts_1.cssClass('open'));
	            }
	        }
	    };
	    /**
	     * Generates inline preview
	     *
	     * @returns {string}
	    */
	    JSONFormatter.prototype.getInlinepreview = function () {
	        var _this = this;
	        if (this.isArray) {
	            // if array length is greater then 100 it shows "Array[101]"
	            if (this.json.length > this.config.hoverPreviewArrayCount) {
	                return "Array[" + this.json.length + "]";
	            }
	            else {
	                return "[" + this.json.map(helpers_ts_1.getPreview).join(', ') + "]";
	            }
	        }
	        else {
	            var keys = this.keys;
	            // the first five keys (like Chrome Developer Tool)
	            var narrowKeys = keys.slice(0, this.config.hoverPreviewFieldCount);
	            // json value schematic information
	            var kvs = narrowKeys.map(function (key) { return (key + ":" + helpers_ts_1.getPreview(_this.json[key])); });
	            // if keys count greater then 5 then show ellipsis
	            var ellipsis = keys.length >= this.config.hoverPreviewFieldCount ? '…' : '';
	            return "{" + kvs.join(', ') + ellipsis + "}";
	        }
	    };
	    /**
	     * Renders an HTML element and installs event listeners
	     *
	     * @returns {HTMLDivElement}
	    */
	    JSONFormatter.prototype.render = function () {
	        // construct the root element and assign it to this.element
	        this.element = helpers_ts_1.createElement('div', 'row');
	        // construct the toggler link
	        var togglerLink = helpers_ts_1.createElement('a', 'toggler-link');
	        // if this is an object we need a wrapper span (toggler)
	        if (this.isObject) {
	            togglerLink.appendChild(helpers_ts_1.createElement('span', 'toggler'));
	        }
	        // if this is child of a parent formatter we need to append the key
	        if (this.hasKey) {
	            togglerLink.appendChild(helpers_ts_1.createElement('span', 'key', this.key + ":"));
	        }
	        // Value for objects and arrays
	        if (this.isObject) {
	            // construct the value holder element
	            var value = helpers_ts_1.createElement('span', 'value');
	            // we need a wrapper span for objects
	            var objectWrapperSpan = helpers_ts_1.createElement('span');
	            // get constructor name and append it to wrapper span
	            var constructorName = helpers_ts_1.createElement('span', 'constructor-name', this.constructorName);
	            objectWrapperSpan.appendChild(constructorName);
	            // if it's an array append the array specific elements like brackets and length
	            if (this.isArray) {
	                var arrayWrapperSpan = helpers_ts_1.createElement('span');
	                arrayWrapperSpan.appendChild(helpers_ts_1.createElement('span', 'bracket', '['));
	                arrayWrapperSpan.appendChild(helpers_ts_1.createElement('span', 'number', (this.json.length)));
	                arrayWrapperSpan.appendChild(helpers_ts_1.createElement('span', 'bracket', ']'));
	                objectWrapperSpan.appendChild(arrayWrapperSpan);
	            }
	            // append object wrapper span to toggler link
	            value.appendChild(objectWrapperSpan);
	            togglerLink.appendChild(value);
	        }
	        else {
	            // make a value holder element
	            var value = this.isUrl ? helpers_ts_1.createElement('a') : helpers_ts_1.createElement('span');
	            // add type and other type related CSS classes
	            value.classList.add(helpers_ts_1.cssClass(this.type));
	            if (this.isDate) {
	                value.classList.add(helpers_ts_1.cssClass('date'));
	            }
	            if (this.isUrl) {
	                value.classList.add(helpers_ts_1.cssClass('url'));
	                value.setAttribute('href', this.json);
	            }
	            // Append value content to value element
	            var valuePreview = helpers_ts_1.getValuePreview(this.json, this.json);
	            value.appendChild(document.createTextNode(valuePreview));
	            // append the value element to toggler link
	            togglerLink.appendChild(value);
	        }
	        // if hover preview is enabled, append the inline preview element
	        if (this.isObject && this.config.hoverPreviewEnabled) {
	            var preview = helpers_ts_1.createElement('span', 'preview-text');
	            preview.appendChild(document.createTextNode(this.getInlinepreview()));
	            togglerLink.appendChild(preview);
	        }
	        // construct a children element
	        var children = helpers_ts_1.createElement('div', 'children');
	        // set CSS classes for children
	        if (this.isObject) {
	            children.classList.add(helpers_ts_1.cssClass('object'));
	        }
	        if (this.isArray) {
	            children.classList.add(helpers_ts_1.cssClass('array'));
	        }
	        if (this.isEmpty) {
	            children.classList.add(helpers_ts_1.cssClass('empty'));
	        }
	        // set CSS classes for root element
	        if (this.config && this.config.theme) {
	            this.element.classList.add(helpers_ts_1.cssClass(this.config.theme));
	        }
	        if (this.isOpen) {
	            this.element.classList.add(helpers_ts_1.cssClass('open'));
	        }
	        // append toggler and children elements to root element
	        this.element.appendChild(togglerLink);
	        this.element.appendChild(children);
	        // if formatter is set to be open call appendChildren
	        if (this.isObject && this.isOpen) {
	            this.appendChildren();
	        }
	        // add event listener for toggling
	        if (this.isObject) {
	            togglerLink.addEventListener('click', this.toggleOpen.bind(this));
	        }
	        return this.element;
	    };
	    /**
	     * Appends all the children to children element
	     * Animated option is used when user triggers this via a click
	    */
	    JSONFormatter.prototype.appendChildren = function (animated) {
	        var _this = this;
	        if (animated === void 0) { animated = false; }
	        var children = this.element.querySelector("div." + helpers_ts_1.cssClass('children'));
	        if (!children || this.isEmpty) {
	            return;
	        }
	        if (animated) {
	            var index_1 = 0;
	            var addAChild_1 = function () {
	                var key = _this.keys[index_1];
	                var formatter = new JSONFormatter(_this.json[key], _this.open - 1, _this.config, key);
	                children.appendChild(formatter.render());
	                index_1 += 1;
	                if (index_1 < _this.keys.length) {
	                    if (index_1 > MAX_ANIMATED_TOGGLE_ITEMS) {
	                        addAChild_1();
	                    }
	                    else {
	                        requestAnimationFrame(addAChild_1);
	                    }
	                }
	            };
	            requestAnimationFrame(addAChild_1);
	        }
	        else {
	            this.keys.forEach(function (key) {
	                var formatter = new JSONFormatter(_this.json[key], _this.open - 1, _this.config, key);
	                children.appendChild(formatter.render());
	            });
	        }
	    };
	    /**
	     * Removes all the children from children element
	     * Animated option is used when user triggers this via a click
	    */
	    JSONFormatter.prototype.removeChildren = function (animated) {
	        if (animated === void 0) { animated = false; }
	        var childrenElement = this.element.querySelector("div." + helpers_ts_1.cssClass('children'));
	        if (animated) {
	            var childrenRemoved_1 = 0;
	            var removeAChild_1 = function () {
	                if (childrenElement && childrenElement.children.length) {
	                    childrenElement.removeChild(childrenElement.children[0]);
	                    childrenRemoved_1 += 1;
	                    if (childrenRemoved_1 > MAX_ANIMATED_TOGGLE_ITEMS) {
	                        removeAChild_1();
	                    }
	                    else {
	                        requestAnimationFrame(removeAChild_1);
	                    }
	                }
	            };
	            requestAnimationFrame(removeAChild_1);
	        }
	        else {
	            if (childrenElement) {
	                childrenElement.innerHTML = '';
	            }
	        }
	    };
	    return JSONFormatter;
	}());


/***/ },
/* 2 */
/***/ function(module, exports, __webpack_require__) {

	// style-loader: Adds some css to the DOM by adding a <style> tag

	// load the styles
	var content = __webpack_require__(3);
	if(typeof content === 'string') content = [[module.id, content, '']];
	// add the styles to the DOM
	var update = __webpack_require__(5)(content, {"sourceMap":true});
	if(content.locals) module.exports = content.locals;
	// Hot Module Replacement
	if(false) {
		// When the styles change, update the <style> tags
		if(!content.locals) {
			module.hot.accept("!!./../node_modules/css-loader/index.js?sourceMap!./../node_modules/less-loader/index.js?sourceMap!./style.less", function() {
				var newContent = require("!!./../node_modules/css-loader/index.js?sourceMap!./../node_modules/less-loader/index.js?sourceMap!./style.less");
				if(typeof newContent === 'string') newContent = [[module.id, newContent, '']];
				update(newContent);
			});
		}
		// When the module is disposed, remove the <style> tags
		module.hot.dispose(function() { update(); });
	}

/***/ },
/* 3 */
/***/ function(module, exports, __webpack_require__) {

	exports = module.exports = __webpack_require__(4)();
	// imports


	// module
	exports.push([module.id, ".json-formatter-row {\n  font-family: monospace;\n}\n.json-formatter-row,\n.json-formatter-row a,\n.json-formatter-row a:hover {\n  color: black;\n  text-decoration: none;\n}\n.json-formatter-row .json-formatter-row {\n  margin-left: 1rem;\n}\n.json-formatter-row .json-formatter-children.json-formatter-empty {\n  opacity: 0.5;\n  margin-left: 1rem;\n}\n.json-formatter-row .json-formatter-children.json-formatter-empty:after {\n  display: none;\n}\n.json-formatter-row .json-formatter-children.json-formatter-empty.json-formatter-object:after {\n  content: \"No properties\";\n}\n.json-formatter-row .json-formatter-children.json-formatter-empty.json-formatter-array:after {\n  content: \"[]\";\n}\n.json-formatter-row .json-formatter-string {\n  color: green;\n  white-space: pre;\n  word-wrap: break-word;\n}\n.json-formatter-row .json-formatter-number {\n  color: blue;\n}\n.json-formatter-row .json-formatter-boolean {\n  color: red;\n}\n.json-formatter-row .json-formatter-null {\n  color: #855A00;\n}\n.json-formatter-row .json-formatter-undefined {\n  color: #ca0b69;\n}\n.json-formatter-row .json-formatter-function {\n  color: #FF20ED;\n}\n.json-formatter-row .json-formatter-date {\n  background-color: rgba(0, 0, 0, 0.05);\n}\n.json-formatter-row .json-formatter-url {\n  text-decoration: underline;\n  color: blue;\n  cursor: pointer;\n}\n.json-formatter-row .json-formatter-bracket {\n  color: blue;\n}\n.json-formatter-row .json-formatter-key {\n  color: #00008B;\n  cursor: pointer;\n  padding-right: 0.2rem;\n}\n.json-formatter-row .json-formatter-constructor-name {\n  cursor: pointer;\n}\n.json-formatter-row .json-formatter-toggler {\n  line-height: 1.2rem;\n  font-size: 0.7rem;\n  vertical-align: middle;\n  opacity: 0.6;\n  cursor: pointer;\n  padding-right: 0.2rem;\n}\n.json-formatter-row .json-formatter-toggler:after {\n  display: inline-block;\n  transition: transform 100ms ease-in;\n  content: \"\\25BA\";\n}\n.json-formatter-row > a > .json-formatter-preview-text {\n  opacity: 0;\n  transition: opacity 0.15s ease-in;\n  font-style: italic;\n}\n.json-formatter-row:hover > a > .json-formatter-preview-text {\n  opacity: 0.6;\n}\n.json-formatter-row.json-formatter-open > .json-formatter-toggler-link .json-formatter-toggler:after {\n  transform: rotate(90deg);\n}\n.json-formatter-row.json-formatter-open > .json-formatter-children:after {\n  display: inline-block;\n}\n.json-formatter-row.json-formatter-open > a > .json-formatter-preview-text {\n  display: none;\n}\n.json-formatter-row.json-formatter-open.json-formatter-empty:after {\n  display: block;\n}\n.json-formatter-dark.json-formatter-row {\n  font-family: monospace;\n}\n.json-formatter-dark.json-formatter-row,\n.json-formatter-dark.json-formatter-row a,\n.json-formatter-dark.json-formatter-row a:hover {\n  color: white;\n  text-decoration: none;\n}\n.json-formatter-dark.json-formatter-row .json-formatter-row {\n  margin-left: 1rem;\n}\n.json-formatter-dark.json-formatter-row .json-formatter-children.json-formatter-empty {\n  opacity: 0.5;\n  margin-left: 1rem;\n}\n.json-formatter-dark.json-formatter-row .json-formatter-children.json-formatter-empty:after {\n  display: none;\n}\n.json-formatter-dark.json-formatter-row .json-formatter-children.json-formatter-empty.json-formatter-object:after {\n  content: \"No properties\";\n}\n.json-formatter-dark.json-formatter-row .json-formatter-children.json-formatter-empty.json-formatter-array:after {\n  content: \"[]\";\n}\n.json-formatter-dark.json-formatter-row .json-formatter-string {\n  color: #31F031;\n  white-space: pre;\n  word-wrap: break-word;\n}\n.json-formatter-dark.json-formatter-row .json-formatter-number {\n  color: #66C2FF;\n}\n.json-formatter-dark.json-formatter-row .json-formatter-boolean {\n  color: #EC4242;\n}\n.json-formatter-dark.json-formatter-row .json-formatter-null {\n  color: #EEC97D;\n}\n.json-formatter-dark.json-formatter-row .json-formatter-undefined {\n  color: #ef8fbe;\n}\n.json-formatter-dark.json-formatter-row .json-formatter-function {\n  color: #FD48CB;\n}\n.json-formatter-dark.json-formatter-row .json-formatter-date {\n  background-color: rgba(255, 255, 255, 0.05);\n}\n.json-formatter-dark.json-formatter-row .json-formatter-url {\n  text-decoration: underline;\n  color: #027BFF;\n  cursor: pointer;\n}\n.json-formatter-dark.json-formatter-row .json-formatter-bracket {\n  color: #9494FF;\n}\n.json-formatter-dark.json-formatter-row .json-formatter-key {\n  color: #23A0DB;\n  cursor: pointer;\n  padding-right: 0.2rem;\n}\n.json-formatter-dark.json-formatter-row .json-formatter-constructor-name {\n  cursor: pointer;\n}\n.json-formatter-dark.json-formatter-row .json-formatter-toggler {\n  line-height: 1.2rem;\n  font-size: 0.7rem;\n  vertical-align: middle;\n  opacity: 0.6;\n  cursor: pointer;\n  padding-right: 0.2rem;\n}\n.json-formatter-dark.json-formatter-row .json-formatter-toggler:after {\n  display: inline-block;\n  transition: transform 100ms ease-in;\n  content: \"\\25BA\";\n}\n.json-formatter-dark.json-formatter-row > a > .json-formatter-preview-text {\n  opacity: 0;\n  transition: opacity 0.15s ease-in;\n  font-style: italic;\n}\n.json-formatter-dark.json-formatter-row:hover > a > .json-formatter-preview-text {\n  opacity: 0.6;\n}\n.json-formatter-dark.json-formatter-row.json-formatter-open > .json-formatter-toggler-link .json-formatter-toggler:after {\n  transform: rotate(90deg);\n}\n.json-formatter-dark.json-formatter-row.json-formatter-open > .json-formatter-children:after {\n  display: inline-block;\n}\n.json-formatter-dark.json-formatter-row.json-formatter-open > a > .json-formatter-preview-text {\n  display: none;\n}\n.json-formatter-dark.json-formatter-row.json-formatter-open.json-formatter-empty:after {\n  display: block;\n}\n", "", {"version":3,"sources":["/./src/style.less","/./src/style.less"],"names":[],"mappings":"AA0GA;EA3FE,uBAAA;CCbD;ADcC;;;EACE,aAAA;EACA,sBAAA;CCVH;ADkGD;EApFI,kBAAA;CCXH;ADeG;EACE,aAAA;EACA,kBAAA;CCbL;ADeK;EAAU,cAAA;CCZf;ADaK;EAAgC,yBAAA;CCVrC;ADWK;EAA+B,cAAA;CCRpC;ADkFD;EArEI,aAAA;EACA,iBAAA;EACA,sBAAA;CCVH;AD6ED;EAjE2B,YAAA;CCT1B;AD0ED;EAhE4B,WAAA;CCP3B;ADuED;EA/DyB,eAAA;CCLxB;ADoED;EA9D8B,eAAA;CCH7B;ADiED;EA7D6B,eAAA;CCD5B;AD8DD;EA5DyB,sCAAA;CCCxB;AD2DD;EA1DI,2BAAA;EACA,YAAA;EACA,gBAAA;CCEH;ADsDD;EArD4B,YAAA;CCE3B;ADmDD;EAnDI,eAAA;EACA,gBAAA;EACA,sBAAA;CCGH;AD8CD;EA9CI,gBAAA;CCGH;AD2CD;EA1CI,oBAAA;EACA,kBAAA;EACA,uBAAA;EACA,aAAA;EACA,gBAAA;EACA,sBAAA;CCEH;ADAG;EACE,sBAAA;EACA,oCAAA;EACA,iBAAA;CCEL;AD8BD;EA1BI,WAAA;EACA,kCAAA;EACA,mBAAA;CCDH;ADGC;EACE,aAAA;CCDH;ADKC;EAEI,yBAAA;CCJL;ADEC;EAKI,sBAAA;CCJL;ADDC;EAQI,cAAA;CCJL;ADMG;EACE,eAAA;CCJL;ADeD;EAhGE,uBAAA;CCoFD;ADnFC;;;EACE,aAAA;EACA,sBAAA;CCuFH;ADMD;EAzFI,kBAAA;CCsFH;ADlFG;EACE,aAAA;EACA,kBAAA;CCoFL;ADlFK;EAAU,cAAA;CCqFf;ADpFK;EAAgC,yBAAA;CCuFrC;ADtFK;EAA+B,cAAA;CCyFpC;ADVD;EA1EI,eAAA;EACA,iBAAA;EACA,sBAAA;CCuFH;ADfD;EAtE2B,eAAA;CCwF1B;ADlBD;EArE4B,eAAA;CC0F3B;ADrBD;EApEyB,eAAA;CC4FxB;ADxBD;EAnE8B,eAAA;CC8F7B;AD3BD;EAlE6B,eAAA;CCgG5B;AD9BD;EAjEyB,4CAAA;CCkGxB;ADjCD;EA/DI,2BAAA;EACA,eAAA;EACA,gBAAA;CCmGH;ADtCD;EA1D4B,eAAA;CCmG3B;ADzCD;EAxDI,eAAA;EACA,gBAAA;EACA,sBAAA;CCoGH;AD9CD;EAnDI,gBAAA;CCoGH;ADjDD;EA/CI,oBAAA;EACA,kBAAA;EACA,uBAAA;EACA,aAAA;EACA,gBAAA;EACA,sBAAA;CCmGH;ADjGG;EACE,sBAAA;EACA,oCAAA;EACA,iBAAA;CCmGL;AD9DD;EA/BI,WAAA;EACA,kCAAA;EACA,mBAAA;CCgGH;AD9FC;EACE,aAAA;CCgGH;AD5FC;EAEI,yBAAA;CC6FL;AD/FC;EAKI,sBAAA;CC6FL;ADlGC;EAQI,cAAA;CC6FL;AD3FG;EACE,eAAA;CC6FL","file":"style.less","sourcesContent":[".theme(\n  @default-color: black,\n  @string-color: green,\n  @number-color: blue,\n  @boolean-color: red,\n  @null-color: #855A00,\n  @undefined-color: rgb(202, 11, 105),\n  @function-color: #FF20ED,\n  @rotate-time: 100ms,\n  @toggler-opacity: 0.6,\n  @toggler-color: #45376F,\n  @bracket-color: blue,\n  @key-color: #00008B,\n  @url-color: blue ){\n\n  font-family: monospace;\n  &, a, a:hover {\n    color: @default-color;\n    text-decoration: none;\n  }\n\n  .json-formatter-row {\n    margin-left: 1rem;\n  }\n\n  .json-formatter-children {\n    &.json-formatter-empty {\n      opacity: 0.5;\n      margin-left: 1rem;\n\n      &:after { display: none; }\n      &.json-formatter-object:after { content: \"No properties\"; }\n      &.json-formatter-array:after { content: \"[]\"; }\n    }\n  }\n\n  .json-formatter-string {\n    color: @string-color;\n    white-space: pre;\n    word-wrap: break-word;\n  }\n  .json-formatter-number { color: @number-color; }\n  .json-formatter-boolean { color: @boolean-color; }\n  .json-formatter-null { color: @null-color; }\n  .json-formatter-undefined { color: @undefined-color; }\n  .json-formatter-function { color: @function-color; }\n  .json-formatter-date { background-color: fade(@default-color, 5%); }\n  .json-formatter-url {\n    text-decoration: underline;\n    color: @url-color;\n    cursor: pointer;\n  }\n\n  .json-formatter-bracket { color: @bracket-color; }\n  .json-formatter-key {\n    color: @key-color;\n    cursor: pointer;\n    padding-right: 0.2rem;\n  }\n  .json-formatter-constructor-name {\n    cursor: pointer;\n  }\n\n  .json-formatter-toggler {\n    line-height: 1.2rem;\n    font-size: 0.7rem;\n    vertical-align: middle;\n    opacity: @toggler-opacity;\n    cursor: pointer;\n    padding-right: 0.2rem;\n\n    &:after {\n      display: inline-block;\n      transition: transform @rotate-time ease-in;\n      content: \"►\";\n    }\n  }\n\n  // Inline preview on hover (optional)\n  > a > .json-formatter-preview-text {\n    opacity: 0;\n    transition: opacity .15s ease-in;\n    font-style: italic;\n  }\n  &:hover > a > .json-formatter-preview-text {\n    opacity: 0.6;\n  }\n\n  // Open state\n  &.json-formatter-open {\n    > .json-formatter-toggler-link .json-formatter-toggler:after{\n      transform: rotate(90deg);\n    }\n    > .json-formatter-children:after {\n      display: inline-block;\n    }\n    > a > .json-formatter-preview-text {\n      display: none;\n    }\n    &.json-formatter-empty:after {\n      display: block;\n    }\n  }\n}\n\n// Default theme\n.json-formatter-row {\n  .theme();\n}\n\n// Dark theme\n.json-formatter-dark.json-formatter-row {\n  .theme(\n    @default-color: white,\n    @string-color: #31F031,\n    @number-color: #66C2FF,\n    @boolean-color: #EC4242,\n    @null-color: #EEC97D,\n    @undefined-color: rgb(239, 143, 190),\n    @function-color: #FD48CB,\n    @rotate-time: 100ms,\n    @toggler-opacity: 0.6,\n    @toggler-color: #45376F,\n    @bracket-color: #9494FF,\n    @key-color: #23A0DB,\n    @url-color: #027BFF);\n}\n",".json-formatter-row {\n  font-family: monospace;\n}\n.json-formatter-row,\n.json-formatter-row a,\n.json-formatter-row a:hover {\n  color: black;\n  text-decoration: none;\n}\n.json-formatter-row .json-formatter-row {\n  margin-left: 1rem;\n}\n.json-formatter-row .json-formatter-children.json-formatter-empty {\n  opacity: 0.5;\n  margin-left: 1rem;\n}\n.json-formatter-row .json-formatter-children.json-formatter-empty:after {\n  display: none;\n}\n.json-formatter-row .json-formatter-children.json-formatter-empty.json-formatter-object:after {\n  content: \"No properties\";\n}\n.json-formatter-row .json-formatter-children.json-formatter-empty.json-formatter-array:after {\n  content: \"[]\";\n}\n.json-formatter-row .json-formatter-string {\n  color: green;\n  white-space: pre;\n  word-wrap: break-word;\n}\n.json-formatter-row .json-formatter-number {\n  color: blue;\n}\n.json-formatter-row .json-formatter-boolean {\n  color: red;\n}\n.json-formatter-row .json-formatter-null {\n  color: #855A00;\n}\n.json-formatter-row .json-formatter-undefined {\n  color: #ca0b69;\n}\n.json-formatter-row .json-formatter-function {\n  color: #FF20ED;\n}\n.json-formatter-row .json-formatter-date {\n  background-color: rgba(0, 0, 0, 0.05);\n}\n.json-formatter-row .json-formatter-url {\n  text-decoration: underline;\n  color: blue;\n  cursor: pointer;\n}\n.json-formatter-row .json-formatter-bracket {\n  color: blue;\n}\n.json-formatter-row .json-formatter-key {\n  color: #00008B;\n  cursor: pointer;\n  padding-right: 0.2rem;\n}\n.json-formatter-row .json-formatter-constructor-name {\n  cursor: pointer;\n}\n.json-formatter-row .json-formatter-toggler {\n  line-height: 1.2rem;\n  font-size: 0.7rem;\n  vertical-align: middle;\n  opacity: 0.6;\n  cursor: pointer;\n  padding-right: 0.2rem;\n}\n.json-formatter-row .json-formatter-toggler:after {\n  display: inline-block;\n  transition: transform 100ms ease-in;\n  content: \"►\";\n}\n.json-formatter-row > a > .json-formatter-preview-text {\n  opacity: 0;\n  transition: opacity 0.15s ease-in;\n  font-style: italic;\n}\n.json-formatter-row:hover > a > .json-formatter-preview-text {\n  opacity: 0.6;\n}\n.json-formatter-row.json-formatter-open > .json-formatter-toggler-link .json-formatter-toggler:after {\n  transform: rotate(90deg);\n}\n.json-formatter-row.json-formatter-open > .json-formatter-children:after {\n  display: inline-block;\n}\n.json-formatter-row.json-formatter-open > a > .json-formatter-preview-text {\n  display: none;\n}\n.json-formatter-row.json-formatter-open.json-formatter-empty:after {\n  display: block;\n}\n.json-formatter-dark.json-formatter-row {\n  font-family: monospace;\n}\n.json-formatter-dark.json-formatter-row,\n.json-formatter-dark.json-formatter-row a,\n.json-formatter-dark.json-formatter-row a:hover {\n  color: white;\n  text-decoration: none;\n}\n.json-formatter-dark.json-formatter-row .json-formatter-row {\n  margin-left: 1rem;\n}\n.json-formatter-dark.json-formatter-row .json-formatter-children.json-formatter-empty {\n  opacity: 0.5;\n  margin-left: 1rem;\n}\n.json-formatter-dark.json-formatter-row .json-formatter-children.json-formatter-empty:after {\n  display: none;\n}\n.json-formatter-dark.json-formatter-row .json-formatter-children.json-formatter-empty.json-formatter-object:after {\n  content: \"No properties\";\n}\n.json-formatter-dark.json-formatter-row .json-formatter-children.json-formatter-empty.json-formatter-array:after {\n  content: \"[]\";\n}\n.json-formatter-dark.json-formatter-row .json-formatter-string {\n  color: #31F031;\n  white-space: pre;\n  word-wrap: break-word;\n}\n.json-formatter-dark.json-formatter-row .json-formatter-number {\n  color: #66C2FF;\n}\n.json-formatter-dark.json-formatter-row .json-formatter-boolean {\n  color: #EC4242;\n}\n.json-formatter-dark.json-formatter-row .json-formatter-null {\n  color: #EEC97D;\n}\n.json-formatter-dark.json-formatter-row .json-formatter-undefined {\n  color: #ef8fbe;\n}\n.json-formatter-dark.json-formatter-row .json-formatter-function {\n  color: #FD48CB;\n}\n.json-formatter-dark.json-formatter-row .json-formatter-date {\n  background-color: rgba(255, 255, 255, 0.05);\n}\n.json-formatter-dark.json-formatter-row .json-formatter-url {\n  text-decoration: underline;\n  color: #027BFF;\n  cursor: pointer;\n}\n.json-formatter-dark.json-formatter-row .json-formatter-bracket {\n  color: #9494FF;\n}\n.json-formatter-dark.json-formatter-row .json-formatter-key {\n  color: #23A0DB;\n  cursor: pointer;\n  padding-right: 0.2rem;\n}\n.json-formatter-dark.json-formatter-row .json-formatter-constructor-name {\n  cursor: pointer;\n}\n.json-formatter-dark.json-formatter-row .json-formatter-toggler {\n  line-height: 1.2rem;\n  font-size: 0.7rem;\n  vertical-align: middle;\n  opacity: 0.6;\n  cursor: pointer;\n  padding-right: 0.2rem;\n}\n.json-formatter-dark.json-formatter-row .json-formatter-toggler:after {\n  display: inline-block;\n  transition: transform 100ms ease-in;\n  content: \"►\";\n}\n.json-formatter-dark.json-formatter-row > a > .json-formatter-preview-text {\n  opacity: 0;\n  transition: opacity 0.15s ease-in;\n  font-style: italic;\n}\n.json-formatter-dark.json-formatter-row:hover > a > .json-formatter-preview-text {\n  opacity: 0.6;\n}\n.json-formatter-dark.json-formatter-row.json-formatter-open > .json-formatter-toggler-link .json-formatter-toggler:after {\n  transform: rotate(90deg);\n}\n.json-formatter-dark.json-formatter-row.json-formatter-open > .json-formatter-children:after {\n  display: inline-block;\n}\n.json-formatter-dark.json-formatter-row.json-formatter-open > a > .json-formatter-preview-text {\n  display: none;\n}\n.json-formatter-dark.json-formatter-row.json-formatter-open.json-formatter-empty:after {\n  display: block;\n}\n"],"sourceRoot":"webpack://"}]);

	// exports


/***/ },
/* 4 */
/***/ function(module, exports) {

	/*
		MIT License http://www.opensource.org/licenses/mit-license.php
		Author Tobias Koppers @sokra
	*/
	// css base code, injected by the css-loader
	module.exports = function() {
		var list = [];

		// return the list of modules as css string
		list.toString = function toString() {
			var result = [];
			for(var i = 0; i < this.length; i++) {
				var item = this[i];
				if(item[2]) {
					result.push("@media " + item[2] + "{" + item[1] + "}");
				} else {
					result.push(item[1]);
				}
			}
			return result.join("");
		};

		// import a list of modules into the list
		list.i = function(modules, mediaQuery) {
			if(typeof modules === "string")
				modules = [[null, modules, ""]];
			var alreadyImportedModules = {};
			for(var i = 0; i < this.length; i++) {
				var id = this[i][0];
				if(typeof id === "number")
					alreadyImportedModules[id] = true;
			}
			for(i = 0; i < modules.length; i++) {
				var item = modules[i];
				// skip already imported module
				// this implementation is not 100% perfect for weird media query combinations
				//  when a module is imported multiple times with different media queries.
				//  I hope this will never occur (Hey this way we have smaller bundles)
				if(typeof item[0] !== "number" || !alreadyImportedModules[item[0]]) {
					if(mediaQuery && !item[2]) {
						item[2] = mediaQuery;
					} else if(mediaQuery) {
						item[2] = "(" + item[2] + ") and (" + mediaQuery + ")";
					}
					list.push(item);
				}
			}
		};
		return list;
	};


/***/ },
/* 5 */
/***/ function(module, exports, __webpack_require__) {

	/*
		MIT License http://www.opensource.org/licenses/mit-license.php
		Author Tobias Koppers @sokra
	*/
	var stylesInDom = {},
		memoize = function(fn) {
			var memo;
			return function () {
				if (typeof memo === "undefined") memo = fn.apply(this, arguments);
				return memo;
			};
		},
		isOldIE = memoize(function() {
			return /msie [6-9]\b/.test(window.navigator.userAgent.toLowerCase());
		}),
		getHeadElement = memoize(function () {
			return document.head || document.getElementsByTagName("head")[0];
		}),
		singletonElement = null,
		singletonCounter = 0,
		styleElementsInsertedAtTop = [];

	module.exports = function(list, options) {
		if(false) {
			if(typeof document !== "object") throw new Error("The style-loader cannot be used in a non-browser environment");
		}

		options = options || {};
		// Force single-tag solution on IE6-9, which has a hard limit on the # of <style>
		// tags it will allow on a page
		if (typeof options.singleton === "undefined") options.singleton = isOldIE();

		// By default, add <style> tags to the bottom of <head>.
		if (typeof options.insertAt === "undefined") options.insertAt = "bottom";

		var styles = listToStyles(list);
		addStylesToDom(styles, options);

		return function update(newList) {
			var mayRemove = [];
			for(var i = 0; i < styles.length; i++) {
				var item = styles[i];
				var domStyle = stylesInDom[item.id];
				domStyle.refs--;
				mayRemove.push(domStyle);
			}
			if(newList) {
				var newStyles = listToStyles(newList);
				addStylesToDom(newStyles, options);
			}
			for(var i = 0; i < mayRemove.length; i++) {
				var domStyle = mayRemove[i];
				if(domStyle.refs === 0) {
					for(var j = 0; j < domStyle.parts.length; j++)
						domStyle.parts[j]();
					delete stylesInDom[domStyle.id];
				}
			}
		};
	}

	function addStylesToDom(styles, options) {
		for(var i = 0; i < styles.length; i++) {
			var item = styles[i];
			var domStyle = stylesInDom[item.id];
			if(domStyle) {
				domStyle.refs++;
				for(var j = 0; j < domStyle.parts.length; j++) {
					domStyle.parts[j](item.parts[j]);
				}
				for(; j < item.parts.length; j++) {
					domStyle.parts.push(addStyle(item.parts[j], options));
				}
			} else {
				var parts = [];
				for(var j = 0; j < item.parts.length; j++) {
					parts.push(addStyle(item.parts[j], options));
				}
				stylesInDom[item.id] = {id: item.id, refs: 1, parts: parts};
			}
		}
	}

	function listToStyles(list) {
		var styles = [];
		var newStyles = {};
		for(var i = 0; i < list.length; i++) {
			var item = list[i];
			var id = item[0];
			var css = item[1];
			var media = item[2];
			var sourceMap = item[3];
			var part = {css: css, media: media, sourceMap: sourceMap};
			if(!newStyles[id])
				styles.push(newStyles[id] = {id: id, parts: [part]});
			else
				newStyles[id].parts.push(part);
		}
		return styles;
	}

	function insertStyleElement(options, styleElement) {
		var head = getHeadElement();
		var lastStyleElementInsertedAtTop = styleElementsInsertedAtTop[styleElementsInsertedAtTop.length - 1];
		if (options.insertAt === "top") {
			if(!lastStyleElementInsertedAtTop) {
				head.insertBefore(styleElement, head.firstChild);
			} else if(lastStyleElementInsertedAtTop.nextSibling) {
				head.insertBefore(styleElement, lastStyleElementInsertedAtTop.nextSibling);
			} else {
				head.appendChild(styleElement);
			}
			styleElementsInsertedAtTop.push(styleElement);
		} else if (options.insertAt === "bottom") {
			head.appendChild(styleElement);
		} else {
			throw new Error("Invalid value for parameter 'insertAt'. Must be 'top' or 'bottom'.");
		}
	}

	function removeStyleElement(styleElement) {
		styleElement.parentNode.removeChild(styleElement);
		var idx = styleElementsInsertedAtTop.indexOf(styleElement);
		if(idx >= 0) {
			styleElementsInsertedAtTop.splice(idx, 1);
		}
	}

	function createStyleElement(options) {
		var styleElement = document.createElement("style");
		styleElement.type = "text/css";
		insertStyleElement(options, styleElement);
		return styleElement;
	}

	function createLinkElement(options) {
		var linkElement = document.createElement("link");
		linkElement.rel = "stylesheet";
		insertStyleElement(options, linkElement);
		return linkElement;
	}

	function addStyle(obj, options) {
		var styleElement, update, remove;

		if (options.singleton) {
			var styleIndex = singletonCounter++;
			styleElement = singletonElement || (singletonElement = createStyleElement(options));
			update = applyToSingletonTag.bind(null, styleElement, styleIndex, false);
			remove = applyToSingletonTag.bind(null, styleElement, styleIndex, true);
		} else if(obj.sourceMap &&
			typeof URL === "function" &&
			typeof URL.createObjectURL === "function" &&
			typeof URL.revokeObjectURL === "function" &&
			typeof Blob === "function" &&
			typeof btoa === "function") {
			styleElement = createLinkElement(options);
			update = updateLink.bind(null, styleElement);
			remove = function() {
				removeStyleElement(styleElement);
				if(styleElement.href)
					URL.revokeObjectURL(styleElement.href);
			};
		} else {
			styleElement = createStyleElement(options);
			update = applyToTag.bind(null, styleElement);
			remove = function() {
				removeStyleElement(styleElement);
			};
		}

		update(obj);

		return function updateStyle(newObj) {
			if(newObj) {
				if(newObj.css === obj.css && newObj.media === obj.media && newObj.sourceMap === obj.sourceMap)
					return;
				update(obj = newObj);
			} else {
				remove();
			}
		};
	}

	var replaceText = (function () {
		var textStore = [];

		return function (index, replacement) {
			textStore[index] = replacement;
			return textStore.filter(Boolean).join('\n');
		};
	})();

	function applyToSingletonTag(styleElement, index, remove, obj) {
		var css = remove ? "" : obj.css;

		if (styleElement.styleSheet) {
			styleElement.styleSheet.cssText = replaceText(index, css);
		} else {
			var cssNode = document.createTextNode(css);
			var childNodes = styleElement.childNodes;
			if (childNodes[index]) styleElement.removeChild(childNodes[index]);
			if (childNodes.length) {
				styleElement.insertBefore(cssNode, childNodes[index]);
			} else {
				styleElement.appendChild(cssNode);
			}
		}
	}

	function applyToTag(styleElement, obj) {
		var css = obj.css;
		var media = obj.media;

		if(media) {
			styleElement.setAttribute("media", media)
		}

		if(styleElement.styleSheet) {
			styleElement.styleSheet.cssText = css;
		} else {
			while(styleElement.firstChild) {
				styleElement.removeChild(styleElement.firstChild);
			}
			styleElement.appendChild(document.createTextNode(css));
		}
	}

	function updateLink(linkElement, obj) {
		var css = obj.css;
		var sourceMap = obj.sourceMap;

		if(sourceMap) {
            // https://developer.mozilla.org/en/docs/Web/API/WindowBase64/Base64_encoding_and_decoding
			css += "\n/*# sourceMappingURL=data:application/json;base64," + btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)))) + " */";
		}

		var blob = new Blob([css], { type: "text/css" });

		var oldSrc = linkElement.href;

		linkElement.href = URL.createObjectURL(blob);

		if(oldSrc)
			URL.revokeObjectURL(oldSrc);
	}


/***/ },
/* 6 */
/***/ function(module, exports) {

	"use strict";
	/*
	 * Escapes `"` characters from string
	 */
	function escapeString(str) {
	    return str.replace('"', '\"');
	}
	/*
	 * Determines if a value is an object
	 */
	function isObject(value) {
	    var type = typeof value;
	    return !!value && (type == 'object');
	}
	exports.isObject = isObject;
	/*
	 * Gets constructor name of an object.
	 *
	 */
	function getObjectName(object) {
	    if (object === undefined) {
	        return '';
	    }
	    if (object === null || (typeof object === 'object' && !object.constructor)) {
	        return 'Object';
	    }
	    var funcNameRegex = /function ([^(]*)/;
	    var results = (funcNameRegex).exec((object).constructor.toString());
	    if (results && results.length > 1) {
	        return results[1];
	    } else {
	        return '';
	    }
	}
	exports.getObjectName = getObjectName;
	/*
	 * Gets type of an object. Returns "null" for null objects
	 */
	function getType(object) {
	    if (object === null) {
	        return 'null';
	    }
	    return typeof object;
	}
	exports.getType = getType;
	/*
	 * Generates inline preview for a JavaScript object based on a value
	*/
	function getValuePreview(object, value) {
	    var type = getType(object);
	    if (type === 'null' || type === 'undefined') {
	        return type;
	    }
	    if (type === 'string') {
	        value = '"' + escapeString(value) + '"';
	    }
	    if (type === 'function') {
	        // Remove content of the function
	        return object.toString()
	            .replace(/[\r\n]/g, '')
	            .replace(/\{.*\}/, '') + '{…}';
	    }
	    return value;
	}
	exports.getValuePreview = getValuePreview;
	/*
	 * Generates inline preview for a JavaScript object
	*/
	function getPreview(object) {
	    var value = '';
	    if (isObject(object)) {
	        value = getObjectName(object);
	        if (Array.isArray(object))
	            value += '[' + object.length + ']';
	    }
	    else {
	        value = getValuePreview(object, object);
	    }
	    return value;
	}
	exports.getPreview = getPreview;
	/*
	 * Generates a prefixed CSS class name
	*/
	function cssClass(className) {
	    return "json-formatter-" + className;
	}
	exports.cssClass = cssClass;
	/*
	  * Creates a new DOM element with given type and class
	  * TODO: move me to helpers
	*/
	function createElement(type, className, content) {
	    var el = document.createElement(type);
	    if (className) {
	        el.classList.add(cssClass(className));
	    }
	    if (content !== undefined) {
	        if (content instanceof Node) {
	            el.appendChild(content);
	        }
	        else {
	            el.appendChild(document.createTextNode(String(content)));
	        }
	    }
	    return el;
	}
	exports.createElement = createElement;


/***/ }
/******/ ])
});
;
//# sourceMappingURL=json-formatter.js.map

</script>

<script>

(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.JSONSchemaView = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
'use strict';
/*
 * Converts anyOf, allOf and oneOf to human readable string
*/
Object.defineProperty(exports, '__esModule', {
  value: true
});
exports.convertXOf = convertXOf;
exports._if = _if;

function convertXOf(type) {
  return type.substring(0, 3) + ' of';
}

/*
 * if condition for ES6 template strings
 * to be used only in template string
 *
 * @example mystr = `Random is ${_if(Math.random() > 0.5)`greater than 0.5``
 *
 * @param {boolean} condition
 *
 * @returns {function} the template function
*/

function _if(condition) {
  return condition ? normal : empty;
}

function empty() {
  return '';
}
function normal(template) {
  for (var _len = arguments.length, expressions = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
    expressions[_key - 1] = arguments[_key];
  }

  return template.slice(1).reduce(function (accumulator, part, i) {
    return accumulator + expressions[i] + part;
  }, template[0]);
}

},{}],2:[function(require,module,exports){
'use strict';

/* globals JSONSchemaView */

Object.defineProperty(exports, '__esModule', {
  value: true
});

var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })();

var _templateObject = _taggedTemplateLiteral(['\n        <div class="any">\n          ', '\n\n          <span class="type type-any">&lt;any&gt;</span>\n\n          ', '\n\t\t \n\t\t  ', '\n\t\t  ', '\n\t\t   ', '\n        </div>\n      '], ['\n        <div class="any">\n          ', '\n\n          <span class="type type-any">&lt;any&gt;</span>\n\n          ', '\n\t\t \n\t\t  ', '\n\t\t  ', '\n\t\t   ', '\n        </div>\n      ']),
    _templateObject2 = _taggedTemplateLiteral(['\n            <a class="title"><span class="toggle-handle"></span>', ' </a>\n          '], ['\n            <a class="title"><span class="toggle-handle"></span>', ' </a>\n          ']),
    _templateObject3 = _taggedTemplateLiteral(['\n            <div class="inner description marked">', '</div>\n          '], ['\n            <div class="inner description marked">', '</div>\n          ']),
    _templateObject4 = _taggedTemplateLiteral(['\n            <div class="inner required">Required: ', '</div>\n          '], ['\n            <div class="inner required">Required: ', '</div>\n          ']),
    _templateObject5 = _taggedTemplateLiteral(['\n            <div class="inner default">Default: ', '</div>\n          '], ['\n            <div class="inner default">Default: ', '</div>\n          ']),
    _templateObject6 = _taggedTemplateLiteral(['\n            <div class="inner pattern">Pattern: ', '</div>\n          '], ['\n            <div class="inner pattern">Pattern: ', '</div>\n          ']),
    _templateObject7 = _taggedTemplateLiteral(['\n        <div class="primitive">\n          ', '\n\n            <span class="type">', '</span>\n\n         \n\n          ', '\n\n          ', '\n\n          ', '\n\n          ', '\n\n          ', '\n\n          ', '\n\n          ', '\n\n          ', '\n\t\t  \n\t\t \n\t\t  \n\t\t   ', '\n\t\t  ', '\n\t\t   ', '\n\n          ', '\n\n          ', '\n          ', '\n          ', '\n        </div>\n      '], ['\n        <div class="primitive">\n          ', '\n\n            <span class="type">', '</span>\n\n         \n\n          ', '\n\n          ', '\n\n          ', '\n\n          ', '\n\n          ', '\n\n          ', '\n\n          ', '\n\n          ', '\n\t\t  \n\t\t \n\t\t  \n\t\t   ', '\n\t\t  ', '\n\t\t   ', '\n\n          ', '\n\n          ', '\n          ', '\n          ', '\n        </div>\n      ']),
    _templateObject8 = _taggedTemplateLiteral(['\n            <span class="format">(', ')</span>\n          '], ['\n            <span class="format">(', ')</span>\n          ']),
    _templateObject9 = _taggedTemplateLiteral(['\n            <span class="range minimum">minimum:', '</span>\n          '], ['\n            <span class="range minimum">minimum:', '</span>\n          ']),
    _templateObject10 = _taggedTemplateLiteral(['\n            <span class="range exclusiveMinimum">(ex)minimum:', '</span>\n          '], ['\n            <span class="range exclusiveMinimum">(ex)minimum:', '</span>\n          ']),
    _templateObject11 = _taggedTemplateLiteral(['\n            <span class="range maximum">maximum:', '</span>\n          '], ['\n            <span class="range maximum">maximum:', '</span>\n          ']),
    _templateObject12 = _taggedTemplateLiteral(['\n            <span class="range exclusiveMaximum">(ex)maximum:', '</span>\n          '], ['\n            <span class="range exclusiveMaximum">(ex)maximum:', '</span>\n          ']),
    _templateObject13 = _taggedTemplateLiteral(['\n            <span class="range minLength">minLength:', '</span>\n          '], ['\n            <span class="range minLength">minLength:', '</span>\n          ']),
    _templateObject14 = _taggedTemplateLiteral(['\n            <span class="range maxLength">maxLength:', '</span>\n          '], ['\n            <span class="range maxLength">maxLength:', '</span>\n          ']),
    _templateObject15 = _taggedTemplateLiteral(['\n            <div class="inner required">Required</div>\n          '], ['\n            <div class="inner required">Required</div>\n          ']),
    _templateObject16 = _taggedTemplateLiteral(['\n            ', '\n          '], ['\n            ', '\n          ']),
    _templateObject17 = _taggedTemplateLiteral(['', ''], ['', '']),
    _templateObject18 = _taggedTemplateLiteral(['\n        <div class="array">\n          <a class="title"><span class="toggle-handle"></span>', '<span class="opening bracket">[</span>', '</a>\n          ', '\n          <div class="inner">\n            ', '\n          </div>\n\n          ', '\n\n          ', '\n          ', '\n          ', '\n\n          ', '\n        </div>\n      '], ['\n        <div class="array">\n          <a class="title"><span class="toggle-handle"></span>', '<span class="opening bracket">[</span>', '</a>\n          ', '\n          <div class="inner">\n            ', '\n          </div>\n\n          ', '\n\n          ', '\n          ', '\n          ', '\n\n          ', '\n        </div>\n      ']),
    _templateObject19 = _taggedTemplateLiteral(['<span class="closing bracket">]</span>'], ['<span class="closing bracket">]</span>']),
    _templateObject20 = _taggedTemplateLiteral(['\n          <span>\n            <span title="items range">(', '..', ')</span>\n            ', '\n          </span>\n          '], ['\n          <span>\n            <span title="items range">(', '..', ')</span>\n            ', '\n          </span>\n          ']),
    _templateObject21 = _taggedTemplateLiteral(['<span title="unique" class="uniqueItems">♦</span>'], ['<span title="unique" class="uniqueItems">♦</span>']),
    _templateObject22 = _taggedTemplateLiteral(['\n              <div class="description">', '</div>\n            '], ['\n              <div class="description">', '</div>\n            ']),
    _templateObject23 = _taggedTemplateLiteral(['\n          <span class="closing bracket">]</span>\n          '], ['\n          <span class="closing bracket">]</span>\n          ']),
    _templateObject24 = _taggedTemplateLiteral(['\n        <div class="object">\n          <a class="title"><span\n            class="toggle-handle"></span>', ' <span\n            class="opening brace">{</span>', '</a>\n\n          <div class="inner">\n            ', '\n            <!-- children go here -->\n\t\t  \n\t\t   ', '\n\t\t  ', '\n\t\t  \n\t\t\t', '\n          </div>\n\n          ', '\n\n          ', '\n          ', '\n          ', '\n\n          ', '\n        </div>\n      '], ['\n        <div class="object">\n          <a class="title"><span\n            class="toggle-handle"></span>', ' <span\n            class="opening brace">{</span>', '</a>\n\n          <div class="inner">\n            ', '\n            <!-- children go here -->\n\t\t  \n\t\t   ', '\n\t\t  ', '\n\t\t  \n\t\t\t', '\n          </div>\n\n          ', '\n\n          ', '\n          ', '\n          ', '\n\n          ', '\n        </div>\n      ']),
    _templateObject25 = _taggedTemplateLiteral(['\n              <span class="closing brace" ng-if="isCollapsed">}</span>\n          '], ['\n              <span class="closing brace" ng-if="isCollapsed">}</span>\n          ']),
    _templateObject26 = _taggedTemplateLiteral(['\n            <div class="required">Required: ', '</div>\n          '], ['\n            <div class="required">Required: ', '</div>\n          ']),
   _templateObject266 = _taggedTemplateLiteral(['\n            <div class="required">Required: ', '</div>\n          '], ['\n            <div class="required">Required: ', '</div>\n          ']),
    _templateObject27 = _taggedTemplateLiteral(['\n            <div class="default">Default: ', '</div>\n          '], ['\n            <div class="default">Default: ', '</div>\n          ']),
    _templateObject28 = _taggedTemplateLiteral(['\n              <div class="pattern">Pattern: ', '</div>\n            '], ['\n              <div class="pattern">Pattern: ', '</div>\n            ']),
    _templateObject29 = _taggedTemplateLiteral(['\n          <span class="closing brace">}</span>\n          '], ['\n          <span class="closing brace">}</span>\n          ']),
    _templateObject30 = _taggedTemplateLiteral(['\n        <div class="inner enums">\n          <b>Enum:</b>\n        </div>\n      '], ['\n        <div class="inner enums">\n          <b>Enum:</b>\n        </div>\n      ']);

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }

function _taggedTemplateLiteral(strings, raw) { return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }

var _helpersJs = require('./helpers.js');

/**
 * @class JSONSchemaView
 *
 * A pure JavaScript component for rendering JSON Schema in HTML.
*/

var JSONSchemaView = (function () {

  /**
   * @param {object} schema The JSON Schema object
   *
   * @param {number} [open=1] his number indicates up to how many levels the
   * rendered tree should expand. Set it to `0` to make the whole tree collapsed
   * or set it to `Infinity` to expand the tree deeply
   * @param {object} options.
   *  theme {string}: one of the following options: ['dark']
  */

  function JSONSchemaView(schema, open) {
    var _this = this;

    var options = arguments.length <= 2 || arguments[2] === undefined ? { theme: null } : arguments[2];

    _classCallCheck(this, JSONSchemaView);

    this.schema = schema; //console.log(schema);
    this.open = open;
    this.options = options;
    this.isCollapsed = open <= 0;

    // if schema is an empty object which means any JOSN
    this.isAny = typeof schema === 'object' && !Array.isArray(schema) && !Object.keys(schema).filter(function (k) {
      return ['title', 'description'].indexOf(k) === -1;
    }).length;

    // Determine if a schema is an array
    this.isArray = !this.isAny && this.schema && this.schema.type === 'array';

    this.isObject = this.schema && (this.schema.type === 'object' || this.schema.properties || this.schema.anyOf || this.schema.oneof || this.schema.allOf);

    // Determine if a schema is a primitive
    this.isPrimitive = !this.isAny && !this.isArray && !this.isObject;

    //
    this.showToggle = this.schema.description || this.schema.title || this.isPrimitive && (this.schema.minimum || this.schema.maximum || this.schema.exclusiveMinimum || this.schema.exclusiveMaximum);

    // populate isRequired property down to properties
    if (this.schema && Array.isArray(this.schema.required)) {
      this.schema.required.forEach(function (requiredProperty) {
        if (typeof _this.schema.properties[requiredProperty] === 'object') {
          _this.schema.properties[requiredProperty].isRequired = true;
        }
      });
    }
  }

  /*
   * Returns the template with populated properties.
   * This template does not have the children
  */

  _createClass(JSONSchemaView, [{
    key: 'template',
    value: function template() {
      if (!this.schema) {
        return '';
      }

      return ('\n      <!-- Any -->\n      ' + (0, _helpersJs._if)(this.isAny)(_templateObject, (0, _helpersJs._if)(this.showToggle)(_templateObject2, this.schema.title || ''), (0, _helpersJs._if)(this.schema.description && !this.isCollapsed)(_templateObject3, marked(this.schema.description || "")), (0, _helpersJs._if)(this.schema.required && !this.isCollapsed)(_templateObject4, this.schema.required), (0, _helpersJs._if)(this.schema['default'] && !this.isCollapsed)(_templateObject5, this.schema['default']), (0, _helpersJs._if)(this.schema.pattern && !this.isCollapsed)(_templateObject6, this.schema.pattern)) + '\n\n      <!-- Primitive -->\n      ' + (0, _helpersJs._if)(this.isPrimitive)(_templateObject7, (0, _helpersJs._if)(this.showToggle)(_templateObject2, this.schema.title || ''), this.schema.type, (0, _helpersJs._if)(!this.isCollapsed && this.schema.format)(_templateObject8, this.schema.format), (0, _helpersJs._if)(!this.isCollapsed && this.schema.minimum)(_templateObject9, this.schema.minimum), (0, _helpersJs._if)(!this.isCollapsed && this.schema.exclusiveMinimum)(_templateObject10, this.schema.exclusiveMinimum), (0, _helpersJs._if)(!this.isCollapsed && this.schema.maximum)(_templateObject11, this.schema.maximum), (0, _helpersJs._if)(!this.isCollapsed && this.schema.exclusiveMaximum)(_templateObject12, this.schema.exclusiveMaximum), (0, _helpersJs._if)(!this.isCollapsed && this.schema.minLength)(_templateObject13, this.schema.minLength), (0, _helpersJs._if)(!this.isCollapsed && this.schema.maxLength)(_templateObject14, this.schema.maxLength), (0, _helpersJs._if)(this.schema.description && !this.isCollapsed)(_templateObject3, marked(this.schema.description || "")), (0, _helpersJs._if)(this.schema.required && !this.isCollapsed)(_templateObject15), (0, _helpersJs._if)(this.schema['default'] && !this.isCollapsed)(_templateObject5, this.schema['default']), (0, _helpersJs._if)(this.schema.pattern && !this.isCollapsed)(_templateObject6, this.schema.pattern), (0, _helpersJs._if)(!this.isCollapsed && this.schema['enum'])(_templateObject16, this['enum'](this.schema, this.isCollapsed, this.open)), (0, _helpersJs._if)(this.schema.allOf && !this.isCollapsed)(_templateObject17, this.xOf(this.schema, 'allOf')), (0, _helpersJs._if)(this.schema.oneOf && !this.isCollapsed)(_templateObject17, this.xOf(this.schema, 'oneOf')), (0, _helpersJs._if)(this.schema.anyOf && !this.isCollapsed)(_templateObject17, this.xOf(this.schema, 'anyOf'))) + '\n\n\n      <!-- Array -->\n      ' + (0, _helpersJs._if)(this.isArray)(_templateObject18, this.schema.title || '', (0, _helpersJs._if)(this.isCollapsed)(_templateObject19), (0, _helpersJs._if)(!this.isCollapsed && (this.schema.uniqueItems || this.schema.minItems || this.schema.maxItems))(_templateObject20, this.schema.minItems || 0, this.schema.maxItems || '∞', (0, _helpersJs._if)(!this.isCollapsed && this.schema.uniqueItems)(_templateObject21)), (0, _helpersJs._if)(!this.isCollapsed && this.schema.description)(_templateObject22, marked(this.schema.description || "")), (0, _helpersJs._if)(!this.isCollapsed && this.schema['enum'])(_templateObject16, this['enum'](this.schema, this.isCollapsed, this.open)), (0, _helpersJs._if)(this.schema.allOf && !this.isCollapsed)(_templateObject17, this.xOf(this.schema, 'allOf')), (0, _helpersJs._if)(this.schema.oneOf && !this.isCollapsed)(_templateObject17, this.xOf(this.schema, 'oneOf')), (0, _helpersJs._if)(this.schema.anyOf && !this.isCollapsed)(_templateObject17, this.xOf(this.schema, 'anyOf')), (0, _helpersJs._if)(!this.isCollapsed)(_templateObject23)) + '\n\n      <!-- Object -->\n      ' + (0, _helpersJs._if)(!this.isPrimitive && !this.isArray && !this.isAny)(_templateObject24, this.schema.title || '', (0, _helpersJs._if)(this.isCollapsed)(_templateObject25), (0, _helpersJs._if)(!this.isCollapsed && this.schema.description)(_templateObject22, marked(this.schema.description || "")),

        (0, _helpersJs._if)(this.schema.required && !this.isCollapsed && this.options.isBodyParam != true)(_templateObject26, this.schema.required),
        (0, _helpersJs._if)(this.schema.required && !this.isCollapsed && this.options.isBodyParam == true)(_templateObject266, this.schema.required),

        (0, _helpersJs._if)(this.schema['default'] && !this.isCollapsed)(_templateObject27, this.schema['default']),(0, _helpersJs._if)(!this.isCollapsed)(_templateObject29),
        (0, _helpersJs._if)(!this.isCollapsed && this.schema.pattern)(_templateObject28, this.schema.pattern),
        (0, _helpersJs._if)(!this.isCollapsed && this.schema['enum'])(_templateObject16, this['enum'](this.schema, this.isCollapsed, this.open)), (0, _helpersJs._if)(this.schema.allOf && !this.isCollapsed)(_templateObject17, this.xOf(this.schema, 'allOf')), (0, _helpersJs._if)(this.schema.oneOf && !this.isCollapsed)(_templateObject17, this.xOf(this.schema, 'oneOf')), (0, _helpersJs._if)(this.schema.anyOf && !this.isCollapsed)(_templateObject17, this.xOf(this.schema, 'anyOf'))) + '\n').replace(/\s*\n/g, '\n').replace(/(\<\!\-\-).+/g, '').trim();
    }

    /*
     * Template for oneOf, anyOf and allOf
    */
  }, {
    key: 'xOf',
    value: function xOf(schema, type) {
      return '\n      <div class="inner ' + type + '">\n        <b>' + (0, _helpersJs.convertXOf)(type) + ':</b>\n      </div>\n    ';
    }

    /*
     * Template for enums
    */
  }, {
    key: 'enum',
    value: function _enum(schema, isCollapsed, open) {
      return '\n      ' + (0, _helpersJs._if)(!isCollapsed && schema['enum'])(_templateObject30) + '\n    ';
    }

    /*
     * Toggles the 'collapsed' state
    */
  }, {
    key: 'toggle',
    value: function toggle() {
      this.isCollapsed = !this.isCollapsed;
      this.render();
    }

    /*
     * Renders the element and returns it
    */
  }, {
    key: 'render',
    value: function render() {
      if (!this.element) {
        this.element = document.createElement('div');
        this.element.classList.add('json-schema-view');
      }

      if (this.isCollapsed) {
        this.element.classList.add('collapsed');
      } else {
        this.element.classList.remove('collapsed');
      }

      if (this.options.theme) {
        this.element.classList.add('json-schema-view-' + this.options.theme);
      }

      this.element.innerHTML = this.template();

      if (!this.schema) {
        return this.element;
      }

        if (this.schema && this.schema.example) {
            var exampleDiv = document.createElement('div');
            exampleDiv.innerHTML = '<div style="display: block" class="example">\n          <span style="color: #808080" class="name">example: ' + this.schema.example + '</span>\n        </div>';
            this.element.appendChild(exampleDiv.querySelector('.example'));
        }

      if (!this.isCollapsed) {
        this.appendChildren(this.element);
      }

      // add event listener for toggling
      if (this.element.querySelector('a.title')) {
        this.element.querySelector('a.title').addEventListener('click', this.toggle.bind(this));
      }
      return this.element;
    }

    /*
     * Appends children to given element based on current schema
    */
  }, {
    key: 'appendChildren',
    value: function appendChildren(element) {
      var _this2 = this;

      var inner = element.querySelector('.inner');

      if (!inner) {
        return;
      }

      if (this.schema['enum']) {
        var tempDiv = document.createElement('span');;
        tempDiv.classList.add('inner');
        tempDiv.innerHTML = '<code>' + this.schema['enum'].join('</code>, <code>') + '</code>';
        element.querySelector('.enums.inner').appendChild(tempDiv);
      }

      if (this.isArray) {
        var view = new JSONSchemaView(this.schema.items, Infinity);
        inner.appendChild(view.render());
      }

      if (typeof this.schema.properties === 'object') {
        Object.keys(this.schema.properties).forEach(function (propertyName) {
          var property = _this2.schema.properties[propertyName];
          var tempDiv = document.createElement('div');;
          tempDiv.innerHTML = '<div class="property">\n          <span class="name">' + propertyName + ':</span>\n        </div>';
          var view = new JSONSchemaView(property, _this2.open - 1);
          tempDiv.querySelector('.property').appendChild(view.render());

          inner.appendChild(tempDiv.querySelector('.property'));
        });
      }

      if (this.schema.allOf) {
        appendXOf.call(this, 'allOf');
      }
      if (this.schema.oneOf) {
        appendXOf.call(this, 'oneOf');
      }
      if (this.schema.anyOf) {
        appendXOf.call(this, 'anyOf');
      }

      function appendXOf(type) {
        var _this3 = this;

        var innerAllOf = element.querySelector('.inner.' + type);

        this.schema[type].forEach(function (schema) {
          var inner = document.createElement('div');
          inner.classList.add('inner');
          var view = new JSONSchemaView(schema, _this3.open - 1);
          inner.appendChild(view.render());
          innerAllOf.appendChild(inner);
        });
      }
    }
  }]);

  return JSONSchemaView;
})();

exports['default'] = JSONSchemaView;
module.exports = exports['default'];

},{"./helpers.js":1}]},{},[2])(2)
});
//# sourceMappingURL=data:application/json;charset:utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm5vZGVfbW9kdWxlcy9icm93c2VyaWZ5L25vZGVfbW9kdWxlcy9icm93c2VyLXBhY2svX3ByZWx1ZGUuanMiLCJDOi9Vc2Vycy9qYW1lc2hpL0Rlc2t0b3AvanNvbi1zY2hlbWEtdmlldy1qcy1tYXN0ZXIvc3JjL2hlbHBlcnMuanMiLCJDOi9Vc2Vycy9qYW1lc2hpL0Rlc2t0b3AvanNvbi1zY2hlbWEtdmlldy1qcy1tYXN0ZXIvc3JjL2luZGV4LmpzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBO0FDQUEsWUFBWSxDQUFDOzs7Ozs7Ozs7O0FBSU4sU0FBUyxVQUFVLENBQUMsSUFBSSxFQUFFO0FBQy9CLFNBQU8sSUFBSSxDQUFDLFNBQVMsQ0FBQyxDQUFDLEVBQUUsQ0FBQyxDQUFDLEdBQUcsS0FBSyxDQUFDO0NBQ3JDOzs7Ozs7Ozs7Ozs7O0FBWU0sU0FBUyxHQUFHLENBQUMsU0FBUyxFQUFFO0FBQzdCLFNBQU8sU0FBUyxHQUFHLE1BQU0sR0FBRyxLQUFLLENBQUM7Q0FDbkM7O0FBQ0QsU0FBUyxLQUFLLEdBQUU7QUFDZCxTQUFPLEVBQUUsQ0FBQztDQUNYO0FBQ0QsU0FBUyxNQUFNLENBQUUsUUFBUSxFQUFrQjtvQ0FBYixXQUFXO0FBQVgsZUFBVzs7O0FBQ3ZDLFNBQU8sUUFBUSxDQUFDLEtBQUssQ0FBQyxDQUFDLENBQUMsQ0FBQyxNQUFNLENBQUMsVUFBQyxXQUFXLEVBQUUsSUFBSSxFQUFFLENBQUMsRUFBSztBQUN4RCxXQUFPLFdBQVcsR0FBRyxXQUFXLENBQUMsQ0FBQyxDQUFDLEdBQUcsSUFBSSxDQUFDO0dBQzVDLEVBQUUsUUFBUSxDQUFDLENBQUMsQ0FBQyxDQUFDLENBQUM7Q0FDakI7OztBQzVCRCxZQUFZLENBQUM7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozt5QkFPTixjQUFjOzs7Ozs7OztJQVFBLGNBQWM7Ozs7Ozs7Ozs7OztBQVd0QixXQVhRLGNBQWMsQ0FXckIsTUFBTSxFQUFFLElBQUksRUFBMkI7OztRQUF6QixPQUFPLHlEQUFHLEVBQUMsS0FBSyxFQUFFLElBQUksRUFBQzs7MEJBWDlCLGNBQWM7O0FBWS9CLFFBQUksQ0FBQyxNQUFNLEdBQUcsTUFBTSxDQUFDO0FBQ3JCLFFBQUksQ0FBQyxJQUFJLEdBQUcsSUFBSSxDQUFDO0FBQ2pCLFFBQUksQ0FBQyxPQUFPLEdBQUcsT0FBTyxDQUFDO0FBQ3ZCLFFBQUksQ0FBQyxXQUFXLEdBQUcsSUFBSSxJQUFJLENBQUMsQ0FBQzs7O0FBRzdCLFFBQUksQ0FBQyxLQUFLLEdBQUcsT0FBTyxNQUFNLEtBQUssUUFBUSxJQUNyQyxDQUFDLEtBQUssQ0FBQyxPQUFPLENBQUMsTUFBTSxDQUFDLElBQ3RCLENBQUMsTUFBTSxDQUFDLElBQUksQ0FBQyxNQUFNLENBQUMsQ0FDbkIsTUFBTSxDQUFDLFVBQUEsQ0FBQzthQUFHLENBQUMsT0FBTyxFQUFFLGFBQWEsQ0FBQyxDQUFDLE9BQU8sQ0FBQyxDQUFDLENBQUMsS0FBSyxDQUFDLENBQUM7S0FBQSxDQUFDLENBQUMsTUFBTSxDQUFDOzs7QUFHakUsUUFBSSxDQUFDLE9BQU8sR0FBRyxDQUFDLElBQUksQ0FBQyxLQUFLLElBQUksSUFBSSxDQUFDLE1BQU0sSUFBSSxJQUFJLENBQUMsTUFBTSxDQUFDLElBQUksS0FBSyxPQUFPLENBQUM7O0FBRTFFLFFBQUksQ0FBQyxRQUFRLEdBQUcsSUFBSSxDQUFDLE1BQU0sS0FDeEIsSUFBSSxDQUFDLE1BQU0sQ0FBQyxJQUFJLEtBQUssUUFBUSxJQUM3QixJQUFJLENBQUMsTUFBTSxDQUFDLFVBQVUsSUFDdEIsSUFBSSxDQUFDLE1BQU0sQ0FBQyxLQUFLLElBQ2pCLElBQUksQ0FBQyxNQUFNLENBQUMsS0FBSyxJQUNqQixJQUFJLENBQUMsTUFBTSxDQUFDLEtBQUssQ0FBQSxBQUFDLENBQUM7OztBQUd0QixRQUFJLENBQUMsV0FBVyxHQUFHLENBQUMsSUFBSSxDQUFDLEtBQUssSUFBSSxDQUFDLElBQUksQ0FBQyxPQUFPLElBQUksQ0FBQyxJQUFJLENBQUMsUUFBUSxDQUFDOzs7QUFHbEUsUUFBSSxDQUFDLFVBQVUsR0FBRyxJQUFJLENBQUMsTUFBTSxDQUFDLFdBQVcsSUFDdkMsSUFBSSxDQUFDLE1BQU0sQ0FBQyxLQUFLLElBQ2hCLElBQUksQ0FBQyxXQUFXLEtBQ2YsSUFBSSxDQUFDLE1BQU0sQ0FBQyxPQUFPLElBQ25CLElBQUksQ0FBQyxNQUFNLENBQUMsT0FBTyxJQUNuQixJQUFJLENBQUMsTUFBTSxDQUFDLGdCQUFnQixJQUM1QixJQUFJLENBQUMsTUFBTSxDQUFDLGdCQUFnQixDQUFBLEFBQUMsQUFDOUIsQ0FBQzs7O0FBR0osUUFBSSxJQUFJLENBQUMsTUFBTSxJQUFJLEtBQUssQ0FBQyxPQUFPLENBQUMsSUFBSSxDQUFDLE1BQU0sQ0FBQyxRQUFRLENBQUMsRUFBRTtBQUN0RCxVQUFJLENBQUMsTUFBTSxDQUFDLFFBQVEsQ0FBQyxPQUFPLENBQUMsVUFBQSxnQkFBZ0IsRUFBSTtBQUMvQyxZQUFJLE9BQU8sTUFBSyxNQUFNLENBQUMsVUFBVSxDQUFDLGdCQUFnQixDQUFDLEtBQUssUUFBUSxFQUFFO0FBQ2hFLGdCQUFLLE1BQU0sQ0FBQyxVQUFVLENBQUMsZ0JBQWdCLENBQUMsQ0FBQyxVQUFVLEdBQUcsSUFBSSxDQUFDO1NBQzVEO09BQ0YsQ0FBQyxDQUFDO0tBQ0o7R0FDRjs7Ozs7OztlQXREa0IsY0FBYzs7V0E0RHpCLG9CQUFHO0FBQ1QsVUFBSSxDQUFDLElBQUksQ0FBQyxNQUFNLEVBQUU7QUFDaEIsZUFBTyxFQUFFLENBQUM7T0FDWDs7QUFFRCxhQUFPLGtDQUVILG9CQUFJLElBQUksQ0FBQyxLQUFLLENBQUMsa0JBRVgsb0JBQUksSUFBSSxDQUFDLFVBQVUsQ0FBQyxtQkFDa0MsSUFBSSxDQUFDLE1BQU0sQ0FBQyxLQUFLLElBQUksRUFBRSxHQUs3RSxvQkFBSSxJQUFJLENBQUMsTUFBTSxDQUFDLFdBQVcsSUFBSSxDQUFDLElBQUksQ0FBQyxXQUFXLENBQUMsbUJBQ2hCLElBQUksQ0FBQyxNQUFNLENBQUMsV0FBVyxHQUc5RCxvQkFBSSxJQUFJLENBQUMsTUFBTSxDQUFDLFFBQVEsSUFBSSxDQUFDLElBQUksQ0FBQyxXQUFXLENBQUMsbUJBQ0EsSUFBSSxDQUFDLE1BQU0sQ0FBQyxRQUFRLEdBRWxFLG9CQUFJLElBQUksQ0FBQyxNQUFNLFdBQVEsSUFBSSxDQUFDLElBQUksQ0FBQyxXQUFXLENBQUMsbUJBQ0QsSUFBSSxDQUFDLE1BQU0sV0FBUSxHQUU5RCxvQkFBSSxJQUFJLENBQUMsTUFBTSxDQUFDLE9BQU8sSUFBSSxDQUFDLElBQUksQ0FBQyxXQUFXLENBQUMsbUJBQ0YsSUFBSSxDQUFDLE1BQU0sQ0FBQyxPQUFPLDhDQU03RCxvQkFBSSxJQUFJLENBQUMsV0FBVyxDQUFDLG1CQUVqQixvQkFBSSxJQUFJLENBQUMsVUFBVSxDQUFDLG1CQUNrQyxJQUFJLENBQUMsTUFBTSxDQUFDLEtBQUssSUFBSSxFQUFFLEdBR3hELElBQUksQ0FBQyxNQUFNLENBQUMsSUFBSSxFQUlyQyxvQkFBSSxDQUFDLElBQUksQ0FBQyxXQUFXLElBQUksSUFBSSxDQUFDLE1BQU0sQ0FBQyxNQUFNLENBQUMsbUJBQ3BCLElBQUksQ0FBQyxNQUFNLENBQUMsTUFBTSxHQUcxQyxvQkFBSSxDQUFDLElBQUksQ0FBQyxXQUFXLElBQUksSUFBSSxDQUFDLE1BQU0sQ0FBQyxPQUFPLENBQUMsbUJBQ1AsSUFBSSxDQUFDLE1BQU0sQ0FBQyxPQUFPLEdBR3pELG9CQUFJLENBQUMsSUFBSSxDQUFDLFdBQVcsSUFBSSxJQUFJLENBQUMsTUFBTSxDQUFDLGdCQUFnQixDQUFDLG9CQUNILElBQUksQ0FBQyxNQUFNLENBQUMsZ0JBQWdCLEdBRy9FLG9CQUFJLENBQUMsSUFBSSxDQUFDLFdBQVcsSUFBSSxJQUFJLENBQUMsTUFBTSxDQUFDLE9BQU8sQ0FBQyxvQkFDUCxJQUFJLENBQUMsTUFBTSxDQUFDLE9BQU8sR0FHekQsb0JBQUksQ0FBQyxJQUFJLENBQUMsV0FBVyxJQUFJLElBQUksQ0FBQyxNQUFNLENBQUMsZ0JBQWdCLENBQUMsb0JBQ0gsSUFBSSxDQUFDLE1BQU0sQ0FBQyxnQkFBZ0IsR0FHL0Usb0JBQUksQ0FBQyxJQUFJLENBQUMsV0FBVyxJQUFJLElBQUksQ0FBQyxNQUFNLENBQUMsU0FBUyxDQUFDLG9CQUNMLElBQUksQ0FBQyxNQUFNLENBQUMsU0FBUyxHQUcvRCxvQkFBSSxDQUFDLElBQUksQ0FBQyxXQUFXLElBQUksSUFBSSxDQUFDLE1BQU0sQ0FBQyxTQUFTLENBQUMsb0JBQ0wsSUFBSSxDQUFDLE1BQU0sQ0FBQyxTQUFTLEdBRy9ELG9CQUFJLElBQUksQ0FBQyxNQUFNLENBQUMsV0FBVyxJQUFJLENBQUMsSUFBSSxDQUFDLFdBQVcsQ0FBQyxtQkFDaEIsSUFBSSxDQUFDLE1BQU0sQ0FBQyxXQUFXLEdBSzdELG9CQUFJLElBQUksQ0FBQyxNQUFNLENBQUMsUUFBUSxJQUFJLENBQUMsSUFBSSxDQUFDLFdBQVcsQ0FBQyxxQkFHL0Msb0JBQUksSUFBSSxDQUFDLE1BQU0sV0FBUSxJQUFJLENBQUMsSUFBSSxDQUFDLFdBQVcsQ0FBQyxtQkFDRCxJQUFJLENBQUMsTUFBTSxXQUFRLEdBRTlELG9CQUFJLElBQUksQ0FBQyxNQUFNLENBQUMsT0FBTyxJQUFJLENBQUMsSUFBSSxDQUFDLFdBQVcsQ0FBQyxtQkFDRixJQUFJLENBQUMsTUFBTSxDQUFDLE9BQU8sR0FHekQsb0JBQUksQ0FBQyxJQUFJLENBQUMsV0FBVyxJQUFJLElBQUksQ0FBQyxNQUFNLFFBQUssQ0FBQyxvQkFDeEMsSUFBSSxRQUFLLENBQUMsSUFBSSxDQUFDLE1BQU0sRUFBRSxJQUFJLENBQUMsV0FBVyxFQUFFLElBQUksQ0FBQyxJQUFJLENBQUMsR0FHckQsb0JBQUksSUFBSSxDQUFDLE1BQU0sQ0FBQyxLQUFLLElBQUksQ0FBQyxJQUFJLENBQUMsV0FBVyxDQUFDLG9CQUFHLElBQUksQ0FBQyxHQUFHLENBQUMsSUFBSSxDQUFDLE1BQU0sRUFBRSxPQUFPLENBQUMsR0FDNUUsb0JBQUksSUFBSSxDQUFDLE1BQU0sQ0FBQyxLQUFLLElBQUksQ0FBQyxJQUFJLENBQUMsV0FBVyxDQUFDLG9CQUFHLElBQUksQ0FBQyxHQUFHLENBQUMsSUFBSSxDQUFDLE1BQU0sRUFBRSxPQUFPLENBQUMsR0FDNUUsb0JBQUksSUFBSSxDQUFDLE1BQU0sQ0FBQyxLQUFLLElBQUksQ0FBQyxJQUFJLENBQUMsV0FBVyxDQUFDLG9CQUFHLElBQUksQ0FBQyxHQUFHLENBQUMsSUFBSSxDQUFDLE1BQU0sRUFBRSxPQUFPLENBQUMsNENBTWhGLG9CQUFJLElBQUksQ0FBQyxPQUFPLENBQUMsb0JBRXVDLElBQUksQ0FBQyxNQUFNLENBQUMsS0FBSyxJQUFJLEVBQUUsRUFBeUMsb0JBQUksSUFBSSxDQUFDLFdBQVcsQ0FBQyxxQkFDekksb0JBQUksQ0FBQyxJQUFJLENBQUMsV0FBVyxLQUFLLElBQUksQ0FBQyxNQUFNLENBQUMsV0FBVyxJQUFJLElBQUksQ0FBQyxNQUFNLENBQUMsUUFBUSxJQUFJLElBQUksQ0FBQyxNQUFNLENBQUMsUUFBUSxDQUFBLEFBQUMsQ0FBQyxvQkFFdEUsSUFBSSxDQUFDLE1BQU0sQ0FBQyxRQUFRLElBQUksQ0FBQyxFQUFLLElBQUksQ0FBQyxNQUFNLENBQUMsUUFBUSxJQUFJLEdBQUcsRUFDcEYsb0JBQUksQ0FBQyxJQUFJLENBQUMsV0FBVyxJQUFJLElBQUksQ0FBQyxNQUFNLENBQUMsV0FBVyxDQUFDLHNCQUlqRCxvQkFBSSxDQUFDLElBQUksQ0FBQyxXQUFXLElBQUksSUFBSSxDQUFDLE1BQU0sQ0FBQyxXQUFXLENBQUMsb0JBQ3RCLElBQUksQ0FBQyxNQUFNLENBQUMsV0FBVyxHQUlwRCxvQkFBSSxDQUFDLElBQUksQ0FBQyxXQUFXLElBQUksSUFBSSxDQUFDLE1BQU0sUUFBSyxDQUFDLG9CQUN4QyxJQUFJLFFBQUssQ0FBQyxJQUFJLENBQUMsTUFBTSxFQUFFLElBQUksQ0FBQyxXQUFXLEVBQUUsSUFBSSxDQUFDLElBQUksQ0FBQyxHQUdyRCxvQkFBSSxJQUFJLENBQUMsTUFBTSxDQUFDLEtBQUssSUFBSSxDQUFDLElBQUksQ0FBQyxXQUFXLENBQUMsb0JBQUcsSUFBSSxDQUFDLEdBQUcsQ0FBQyxJQUFJLENBQUMsTUFBTSxFQUFFLE9BQU8sQ0FBQyxHQUM1RSxvQkFBSSxJQUFJLENBQUMsTUFBTSxDQUFDLEtBQUssSUFBSSxDQUFDLElBQUksQ0FBQyxXQUFXLENBQUMsb0JBQUcsSUFBSSxDQUFDLEdBQUcsQ0FBQyxJQUFJLENBQUMsTUFBTSxFQUFFLE9BQU8sQ0FBQyxHQUM1RSxvQkFBSSxJQUFJLENBQUMsTUFBTSxDQUFDLEtBQUssSUFBSSxDQUFDLElBQUksQ0FBQyxXQUFXLENBQUMsb0JBQUcsSUFBSSxDQUFDLEdBQUcsQ0FBQyxJQUFJLENBQUMsTUFBTSxFQUFFLE9BQU8sQ0FBQyxHQUU1RSxvQkFBSSxDQUFDLElBQUksQ0FBQyxXQUFXLENBQUMsNkRBTzFCLG9CQUFJLENBQUMsSUFBSSxDQUFDLFdBQVcsSUFBSSxDQUFDLElBQUksQ0FBQyxPQUFPLElBQUksQ0FBQyxJQUFJLENBQUMsS0FBSyxDQUFDLG9CQUduQixJQUFJLENBQUMsTUFBTSxDQUFDLEtBQUssSUFBSSxFQUFFLEVBQ3RCLG9CQUFJLElBQUksQ0FBQyxXQUFXLENBQUMscUJBS25ELG9CQUFJLENBQUMsSUFBSSxDQUFDLFdBQVcsSUFBSSxJQUFJLENBQUMsTUFBTSxDQUFDLFdBQVcsQ0FBQyxvQkFDdEIsSUFBSSxDQUFDLE1BQU0sQ0FBQyxXQUFXLEdBSXpELG9CQUFJLElBQUksQ0FBQyxNQUFNLENBQUMsUUFBUSxJQUFJLENBQUMsSUFBSSxDQUFDLFdBQVcsQ0FBQyxvQkFDRCxJQUFJLENBQUMsTUFBTSxDQUFDLFFBQVEsR0FFbEUsb0JBQUksSUFBSSxDQUFDLE1BQU0sV0FBUSxJQUFJLENBQUMsSUFBSSxDQUFDLFdBQVcsQ0FBQyxvQkFDUCxJQUFJLENBQUMsTUFBTSxXQUFRLEdBRzFELG9CQUFJLENBQUMsSUFBSSxDQUFDLFdBQVcsSUFBSSxJQUFJLENBQUMsTUFBTSxDQUFDLE9BQU8sQ0FBQyxvQkFDSixJQUFJLENBQUMsTUFBTSxDQUFDLE9BQU8sR0FJckQsb0JBQUksQ0FBQyxJQUFJLENBQUMsV0FBVyxJQUFJLElBQUksQ0FBQyxNQUFNLFFBQUssQ0FBQyxvQkFDeEMsSUFBSSxRQUFLLENBQUMsSUFBSSxDQUFDLE1BQU0sRUFBRSxJQUFJLENBQUMsV0FBVyxFQUFFLElBQUksQ0FBQyxJQUFJLENBQUMsR0FHckQsb0JBQUksSUFBSSxDQUFDLE1BQU0sQ0FBQyxLQUFLLElBQUksQ0FBQyxJQUFJLENBQUMsV0FBVyxDQUFDLG9CQUFHLElBQUksQ0FBQyxHQUFHLENBQUMsSUFBSSxDQUFDLE1BQU0sRUFBRSxPQUFPLENBQUMsR0FDNUUsb0JBQUksSUFBSSxDQUFDLE1BQU0sQ0FBQyxLQUFLLElBQUksQ0FBQyxJQUFJLENBQUMsV0FBVyxDQUFDLG9CQUFHLElBQUksQ0FBQyxHQUFHLENBQUMsSUFBSSxDQUFDLE1BQU0sRUFBRSxPQUFPLENBQUMsR0FDNUUsb0JBQUksSUFBSSxDQUFDLE1BQU0sQ0FBQyxLQUFLLElBQUksQ0FBQyxJQUFJLENBQUMsV0FBVyxDQUFDLG9CQUFHLElBQUksQ0FBQyxHQUFHLENBQUMsSUFBSSxDQUFDLE1BQU0sRUFBRSxPQUFPLENBQUMsR0FFNUUsb0JBQUksQ0FBQyxJQUFJLENBQUMsV0FBVyxDQUFDLDZCQUtoQyxPQUFPLENBQUMsUUFBUSxFQUFFLElBQUksQ0FBQyxDQUFDLE9BQU8sQ0FBQyxlQUFlLEVBQUUsRUFBRSxDQUFDLENBQUMsSUFBSSxFQUFFLENBQUM7S0FDM0Q7Ozs7Ozs7V0FLRSxhQUFDLE1BQU0sRUFBRSxJQUFJLEVBQUU7QUFDaEIsNENBQ3NCLElBQUksdUJBQ2pCLDJCQUFXLElBQUksQ0FBQywrQkFFdkI7S0FDSDs7Ozs7OztXQUtHLGVBQUMsTUFBTSxFQUFFLFdBQVcsRUFBRSxJQUFJLEVBQUU7QUFDOUIsMEJBQ0ksb0JBQUksQ0FBQyxXQUFXLElBQUksTUFBTSxRQUFLLENBQUMsK0JBS2xDO0tBQ0g7Ozs7Ozs7V0FLSyxrQkFBRztBQUNQLFVBQUksQ0FBQyxXQUFXLEdBQUcsQ0FBQyxJQUFJLENBQUMsV0FBVyxDQUFDO0FBQ3JDLFVBQUksQ0FBQyxNQUFNLEVBQUUsQ0FBQztLQUNmOzs7Ozs7O1dBS0ssa0JBQUc7QUFDUCxVQUFJLENBQUMsSUFBSSxDQUFDLE9BQU8sRUFBRTtBQUNqQixZQUFJLENBQUMsT0FBTyxHQUFHLFFBQVEsQ0FBQyxhQUFhLENBQUMsS0FBSyxDQUFDLENBQUM7QUFDN0MsWUFBSSxDQUFDLE9BQU8sQ0FBQyxTQUFTLENBQUMsR0FBRyxDQUFDLGtCQUFrQixDQUFDLENBQUM7T0FDaEQ7O0FBRUQsVUFBSSxJQUFJLENBQUMsV0FBVyxFQUFFO0FBQ3BCLFlBQUksQ0FBQyxPQUFPLENBQUMsU0FBUyxDQUFDLEdBQUcsQ0FBQyxXQUFXLENBQUMsQ0FBQztPQUN6QyxNQUFNO0FBQ0wsWUFBSSxDQUFDLE9BQU8sQ0FBQyxTQUFTLENBQUMsTUFBTSxDQUFDLFdBQVcsQ0FBQyxDQUFDO09BQzVDOztBQUVELFVBQUksSUFBSSxDQUFDLE9BQU8sQ0FBQyxLQUFLLEVBQUU7QUFDdEIsWUFBSSxDQUFDLE9BQU8sQ0FBQyxTQUFTLENBQUMsR0FBRyx1QkFBcUIsSUFBSSxDQUFDLE9BQU8sQ0FBQyxLQUFLLENBQUcsQ0FBQztPQUN0RTs7QUFFRCxVQUFJLENBQUMsT0FBTyxDQUFDLFNBQVMsR0FBRyxJQUFJLENBQUMsUUFBUSxFQUFFLENBQUM7O0FBRXpDLFVBQUksQ0FBQyxJQUFJLENBQUMsTUFBTSxFQUFFO0FBQ2hCLGVBQU8sSUFBSSxDQUFDLE9BQU8sQ0FBQztPQUNyQjs7QUFFRCxVQUFJLENBQUMsSUFBSSxDQUFDLFdBQVcsRUFBRTtBQUNyQixZQUFJLENBQUMsY0FBYyxDQUFDLElBQUksQ0FBQyxPQUFPLENBQUMsQ0FBQztPQUNuQzs7O0FBR0QsVUFBSSxJQUFJLENBQUMsT0FBTyxDQUFDLGFBQWEsQ0FBQyxTQUFTLENBQUMsRUFBRTtBQUN6QyxZQUFJLENBQUMsT0FBTyxDQUFDLGFBQWEsQ0FBQyxTQUFTLENBQUMsQ0FBQyxnQkFBZ0IsQ0FBQyxPQUFPLEVBQUUsSUFBSSxDQUFDLE1BQU0sQ0FBQyxJQUFJLENBQUMsSUFBSSxDQUFDLENBQUMsQ0FBQztPQUN6RjtBQUNELGFBQU8sSUFBSSxDQUFDLE9BQU8sQ0FBQztLQUNyQjs7Ozs7OztXQUthLHdCQUFDLE9BQU8sRUFBRTs7O0FBQ3RCLFVBQU0sS0FBSyxHQUFHLE9BQU8sQ0FBQyxhQUFhLENBQUMsUUFBUSxDQUFDLENBQUM7O0FBRTlDLFVBQUksQ0FBQyxLQUFLLEVBQUU7QUFDVixlQUFPO09BQ1I7O0FBRUQsVUFBSSxJQUFJLENBQUMsTUFBTSxRQUFLLEVBQUU7QUFDcEIsWUFBTSxTQUFTLEdBQUcsSUFBSSxhQUFhLENBQUMsSUFBSSxDQUFDLE1BQU0sUUFBSyxFQUFFLElBQUksQ0FBQyxJQUFJLEdBQUcsQ0FBQyxDQUFDLENBQUM7QUFDckUsWUFBTSxXQUFXLEdBQUcsU0FBUyxDQUFDLE1BQU0sRUFBRSxDQUFDO0FBQ3ZDLG1CQUFXLENBQUMsU0FBUyxDQUFDLEdBQUcsQ0FBQyxPQUFPLENBQUMsQ0FBQztBQUNuQyxlQUFPLENBQUMsYUFBYSxDQUFDLGNBQWMsQ0FBQyxDQUFDLFdBQVcsQ0FBQyxXQUFXLENBQUMsQ0FBQztPQUVoRTs7QUFFRCxVQUFJLElBQUksQ0FBQyxPQUFPLEVBQUU7QUFDaEIsWUFBTSxJQUFJLEdBQUcsSUFBSSxjQUFjLENBQUMsSUFBSSxDQUFDLE1BQU0sQ0FBQyxLQUFLLEVBQUUsSUFBSSxDQUFDLElBQUksR0FBRyxDQUFDLENBQUMsQ0FBQTtBQUNqRSxhQUFLLENBQUMsV0FBVyxDQUFDLElBQUksQ0FBQyxNQUFNLEVBQUUsQ0FBQyxDQUFDO09BQ2xDOztBQUVELFVBQUksT0FBTyxJQUFJLENBQUMsTUFBTSxDQUFDLFVBQVUsS0FBSyxRQUFRLEVBQUU7QUFDOUMsY0FBTSxDQUFDLElBQUksQ0FBQyxJQUFJLENBQUMsTUFBTSxDQUFDLFVBQVUsQ0FBQyxDQUFDLE9BQU8sQ0FBQyxVQUFBLFlBQVksRUFBSTtBQUMxRCxjQUFNLFFBQVEsR0FBRyxPQUFLLE1BQU0sQ0FBQyxVQUFVLENBQUMsWUFBWSxDQUFDLENBQUM7QUFDdEQsY0FBTSxPQUFPLEdBQUcsUUFBUSxDQUFDLGFBQWEsQ0FBQyxLQUFLLENBQUMsQ0FBQyxDQUFDO0FBQy9DLGlCQUFPLENBQUMsU0FBUyw2REFDTSxZQUFZLDZCQUM1QixDQUFDO0FBQ1IsY0FBTSxJQUFJLEdBQUcsSUFBSSxjQUFjLENBQUMsUUFBUSxFQUFFLE9BQUssSUFBSSxHQUFHLENBQUMsQ0FBQyxDQUFDO0FBQ3pELGlCQUFPLENBQUMsYUFBYSxDQUFDLFdBQVcsQ0FBQyxDQUFDLFdBQVcsQ0FBQyxJQUFJLENBQUMsTUFBTSxFQUFFLENBQUMsQ0FBQzs7QUFFOUQsZUFBSyxDQUFDLFdBQVcsQ0FBQyxPQUFPLENBQUMsYUFBYSxDQUFDLFdBQVcsQ0FBQyxDQUFDLENBQUM7U0FDdkQsQ0FBQyxDQUFDO09BQ0o7O0FBRUQsVUFBSSxJQUFJLENBQUMsTUFBTSxDQUFDLEtBQUssRUFBRTtBQUFFLGlCQUFTLENBQUMsSUFBSSxDQUFDLElBQUksRUFBRSxPQUFPLENBQUMsQ0FBQztPQUFFO0FBQ3pELFVBQUksSUFBSSxDQUFDLE1BQU0sQ0FBQyxLQUFLLEVBQUU7QUFBRSxpQkFBUyxDQUFDLElBQUksQ0FBQyxJQUFJLEVBQUUsT0FBTyxDQUFDLENBQUM7T0FBRTtBQUN6RCxVQUFJLElBQUksQ0FBQyxNQUFNLENBQUMsS0FBSyxFQUFFO0FBQUUsaUJBQVMsQ0FBQyxJQUFJLENBQUMsSUFBSSxFQUFFLE9BQU8sQ0FBQyxDQUFDO09BQUU7O0FBRXpELGVBQVMsU0FBUyxDQUFDLElBQUksRUFBRTs7O0FBQ3ZCLFlBQU0sVUFBVSxHQUFHLE9BQU8sQ0FBQyxhQUFhLGFBQVcsSUFBSSxDQUFHLENBQUM7O0FBRTNELFlBQUksQ0FBQyxNQUFNLENBQUMsSUFBSSxDQUFDLENBQUMsT0FBTyxDQUFDLFVBQUEsTUFBTSxFQUFJO0FBQ2xDLGNBQU0sS0FBSyxHQUFHLFFBQVEsQ0FBQyxhQUFhLENBQUMsS0FBSyxDQUFDLENBQUM7QUFDNUMsZUFBSyxDQUFDLFNBQVMsQ0FBQyxHQUFHLENBQUMsT0FBTyxDQUFDLENBQUM7QUFDN0IsY0FBTSxJQUFJLEdBQUcsSUFBSSxjQUFjLENBQUMsTUFBTSxFQUFFLE9BQUssSUFBSSxHQUFHLENBQUMsQ0FBQyxDQUFDO0FBQ3ZELGVBQUssQ0FBQyxXQUFXLENBQUMsSUFBSSxDQUFDLE1BQU0sRUFBRSxDQUFDLENBQUM7QUFDakMsb0JBQVUsQ0FBQyxXQUFXLENBQUMsS0FBSyxDQUFDLENBQUM7U0FDL0IsQ0FBQyxDQUFDO09BQ0o7S0FDRjs7O1NBOVZrQixjQUFjOzs7cUJBQWQsY0FBYyIsImZpbGUiOiJnZW5lcmF0ZWQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlc0NvbnRlbnQiOlsiKGZ1bmN0aW9uIGUodCxuLHIpe2Z1bmN0aW9uIHMobyx1KXtpZighbltvXSl7aWYoIXRbb10pe3ZhciBhPXR5cGVvZiByZXF1aXJlPT1cImZ1bmN0aW9uXCImJnJlcXVpcmU7aWYoIXUmJmEpcmV0dXJuIGEobywhMCk7aWYoaSlyZXR1cm4gaShvLCEwKTt2YXIgZj1uZXcgRXJyb3IoXCJDYW5ub3QgZmluZCBtb2R1bGUgJ1wiK28rXCInXCIpO3Rocm93IGYuY29kZT1cIk1PRFVMRV9OT1RfRk9VTkRcIixmfXZhciBsPW5bb109e2V4cG9ydHM6e319O3Rbb11bMF0uY2FsbChsLmV4cG9ydHMsZnVuY3Rpb24oZSl7dmFyIG49dFtvXVsxXVtlXTtyZXR1cm4gcyhuP246ZSl9LGwsbC5leHBvcnRzLGUsdCxuLHIpfXJldHVybiBuW29dLmV4cG9ydHN9dmFyIGk9dHlwZW9mIHJlcXVpcmU9PVwiZnVuY3Rpb25cIiYmcmVxdWlyZTtmb3IodmFyIG89MDtvPHIubGVuZ3RoO28rKylzKHJbb10pO3JldHVybiBzfSkiLCIndXNlIHN0cmljdCc7XG4vKlxuICogQ29udmVydHMgYW55T2YsIGFsbE9mIGFuZCBvbmVPZiB0byBodW1hbiByZWFkYWJsZSBzdHJpbmdcbiovXG5leHBvcnQgZnVuY3Rpb24gY29udmVydFhPZih0eXBlKSB7XG4gIHJldHVybiB0eXBlLnN1YnN0cmluZygwLCAzKSArICcgb2YnO1xufVxuXG4vKlxuICogaWYgY29uZGl0aW9uIGZvciBFUzYgdGVtcGxhdGUgc3RyaW5nc1xuICogdG8gYmUgdXNlZCBvbmx5IGluIHRlbXBsYXRlIHN0cmluZ1xuICpcbiAqIEBleGFtcGxlIG15c3RyID0gYFJhbmRvbSBpcyAke19pZihNYXRoLnJhbmRvbSgpID4gMC41KWBncmVhdGVyIHRoYW4gMC41YGBcbiAqXG4gKiBAcGFyYW0ge2Jvb2xlYW59IGNvbmRpdGlvblxuICpcbiAqIEByZXR1cm5zIHtmdW5jdGlvbn0gdGhlIHRlbXBsYXRlIGZ1bmN0aW9uXG4qL1xuZXhwb3J0IGZ1bmN0aW9uIF9pZihjb25kaXRpb24pIHtcbiAgcmV0dXJuIGNvbmRpdGlvbiA/IG5vcm1hbCA6IGVtcHR5O1xufVxuZnVuY3Rpb24gZW1wdHkoKXtcbiAgcmV0dXJuICcnO1xufVxuZnVuY3Rpb24gbm9ybWFsICh0ZW1wbGF0ZSwgLi4uZXhwcmVzc2lvbnMpIHtcbiAgcmV0dXJuIHRlbXBsYXRlLnNsaWNlKDEpLnJlZHVjZSgoYWNjdW11bGF0b3IsIHBhcnQsIGkpID0+IHtcbiAgICByZXR1cm4gYWNjdW11bGF0b3IgKyBleHByZXNzaW9uc1tpXSArIHBhcnQ7XG4gIH0sIHRlbXBsYXRlWzBdKTtcbn0iLCIndXNlIHN0cmljdCc7XG5cbi8qIGdsb2JhbHMgSlNPTlNjaGVtYVZpZXcgKi9cblxuaW1wb3J0IHtcbiAgY29udmVydFhPZixcbiAgX2lmXG59IGZyb20gJy4vaGVscGVycy5qcyc7XG5cblxuLyoqXG4gKiBAY2xhc3MgSlNPTlNjaGVtYVZpZXdcbiAqXG4gKiBBIHB1cmUgSmF2YVNjcmlwdCBjb21wb25lbnQgZm9yIHJlbmRlcmluZyBKU09OIFNjaGVtYSBpbiBIVE1MLlxuKi9cbmV4cG9ydCBkZWZhdWx0IGNsYXNzIEpTT05TY2hlbWFWaWV3IHtcblxuICAvKipcbiAgICogQHBhcmFtIHtvYmplY3R9IHNjaGVtYSBUaGUgSlNPTiBTY2hlbWEgb2JqZWN0XG4gICAqXG4gICAqIEBwYXJhbSB7bnVtYmVyfSBbb3Blbj0xXSBoaXMgbnVtYmVyIGluZGljYXRlcyB1cCB0byBob3cgbWFueSBsZXZlbHMgdGhlXG4gICAqIHJlbmRlcmVkIHRyZWUgc2hvdWxkIGV4cGFuZC4gU2V0IGl0IHRvIGAwYCB0byBtYWtlIHRoZSB3aG9sZSB0cmVlIGNvbGxhcHNlZFxuICAgKiBvciBzZXQgaXQgdG8gYEluZmluaXR5YCB0byBleHBhbmQgdGhlIHRyZWUgZGVlcGx5XG4gICAqIEBwYXJhbSB7b2JqZWN0fSBvcHRpb25zLlxuICAgKiAgdGhlbWUge3N0cmluZ306IG9uZSBvZiB0aGUgZm9sbG93aW5nIG9wdGlvbnM6IFsnZGFyayddXG4gICovXG4gIGNvbnN0cnVjdG9yKHNjaGVtYSwgb3Blbiwgb3B0aW9ucyA9IHt0aGVtZTogbnVsbH0pIHtcbiAgICB0aGlzLnNjaGVtYSA9IHNjaGVtYTtcbiAgICB0aGlzLm9wZW4gPSBvcGVuO1xuICAgIHRoaXMub3B0aW9ucyA9IG9wdGlvbnM7XG4gICAgdGhpcy5pc0NvbGxhcHNlZCA9IG9wZW4gPD0gMDtcblxuICAgIC8vIGlmIHNjaGVtYSBpcyBhbiBlbXB0eSBvYmplY3Qgd2hpY2ggbWVhbnMgYW55IEpPU05cbiAgICB0aGlzLmlzQW55ID0gdHlwZW9mIHNjaGVtYSA9PT0gJ29iamVjdCcgJiZcbiAgICAgICFBcnJheS5pc0FycmF5KHNjaGVtYSkgJiZcbiAgICAgICFPYmplY3Qua2V5cyhzY2hlbWEpXG4gICAgICAuZmlsdGVyKGs9PiBbJ3RpdGxlJywgJ2Rlc2NyaXB0aW9uJ10uaW5kZXhPZihrKSA9PT0gLTEpLmxlbmd0aDtcblxuICAgIC8vIERldGVybWluZSBpZiBhIHNjaGVtYSBpcyBhbiBhcnJheVxuICAgIHRoaXMuaXNBcnJheSA9ICF0aGlzLmlzQW55ICYmIHRoaXMuc2NoZW1hICYmIHRoaXMuc2NoZW1hLnR5cGUgPT09ICdhcnJheSc7XG5cbiAgICB0aGlzLmlzT2JqZWN0ID0gdGhpcy5zY2hlbWEgJiZcbiAgICAgICh0aGlzLnNjaGVtYS50eXBlID09PSAnb2JqZWN0JyB8fFxuICAgICAgIHRoaXMuc2NoZW1hLnByb3BlcnRpZXMgfHxcbiAgICAgICB0aGlzLnNjaGVtYS5hbnlPZiB8fFxuICAgICAgIHRoaXMuc2NoZW1hLm9uZW9mIHx8XG4gICAgICAgdGhpcy5zY2hlbWEuYWxsT2YpO1xuXG4gICAgLy8gRGV0ZXJtaW5lIGlmIGEgc2NoZW1hIGlzIGEgcHJpbWl0aXZlXG4gICAgdGhpcy5pc1ByaW1pdGl2ZSA9ICF0aGlzLmlzQW55ICYmICF0aGlzLmlzQXJyYXkgJiYgIXRoaXMuaXNPYmplY3Q7XG5cbiAgICAvL1xuICAgIHRoaXMuc2hvd1RvZ2dsZSA9IHRoaXMuc2NoZW1hLmRlc2NyaXB0aW9uIHx8XG4gICAgICB0aGlzLnNjaGVtYS50aXRsZSB8fFxuICAgICAgKHRoaXMuaXNQcmltaXRpdmUgJiYgKFxuICAgICAgICB0aGlzLnNjaGVtYS5taW5pbXVtIHx8XG4gICAgICAgIHRoaXMuc2NoZW1hLm1heGltdW0gfHxcbiAgICAgICAgdGhpcy5zY2hlbWEuZXhjbHVzaXZlTWluaW11bSB8fFxuICAgICAgICB0aGlzLnNjaGVtYS5leGNsdXNpdmVNYXhpbXVtKVxuICAgICAgKTtcblxuICAgIC8vIHBvcHVsYXRlIGlzUmVxdWlyZWQgcHJvcGVydHkgZG93biB0byBwcm9wZXJ0aWVzXG4gICAgaWYgKHRoaXMuc2NoZW1hICYmIEFycmF5LmlzQXJyYXkodGhpcy5zY2hlbWEucmVxdWlyZWQpKSB7XG4gICAgICB0aGlzLnNjaGVtYS5yZXF1aXJlZC5mb3JFYWNoKHJlcXVpcmVkUHJvcGVydHkgPT4ge1xuICAgICAgICBpZiAodHlwZW9mIHRoaXMuc2NoZW1hLnByb3BlcnRpZXNbcmVxdWlyZWRQcm9wZXJ0eV0gPT09ICdvYmplY3QnKSB7XG4gICAgICAgICAgdGhpcy5zY2hlbWEucHJvcGVydGllc1tyZXF1aXJlZFByb3BlcnR5XS5pc1JlcXVpcmVkID0gdHJ1ZTtcbiAgICAgICAgfVxuICAgICAgfSk7XG4gICAgfVxuICB9XG5cbiAgLypcbiAgICogUmV0dXJucyB0aGUgdGVtcGxhdGUgd2l0aCBwb3B1bGF0ZWQgcHJvcGVydGllcy5cbiAgICogVGhpcyB0ZW1wbGF0ZSBkb2VzIG5vdCBoYXZlIHRoZSBjaGlsZHJlblxuICAqL1xuICB0ZW1wbGF0ZSgpIHtcbiAgICBpZiAoIXRoaXMuc2NoZW1hKSB7XG4gICAgICByZXR1cm4gJyc7XG4gICAgfVxuXG4gICAgcmV0dXJuIGBcbiAgICAgIDwhLS0gQW55IC0tPlxuICAgICAgJHtfaWYodGhpcy5pc0FueSlgXG4gICAgICAgIDxkaXYgY2xhc3M9XCJhbnlcIj5cbiAgICAgICAgICAke19pZih0aGlzLnNob3dUb2dnbGUpYFxuICAgICAgICAgICAgPGEgY2xhc3M9XCJ0aXRsZVwiPjxzcGFuIGNsYXNzPVwidG9nZ2xlLWhhbmRsZVwiPjwvc3Bhbj4ke3RoaXMuc2NoZW1hLnRpdGxlIHx8ICcnfSA8L2E+XG4gICAgICAgICAgYH1cblxuICAgICAgICAgIDxzcGFuIGNsYXNzPVwidHlwZSB0eXBlLWFueVwiPiZsdDthbnkmZ3Q7PC9zcGFuPlxuXG4gICAgICAgICAgJHtfaWYodGhpcy5zY2hlbWEuZGVzY3JpcHRpb24gJiYgIXRoaXMuaXNDb2xsYXBzZWQpYFxuICAgICAgICAgICAgPGRpdiBjbGFzcz1cImlubmVyIGRlc2NyaXB0aW9uXCI+JHt0aGlzLnNjaGVtYS5kZXNjcmlwdGlvbn08L2Rpdj5cbiAgICAgICAgICBgfVxuXHRcdCBcblx0XHQgICR7X2lmKHRoaXMuc2NoZW1hLnJlcXVpcmVkICYmICF0aGlzLmlzQ29sbGFwc2VkKWBcbiAgICAgICAgICAgIDxkaXYgY2xhc3M9XCJpbm5lciByZXF1aXJlZFwiPlJlcXVpcmVkOiAke3RoaXMuc2NoZW1hLnJlcXVpcmVkfTwvZGl2PlxuICAgICAgICAgIGB9XG5cdFx0ICAke19pZih0aGlzLnNjaGVtYS5kZWZhdWx0ICYmICF0aGlzLmlzQ29sbGFwc2VkKWBcbiAgICAgICAgICAgIDxkaXYgY2xhc3M9XCJpbm5lciBkZWZhdWx0XCI+RGVmYXVsdDogJHt0aGlzLnNjaGVtYS5kZWZhdWx0fTwvZGl2PlxuICAgICAgICAgIGB9XG5cdFx0ICAgJHtfaWYodGhpcy5zY2hlbWEucGF0dGVybiAmJiAhdGhpcy5pc0NvbGxhcHNlZClgXG4gICAgICAgICAgICA8ZGl2IGNsYXNzPVwiaW5uZXIgcGF0dGVyblwiPlBhdHRlcm46ICR7dGhpcy5zY2hlbWEucGF0dGVybn08L2Rpdj5cbiAgICAgICAgICBgfVxuICAgICAgICA8L2Rpdj5cbiAgICAgIGB9XG5cbiAgICAgIDwhLS0gUHJpbWl0aXZlIC0tPlxuICAgICAgJHtfaWYodGhpcy5pc1ByaW1pdGl2ZSlgXG4gICAgICAgIDxkaXYgY2xhc3M9XCJwcmltaXRpdmVcIj5cbiAgICAgICAgICAke19pZih0aGlzLnNob3dUb2dnbGUpYFxuICAgICAgICAgICAgPGEgY2xhc3M9XCJ0aXRsZVwiPjxzcGFuIGNsYXNzPVwidG9nZ2xlLWhhbmRsZVwiPjwvc3Bhbj4ke3RoaXMuc2NoZW1hLnRpdGxlIHx8ICcnfSA8L2E+XG4gICAgICAgICAgYH1cblxuICAgICAgICAgICAgPHNwYW4gY2xhc3M9XCJ0eXBlXCI+JHt0aGlzLnNjaGVtYS50eXBlfTwvc3Bhbj5cblxuICAgICAgICAgXG5cbiAgICAgICAgICAke19pZighdGhpcy5pc0NvbGxhcHNlZCAmJiB0aGlzLnNjaGVtYS5mb3JtYXQpYFxuICAgICAgICAgICAgPHNwYW4gY2xhc3M9XCJmb3JtYXRcIj4oJHt0aGlzLnNjaGVtYS5mb3JtYXR9KTwvc3Bhbj5cbiAgICAgICAgICBgfVxuXG4gICAgICAgICAgJHtfaWYoIXRoaXMuaXNDb2xsYXBzZWQgJiYgdGhpcy5zY2hlbWEubWluaW11bSlgXG4gICAgICAgICAgICA8c3BhbiBjbGFzcz1cInJhbmdlIG1pbmltdW1cIj5taW5pbXVtOiR7dGhpcy5zY2hlbWEubWluaW11bX08L3NwYW4+XG4gICAgICAgICAgYH1cblxuICAgICAgICAgICR7X2lmKCF0aGlzLmlzQ29sbGFwc2VkICYmIHRoaXMuc2NoZW1hLmV4Y2x1c2l2ZU1pbmltdW0pYFxuICAgICAgICAgICAgPHNwYW4gY2xhc3M9XCJyYW5nZSBleGNsdXNpdmVNaW5pbXVtXCI+KGV4KW1pbmltdW06JHt0aGlzLnNjaGVtYS5leGNsdXNpdmVNaW5pbXVtfTwvc3Bhbj5cbiAgICAgICAgICBgfVxuXG4gICAgICAgICAgJHtfaWYoIXRoaXMuaXNDb2xsYXBzZWQgJiYgdGhpcy5zY2hlbWEubWF4aW11bSlgXG4gICAgICAgICAgICA8c3BhbiBjbGFzcz1cInJhbmdlIG1heGltdW1cIj5tYXhpbXVtOiR7dGhpcy5zY2hlbWEubWF4aW11bX08L3NwYW4+XG4gICAgICAgICAgYH1cblxuICAgICAgICAgICR7X2lmKCF0aGlzLmlzQ29sbGFwc2VkICYmIHRoaXMuc2NoZW1hLmV4Y2x1c2l2ZU1heGltdW0pYFxuICAgICAgICAgICAgPHNwYW4gY2xhc3M9XCJyYW5nZSBleGNsdXNpdmVNYXhpbXVtXCI+KGV4KW1heGltdW06JHt0aGlzLnNjaGVtYS5leGNsdXNpdmVNYXhpbXVtfTwvc3Bhbj5cbiAgICAgICAgICBgfVxuXG4gICAgICAgICAgJHtfaWYoIXRoaXMuaXNDb2xsYXBzZWQgJiYgdGhpcy5zY2hlbWEubWluTGVuZ3RoKWBcbiAgICAgICAgICAgIDxzcGFuIGNsYXNzPVwicmFuZ2UgbWluTGVuZ3RoXCI+bWluTGVuZ3RoOiR7dGhpcy5zY2hlbWEubWluTGVuZ3RofTwvc3Bhbj5cbiAgICAgICAgICBgfVxuXG4gICAgICAgICAgJHtfaWYoIXRoaXMuaXNDb2xsYXBzZWQgJiYgdGhpcy5zY2hlbWEubWF4TGVuZ3RoKWBcbiAgICAgICAgICAgIDxzcGFuIGNsYXNzPVwicmFuZ2UgbWF4TGVuZ3RoXCI+bWF4TGVuZ3RoOiR7dGhpcy5zY2hlbWEubWF4TGVuZ3RofTwvc3Bhbj5cbiAgICAgICAgICBgfVxuXG4gICAgICAgICAgJHtfaWYodGhpcy5zY2hlbWEuZGVzY3JpcHRpb24gJiYgIXRoaXMuaXNDb2xsYXBzZWQpYFxuICAgICAgICAgICAgPGRpdiBjbGFzcz1cImlubmVyIGRlc2NyaXB0aW9uXCI+JHt0aGlzLnNjaGVtYS5kZXNjcmlwdGlvbn08L2Rpdj5cbiAgICAgICAgICBgfVxuXHRcdCAgXG5cdFx0IFxuXHRcdCAgXG5cdFx0ICAgJHtfaWYodGhpcy5zY2hlbWEucmVxdWlyZWQgJiYgIXRoaXMuaXNDb2xsYXBzZWQpYFxuICAgICAgICAgICAgPGRpdiBjbGFzcz1cImlubmVyIHJlcXVpcmVkXCI+UmVxdWlyZWQ8L2Rpdj5cbiAgICAgICAgICBgfVxuXHRcdCAgJHtfaWYodGhpcy5zY2hlbWEuZGVmYXVsdCAmJiAhdGhpcy5pc0NvbGxhcHNlZClgXG4gICAgICAgICAgICA8ZGl2IGNsYXNzPVwiaW5uZXIgZGVmYXVsdFwiPkRlZmF1bHQ6ICR7dGhpcy5zY2hlbWEuZGVmYXVsdH08L2Rpdj5cbiAgICAgICAgICBgfVxuXHRcdCAgICR7X2lmKHRoaXMuc2NoZW1hLnBhdHRlcm4gJiYgIXRoaXMuaXNDb2xsYXBzZWQpYFxuICAgICAgICAgICAgPGRpdiBjbGFzcz1cImlubmVyIHBhdHRlcm5cIj5QYXR0ZXJuOiAke3RoaXMuc2NoZW1hLnBhdHRlcm59PC9kaXY+XG4gICAgICAgICAgYH1cblxuICAgICAgICAgICR7X2lmKCF0aGlzLmlzQ29sbGFwc2VkICYmIHRoaXMuc2NoZW1hLmVudW0pYFxuICAgICAgICAgICAgJHt0aGlzLmVudW0odGhpcy5zY2hlbWEsIHRoaXMuaXNDb2xsYXBzZWQsIHRoaXMub3Blbil9XG4gICAgICAgICAgYH1cblxuICAgICAgICAgICR7X2lmKHRoaXMuc2NoZW1hLmFsbE9mICYmICF0aGlzLmlzQ29sbGFwc2VkKWAke3RoaXMueE9mKHRoaXMuc2NoZW1hLCAnYWxsT2YnKX1gfVxuICAgICAgICAgICR7X2lmKHRoaXMuc2NoZW1hLm9uZU9mICYmICF0aGlzLmlzQ29sbGFwc2VkKWAke3RoaXMueE9mKHRoaXMuc2NoZW1hLCAnb25lT2YnKX1gfVxuICAgICAgICAgICR7X2lmKHRoaXMuc2NoZW1hLmFueU9mICYmICF0aGlzLmlzQ29sbGFwc2VkKWAke3RoaXMueE9mKHRoaXMuc2NoZW1hLCAnYW55T2YnKX1gfVxuICAgICAgICA8L2Rpdj5cbiAgICAgIGB9XG5cblxuICAgICAgPCEtLSBBcnJheSAtLT5cbiAgICAgICR7X2lmKHRoaXMuaXNBcnJheSlgXG4gICAgICAgIDxkaXYgY2xhc3M9XCJhcnJheVwiPlxuICAgICAgICAgIDxhIGNsYXNzPVwidGl0bGVcIj48c3BhbiBjbGFzcz1cInRvZ2dsZS1oYW5kbGVcIj48L3NwYW4+JHt0aGlzLnNjaGVtYS50aXRsZSB8fCAnJ308c3BhbiBjbGFzcz1cIm9wZW5pbmcgYnJhY2tldFwiPls8L3NwYW4+JHtfaWYodGhpcy5pc0NvbGxhcHNlZClgPHNwYW4gY2xhc3M9XCJjbG9zaW5nIGJyYWNrZXRcIj5dPC9zcGFuPmB9PC9hPlxuICAgICAgICAgICR7X2lmKCF0aGlzLmlzQ29sbGFwc2VkICYmICh0aGlzLnNjaGVtYS51bmlxdWVJdGVtcyB8fCB0aGlzLnNjaGVtYS5taW5JdGVtcyB8fCB0aGlzLnNjaGVtYS5tYXhJdGVtcykpYFxuICAgICAgICAgIDxzcGFuPlxuICAgICAgICAgICAgPHNwYW4gdGl0bGU9XCJpdGVtcyByYW5nZVwiPigke3RoaXMuc2NoZW1hLm1pbkl0ZW1zIHx8IDB9Li4ke3RoaXMuc2NoZW1hLm1heEl0ZW1zIHx8ICfiiJ4nfSk8L3NwYW4+XG4gICAgICAgICAgICAke19pZighdGhpcy5pc0NvbGxhcHNlZCAmJiB0aGlzLnNjaGVtYS51bmlxdWVJdGVtcylgPHNwYW4gdGl0bGU9XCJ1bmlxdWVcIiBjbGFzcz1cInVuaXF1ZUl0ZW1zXCI+4pmmPC9zcGFuPmB9XG4gICAgICAgICAgPC9zcGFuPlxuICAgICAgICAgIGB9XG4gICAgICAgICAgPGRpdiBjbGFzcz1cImlubmVyXCI+XG4gICAgICAgICAgICAke19pZighdGhpcy5pc0NvbGxhcHNlZCAmJiB0aGlzLnNjaGVtYS5kZXNjcmlwdGlvbilgXG4gICAgICAgICAgICAgIDxkaXYgY2xhc3M9XCJkZXNjcmlwdGlvblwiPiR7dGhpcy5zY2hlbWEuZGVzY3JpcHRpb259PC9kaXY+XG4gICAgICAgICAgICBgfVxuICAgICAgICAgIDwvZGl2PlxuXG4gICAgICAgICAgJHtfaWYoIXRoaXMuaXNDb2xsYXBzZWQgJiYgdGhpcy5zY2hlbWEuZW51bSlgXG4gICAgICAgICAgICAke3RoaXMuZW51bSh0aGlzLnNjaGVtYSwgdGhpcy5pc0NvbGxhcHNlZCwgdGhpcy5vcGVuKX1cbiAgICAgICAgICBgfVxuXG4gICAgICAgICAgJHtfaWYodGhpcy5zY2hlbWEuYWxsT2YgJiYgIXRoaXMuaXNDb2xsYXBzZWQpYCR7dGhpcy54T2YodGhpcy5zY2hlbWEsICdhbGxPZicpfWB9XG4gICAgICAgICAgJHtfaWYodGhpcy5zY2hlbWEub25lT2YgJiYgIXRoaXMuaXNDb2xsYXBzZWQpYCR7dGhpcy54T2YodGhpcy5zY2hlbWEsICdvbmVPZicpfWB9XG4gICAgICAgICAgJHtfaWYodGhpcy5zY2hlbWEuYW55T2YgJiYgIXRoaXMuaXNDb2xsYXBzZWQpYCR7dGhpcy54T2YodGhpcy5zY2hlbWEsICdhbnlPZicpfWB9XG5cbiAgICAgICAgICAke19pZighdGhpcy5pc0NvbGxhcHNlZClgXG4gICAgICAgICAgPHNwYW4gY2xhc3M9XCJjbG9zaW5nIGJyYWNrZXRcIj5dPC9zcGFuPlxuICAgICAgICAgIGB9XG4gICAgICAgIDwvZGl2PlxuICAgICAgYH1cblxuICAgICAgPCEtLSBPYmplY3QgLS0+XG4gICAgICAke19pZighdGhpcy5pc1ByaW1pdGl2ZSAmJiAhdGhpcy5pc0FycmF5ICYmICF0aGlzLmlzQW55KWBcbiAgICAgICAgPGRpdiBjbGFzcz1cIm9iamVjdFwiPlxuICAgICAgICAgIDxhIGNsYXNzPVwidGl0bGVcIj48c3BhblxuICAgICAgICAgICAgY2xhc3M9XCJ0b2dnbGUtaGFuZGxlXCI+PC9zcGFuPiR7dGhpcy5zY2hlbWEudGl0bGUgfHwgJyd9IDxzcGFuXG4gICAgICAgICAgICBjbGFzcz1cIm9wZW5pbmcgYnJhY2VcIj57PC9zcGFuPiR7X2lmKHRoaXMuaXNDb2xsYXBzZWQpYFxuICAgICAgICAgICAgICA8c3BhbiBjbGFzcz1cImNsb3NpbmcgYnJhY2VcIiBuZy1pZj1cImlzQ29sbGFwc2VkXCI+fTwvc3Bhbj5cbiAgICAgICAgICBgfTwvYT5cblxuICAgICAgICAgIDxkaXYgY2xhc3M9XCJpbm5lclwiPlxuICAgICAgICAgICAgJHtfaWYoIXRoaXMuaXNDb2xsYXBzZWQgJiYgdGhpcy5zY2hlbWEuZGVzY3JpcHRpb24pYFxuICAgICAgICAgICAgICA8ZGl2IGNsYXNzPVwiZGVzY3JpcHRpb25cIj4ke3RoaXMuc2NoZW1hLmRlc2NyaXB0aW9ufTwvZGl2PlxuICAgICAgICAgICAgYH1cbiAgICAgICAgICAgIDwhLS0gY2hpbGRyZW4gZ28gaGVyZSAtLT5cblx0XHQgIFxuXHRcdCAgICR7X2lmKHRoaXMuc2NoZW1hLnJlcXVpcmVkICYmICF0aGlzLmlzQ29sbGFwc2VkKWBcbiAgICAgICAgICAgIDxkaXYgY2xhc3M9XCJyZXF1aXJlZFwiPkRlZmF1bHQgRmllbGRzOiAke3RoaXMuc2NoZW1hLnJlcXVpcmVkfTwvZGl2PlxuICAgICAgICAgIGB9XG5cdFx0ICAke19pZih0aGlzLnNjaGVtYS5kZWZhdWx0ICYmICF0aGlzLmlzQ29sbGFwc2VkKWBcbiAgICAgICAgICAgIDxkaXYgY2xhc3M9XCJkZWZhdWx0XCI+RGVmYXVsdDogJHt0aGlzLnNjaGVtYS5kZWZhdWx0fTwvZGl2PlxuICAgICAgICAgIGB9XG5cdFx0ICBcblx0XHRcdCR7X2lmKCF0aGlzLmlzQ29sbGFwc2VkICYmIHRoaXMuc2NoZW1hLnBhdHRlcm4pYFxuICAgICAgICAgICAgICA8ZGl2IGNsYXNzPVwicGF0dGVyblwiPlBhdHRlcm46ICR7dGhpcy5zY2hlbWEucGF0dGVybn08L2Rpdj5cbiAgICAgICAgICAgIGB9XG4gICAgICAgICAgPC9kaXY+XG5cbiAgICAgICAgICAke19pZighdGhpcy5pc0NvbGxhcHNlZCAmJiB0aGlzLnNjaGVtYS5lbnVtKWBcbiAgICAgICAgICAgICR7dGhpcy5lbnVtKHRoaXMuc2NoZW1hLCB0aGlzLmlzQ29sbGFwc2VkLCB0aGlzLm9wZW4pfVxuICAgICAgICAgIGB9XG5cbiAgICAgICAgICAke19pZih0aGlzLnNjaGVtYS5hbGxPZiAmJiAhdGhpcy5pc0NvbGxhcHNlZClgJHt0aGlzLnhPZih0aGlzLnNjaGVtYSwgJ2FsbE9mJyl9YH1cbiAgICAgICAgICAke19pZih0aGlzLnNjaGVtYS5vbmVPZiAmJiAhdGhpcy5pc0NvbGxhcHNlZClgJHt0aGlzLnhPZih0aGlzLnNjaGVtYSwgJ29uZU9mJyl9YH1cbiAgICAgICAgICAke19pZih0aGlzLnNjaGVtYS5hbnlPZiAmJiAhdGhpcy5pc0NvbGxhcHNlZClgJHt0aGlzLnhPZih0aGlzLnNjaGVtYSwgJ2FueU9mJyl9YH1cblxuICAgICAgICAgICR7X2lmKCF0aGlzLmlzQ29sbGFwc2VkKWBcbiAgICAgICAgICA8c3BhbiBjbGFzcz1cImNsb3NpbmcgYnJhY2VcIj59PC9zcGFuPlxuICAgICAgICAgIGB9XG4gICAgICAgIDwvZGl2PlxuICAgICAgYH1cbmAucmVwbGFjZSgvXFxzKlxcbi9nLCAnXFxuJykucmVwbGFjZSgvKFxcPFxcIVxcLVxcLSkuKy9nLCAnJykudHJpbSgpO1xuICB9XG5cbiAgLypcbiAgICogVGVtcGxhdGUgZm9yIG9uZU9mLCBhbnlPZiBhbmQgYWxsT2ZcbiAgKi9cbiAgeE9mKHNjaGVtYSwgdHlwZSkge1xuICAgIHJldHVybiBgXG4gICAgICA8ZGl2IGNsYXNzPVwiaW5uZXIgJHt0eXBlfVwiPlxuICAgICAgICA8Yj4ke2NvbnZlcnRYT2YodHlwZSl9OjwvYj5cbiAgICAgIDwvZGl2PlxuICAgIGA7XG4gIH1cblxuICAvKlxuICAgKiBUZW1wbGF0ZSBmb3IgZW51bXNcbiAgKi9cbiAgZW51bShzY2hlbWEsIGlzQ29sbGFwc2VkLCBvcGVuKSB7XG4gICAgcmV0dXJuIGBcbiAgICAgICR7X2lmKCFpc0NvbGxhcHNlZCAmJiBzY2hlbWEuZW51bSlgXG4gICAgICAgIDxkaXYgY2xhc3M9XCJpbm5lciBlbnVtc1wiPlxuICAgICAgICAgIDxiPkVudW06PC9iPlxuICAgICAgICA8L2Rpdj5cbiAgICAgIGB9XG4gICAgYDtcbiAgfVxuXG4gIC8qXG4gICAqIFRvZ2dsZXMgdGhlICdjb2xsYXBzZWQnIHN0YXRlXG4gICovXG4gIHRvZ2dsZSgpIHtcbiAgICB0aGlzLmlzQ29sbGFwc2VkID0gIXRoaXMuaXNDb2xsYXBzZWQ7XG4gICAgdGhpcy5yZW5kZXIoKTtcbiAgfVxuXG4gIC8qXG4gICAqIFJlbmRlcnMgdGhlIGVsZW1lbnQgYW5kIHJldHVybnMgaXRcbiAgKi9cbiAgcmVuZGVyKCkge1xuICAgIGlmICghdGhpcy5lbGVtZW50KSB7XG4gICAgICB0aGlzLmVsZW1lbnQgPSBkb2N1bWVudC5jcmVhdGVFbGVtZW50KCdkaXYnKTtcbiAgICAgIHRoaXMuZWxlbWVudC5jbGFzc0xpc3QuYWRkKCdqc29uLXNjaGVtYS12aWV3Jyk7XG4gICAgfVxuXG4gICAgaWYgKHRoaXMuaXNDb2xsYXBzZWQpIHtcbiAgICAgIHRoaXMuZWxlbWVudC5jbGFzc0xpc3QuYWRkKCdjb2xsYXBzZWQnKTtcbiAgICB9IGVsc2Uge1xuICAgICAgdGhpcy5lbGVtZW50LmNsYXNzTGlzdC5yZW1vdmUoJ2NvbGxhcHNlZCcpO1xuICAgIH1cblxuICAgIGlmICh0aGlzLm9wdGlvbnMudGhlbWUpIHtcbiAgICAgIHRoaXMuZWxlbWVudC5jbGFzc0xpc3QuYWRkKGBqc29uLXNjaGVtYS12aWV3LSR7dGhpcy5vcHRpb25zLnRoZW1lfWApO1xuICAgIH1cblxuICAgIHRoaXMuZWxlbWVudC5pbm5lckhUTUwgPSB0aGlzLnRlbXBsYXRlKCk7XG5cbiAgICBpZiAoIXRoaXMuc2NoZW1hKSB7XG4gICAgICByZXR1cm4gdGhpcy5lbGVtZW50O1xuICAgIH1cblxuICAgIGlmICghdGhpcy5pc0NvbGxhcHNlZCkge1xuICAgICAgdGhpcy5hcHBlbmRDaGlsZHJlbih0aGlzLmVsZW1lbnQpO1xuICAgIH1cblxuICAgIC8vIGFkZCBldmVudCBsaXN0ZW5lciBmb3IgdG9nZ2xpbmdcbiAgICBpZiAodGhpcy5lbGVtZW50LnF1ZXJ5U2VsZWN0b3IoJ2EudGl0bGUnKSkge1xuICAgICAgdGhpcy5lbGVtZW50LnF1ZXJ5U2VsZWN0b3IoJ2EudGl0bGUnKS5hZGRFdmVudExpc3RlbmVyKCdjbGljaycsIHRoaXMudG9nZ2xlLmJpbmQodGhpcykpO1xuICAgIH1cbiAgICByZXR1cm4gdGhpcy5lbGVtZW50O1xuICB9XG5cbiAgLypcbiAgICogQXBwZW5kcyBjaGlsZHJlbiB0byBnaXZlbiBlbGVtZW50IGJhc2VkIG9uIGN1cnJlbnQgc2NoZW1hXG4gICovXG4gIGFwcGVuZENoaWxkcmVuKGVsZW1lbnQpIHtcbiAgICBjb25zdCBpbm5lciA9IGVsZW1lbnQucXVlcnlTZWxlY3RvcignLmlubmVyJyk7XG5cbiAgICBpZiAoIWlubmVyKSB7XG4gICAgICByZXR1cm47XG4gICAgfVxuXG4gICAgaWYgKHRoaXMuc2NoZW1hLmVudW0pIHtcbiAgICAgIGNvbnN0IGZvcm1hdHRlciA9IG5ldyBKU09ORm9ybWF0dGVyKHRoaXMuc2NoZW1hLmVudW0sIHRoaXMub3BlbiAtIDEpO1xuICAgICAgY29uc3QgZm9ybWF0dGVyRWwgPSBmb3JtYXR0ZXIucmVuZGVyKCk7XG4gICAgICBmb3JtYXR0ZXJFbC5jbGFzc0xpc3QuYWRkKCdpbm5lcicpO1xuICAgICAgZWxlbWVudC5xdWVyeVNlbGVjdG9yKCcuZW51bXMuaW5uZXInKS5hcHBlbmRDaGlsZChmb3JtYXR0ZXJFbCk7XG5cbiAgICB9XG5cbiAgICBpZiAodGhpcy5pc0FycmF5KSB7XG4gICAgICBjb25zdCB2aWV3ID0gbmV3IEpTT05TY2hlbWFWaWV3KHRoaXMuc2NoZW1hLml0ZW1zLCB0aGlzLm9wZW4gLSAxKVxuICAgICAgaW5uZXIuYXBwZW5kQ2hpbGQodmlldy5yZW5kZXIoKSk7XG4gICAgfVxuXG4gICAgaWYgKHR5cGVvZiB0aGlzLnNjaGVtYS5wcm9wZXJ0aWVzID09PSAnb2JqZWN0Jykge1xuICAgICAgT2JqZWN0LmtleXModGhpcy5zY2hlbWEucHJvcGVydGllcykuZm9yRWFjaChwcm9wZXJ0eU5hbWUgPT4ge1xuICAgICAgICBjb25zdCBwcm9wZXJ0eSA9IHRoaXMuc2NoZW1hLnByb3BlcnRpZXNbcHJvcGVydHlOYW1lXTtcbiAgICAgICAgY29uc3QgdGVtcERpdiA9IGRvY3VtZW50LmNyZWF0ZUVsZW1lbnQoJ2RpdicpOztcbiAgICAgICAgdGVtcERpdi5pbm5lckhUTUwgPSBgPGRpdiBjbGFzcz1cInByb3BlcnR5XCI+XG4gICAgICAgICAgPHNwYW4gY2xhc3M9XCJuYW1lXCI+JHtwcm9wZXJ0eU5hbWV9Ojwvc3Bhbj5cbiAgICAgICAgPC9kaXY+YDtcbiAgICAgICAgY29uc3QgdmlldyA9IG5ldyBKU09OU2NoZW1hVmlldyhwcm9wZXJ0eSwgdGhpcy5vcGVuIC0gMSk7XG4gICAgICAgIHRlbXBEaXYucXVlcnlTZWxlY3RvcignLnByb3BlcnR5JykuYXBwZW5kQ2hpbGQodmlldy5yZW5kZXIoKSk7XG5cbiAgICAgICAgaW5uZXIuYXBwZW5kQ2hpbGQodGVtcERpdi5xdWVyeVNlbGVjdG9yKCcucHJvcGVydHknKSk7XG4gICAgICB9KTtcbiAgICB9XG5cbiAgICBpZiAodGhpcy5zY2hlbWEuYWxsT2YpIHsgYXBwZW5kWE9mLmNhbGwodGhpcywgJ2FsbE9mJyk7IH1cbiAgICBpZiAodGhpcy5zY2hlbWEub25lT2YpIHsgYXBwZW5kWE9mLmNhbGwodGhpcywgJ29uZU9mJyk7IH1cbiAgICBpZiAodGhpcy5zY2hlbWEuYW55T2YpIHsgYXBwZW5kWE9mLmNhbGwodGhpcywgJ2FueU9mJyk7IH1cblxuICAgIGZ1bmN0aW9uIGFwcGVuZFhPZih0eXBlKSB7XG4gICAgICBjb25zdCBpbm5lckFsbE9mID0gZWxlbWVudC5xdWVyeVNlbGVjdG9yKGAuaW5uZXIuJHt0eXBlfWApO1xuXG4gICAgICB0aGlzLnNjaGVtYVt0eXBlXS5mb3JFYWNoKHNjaGVtYSA9PiB7XG4gICAgICAgIGNvbnN0IGlubmVyID0gZG9jdW1lbnQuY3JlYXRlRWxlbWVudCgnZGl2Jyk7XG4gICAgICAgIGlubmVyLmNsYXNzTGlzdC5hZGQoJ2lubmVyJyk7XG4gICAgICAgIGNvbnN0IHZpZXcgPSBuZXcgSlNPTlNjaGVtYVZpZXcoc2NoZW1hLCB0aGlzLm9wZW4gLSAxKTtcbiAgICAgICAgaW5uZXIuYXBwZW5kQ2hpbGQodmlldy5yZW5kZXIoKSk7XG4gICAgICAgIGlubmVyQWxsT2YuYXBwZW5kQ2hpbGQoaW5uZXIpO1xuICAgICAgfSk7XG4gICAgfVxuICB9XG59XG4iXX0=

</script>

<script>
(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.$RefParser = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
/** !
 * JSON Schema $Ref Parser v3.1.2
 *
 * @link https://github.com/BigstickCarpet/json-schema-ref-parser
 * @license MIT
 */
"use strict";function bundle(e,r){debug("Bundling $ref pointers in %s",e.$refs._root$Ref.path);var t=[];crawl(e,"schema",e.$refs._root$Ref.path+"#","#",t,e.$refs,r),remap(t)}function crawl(e,r,t,f,n,i,a){var o=null===r?e:e[r];if(o&&"object"==typeof o)if($Ref.is$Ref(o))inventory$Ref(e,r,t,f,n,i,a);else{var l=Object.keys(o),u=l.indexOf("definitions");u>0&&l.splice(0,0,l.splice(u,1)[0]),l.forEach(function(e){var r=Pointer.join(t,e),l=Pointer.join(f,e),u=o[e];$Ref.is$Ref(u)?inventory$Ref(o,e,t,l,n,i,a):crawl(o,e,r,l,n,i,a)})}}function inventory$Ref(e,r,t,f,n,i,a){if(!n.some(function(t){return t.parent===e&&t.key===r})){var o=null===r?e:e[r],l=url.resolve(t,o.$ref),u=i._resolve(l,a),h=Pointer.parse(f).length,s=url.stripHash(u.path),$=url.getHash(u.path),c=s!==i._root$Ref.path,p=$Ref.isExtended$Ref(o);n.push({$ref:o,parent:e,key:r,pathFromRoot:f,depth:h,file:s,hash:$,value:u.value,circular:u.circular,extended:p,external:c}),crawl(u.value,null,u.path,f,n,i,a)}}function remap(e){e.sort(function(e,r){return e.file!==r.file?e.file<r.file?-1:1:e.hash!==r.hash?e.hash<r.hash?-1:1:e.circular!==r.circular?e.circular?-1:1:e.extended!==r.extended?e.extended?1:-1:e.depth!==r.depth?e.depth-r.depth:r.pathFromRoot.lastIndexOf("/definitions")-e.pathFromRoot.lastIndexOf("/definitions")});var r,t,f;e.forEach(function(e){debug('Re-mapping $ref pointer "%s" at %s',e.$ref.$ref,e.pathFromRoot),e.external?e.file===r&&e.hash===t?e.$ref.$ref=f:e.file===r&&0===e.hash.indexOf(t+"/")?e.$ref.$ref=Pointer.join(f,Pointer.parse(e.hash)):(r=e.file,t=e.hash,f=e.pathFromRoot,e.$ref=e.parent[e.key]=$Ref.dereference(e.$ref,e.value),e.circular&&(e.$ref.$ref=e.pathFromRoot)):e.$ref.$ref=e.hash,debug("    new value: %s",e.$ref&&e.$ref.$ref?e.$ref.$ref:"[object Object]")})}var $Ref=require("./ref"),Pointer=require("./pointer"),debug=require("./util/debug"),url=require("./util/url");module.exports=bundle;

},{"./pointer":10,"./ref":11,"./util/debug":16,"./util/url":19}],2:[function(require,module,exports){
"use strict";function dereference(e,r){debug("Dereferencing $ref pointers in %s",e.$refs._root$Ref.path);var c=crawl(e.schema,e.$refs._root$Ref.path,"#",[],e.$refs,r);e.$refs.circular=c.circular,e.schema=c.value}function crawl(e,r,c,u,f,i){var n,a={value:e,circular:!1};return e&&"object"==typeof e&&(u.push(e),$Ref.isAllowed$Ref(e,i)?(n=dereference$Ref(e,r,c,u,f,i),a.circular=n.circular,a.value=n.value):Object.keys(e).forEach(function(l){var o=Pointer.join(r,l),t=Pointer.join(c,l),d=e[l],$=!1;$Ref.isAllowed$Ref(d,i)?(n=dereference$Ref(d,o,t,u,f,i),$=n.circular,e[l]=n.value):-1===u.indexOf(d)?(n=crawl(d,o,t,u,f,i),$=n.circular,e[l]=n.value):$=foundCircularReference(o,f,i),a.circular=a.circular||$}),u.pop()),a}function dereference$Ref(e,r,c,u,f,i){debug('Dereferencing $ref pointer "%s" at %s',e.$ref,r);var n=url.resolve(r,e.$ref),a=f._resolve(n,i),l=a.circular,o=l||-1!==u.indexOf(a.value);o&&foundCircularReference(r,f,i);var t=$Ref.dereference(e,a.value);if(!o){var d=crawl(t,a.path,c,u,f,i);o=d.circular,t=d.value}return o&&!l&&"ignore"===i.dereference.circular&&(t=e),l&&(t.$ref=c),{circular:o,value:t}}function foundCircularReference(e,r,c){if(r.circular=!0,!c.dereference.circular)throw ono.reference("Circular $ref pointer found at %s",e);return!0}var $Ref=require("./ref"),Pointer=require("./pointer"),ono=require("ono"),debug=require("./util/debug"),url=require("./util/url");module.exports=dereference;

},{"./pointer":10,"./ref":11,"./util/debug":16,"./util/url":19,"ono":69}],3:[function(require,module,exports){
(function (Buffer){
"use strict";function $RefParser(){this.schema=null,this.$refs=new $Refs}function normalizeArgs(e){var r,t,a,s;return e=Array.prototype.slice.call(e),"function"==typeof e[e.length-1]&&(s=e.pop()),"string"==typeof e[0]?(r=e[0],"object"==typeof e[2]?(t=e[1],a=e[2]):(t=void 0,a=e[1])):(r="",t=e[0],a=e[1]),a instanceof Options||(a=new Options(a)),{path:r,schema:t,options:a,callback:s}}var Promise=require("./util/promise"),Options=require("./options"),$Refs=require("./refs"),parse=require("./parse"),resolveExternal=require("./resolve-external"),bundle=require("./bundle"),dereference=require("./dereference"),url=require("./util/url"),maybe=require("call-me-maybe"),ono=require("ono");module.exports=$RefParser,module.exports.YAML=require("./util/yaml"),$RefParser.parse=function(e,r,t){var a=this,s=new a;return s.parse.apply(s,arguments)},$RefParser.prototype.parse=function(e,r,t){var a,s=normalizeArgs(arguments);if(!s.path&&!s.schema){var n=ono("Expected a file path, URL, or object. Got %s",s.path||s.schema);return maybe(s.callback,Promise.reject(n))}this.schema=null,this.$refs=new $Refs,url.isFileSystemPath(s.path)&&(s.path=url.fromFileSystemPath(s.path)),s.path=url.resolve(url.cwd(),s.path),s.schema&&"object"==typeof s.schema?(this.$refs._add(s.path,s.schema),a=Promise.resolve(s.schema)):a=parse(s.path,this.$refs,s.options);var o=this;return a.then(function(e){if(!e||"object"!=typeof e||Buffer.isBuffer(e))throw ono.syntax('"%s" is not a valid JSON Schema',o.$refs._root$Ref.path||e);return o.schema=e,maybe(s.callback,Promise.resolve(o.schema))})["catch"](function(e){return maybe(s.callback,Promise.reject(e))})},$RefParser.resolve=function(e,r,t){var a=this,s=new a;return s.resolve.apply(s,arguments)},$RefParser.prototype.resolve=function(e,r,t){var a=this,s=normalizeArgs(arguments);return this.parse(s.path,s.schema,s.options).then(function(){return resolveExternal(a,s.options)}).then(function(){return maybe(s.callback,Promise.resolve(a.$refs))})["catch"](function(e){return maybe(s.callback,Promise.reject(e))})},$RefParser.bundle=function(e,r,t){var a=this,s=new a;return s.bundle.apply(s,arguments)},$RefParser.prototype.bundle=function(e,r,t){var a=this,s=normalizeArgs(arguments);return this.resolve(s.path,s.schema,s.options).then(function(){return bundle(a,s.options),maybe(s.callback,Promise.resolve(a.schema))})["catch"](function(e){return maybe(s.callback,Promise.reject(e))})},$RefParser.dereference=function(e,r,t){var a=this,s=new a;return s.dereference.apply(s,arguments)},$RefParser.prototype.dereference=function(e,r,t){var a=this,s=normalizeArgs(arguments);return this.resolve(s.path,s.schema,s.options).then(function(){return dereference(a,s.options),maybe(s.callback,Promise.resolve(a.schema))})["catch"](function(e){return maybe(s.callback,Promise.reject(e))})};

}).call(this,{"isBuffer":require("../node_modules/is-buffer/index.js")})

},{"../node_modules/is-buffer/index.js":36,"./bundle":1,"./dereference":2,"./options":4,"./parse":5,"./refs":12,"./resolve-external":13,"./util/promise":18,"./util/url":19,"./util/yaml":20,"call-me-maybe":27,"ono":69}],4:[function(require,module,exports){
"use strict";function $RefParserOptions(e){merge(this,$RefParserOptions.defaults),merge(this,e)}function merge(e,r){if(isMergeable(r))for(var s=Object.keys(r),a=0;a<s.length;a++){var t=s[a],i=r[t],o=e[t];isMergeable(i)?e[t]=merge(o||{},i):void 0!==i&&(e[t]=i)}return e}function isMergeable(e){return e&&"object"==typeof e&&!Array.isArray(e)&&!(e instanceof RegExp)&&!(e instanceof Date)}var jsonParser=require("./parsers/json"),yamlParser=require("./parsers/yaml"),textParser=require("./parsers/text"),binaryParser=require("./parsers/binary"),fileResolver=require("./resolvers/file"),httpResolver=require("./resolvers/http"),zschemaValidator=require("./validators/z-schema");module.exports=$RefParserOptions,$RefParserOptions.defaults={parse:{json:jsonParser,yaml:yamlParser,text:textParser,binary:binaryParser},resolve:{file:fileResolver,http:httpResolver,external:!0},dereference:{circular:!0},validate:{zschema:zschemaValidator}};

},{"./parsers/binary":6,"./parsers/json":7,"./parsers/text":8,"./parsers/yaml":9,"./resolvers/file":14,"./resolvers/http":15,"./validators/z-schema":21}],5:[function(require,module,exports){
(function (Buffer){
"use strict";function parse(r,e,n){try{r=url.stripHash(r);var t=e._add(r),u={url:r,extension:url.getExtension(r)};return readFile(u,n).then(function(r){return t.pathType=r.plugin.name,u.data=r.result,parseFile(u,n)}).then(function(r){return t.value=r.result,r.result})}catch(i){return Promise.reject(i)}}function readFile(r,e){return new Promise(function(n,t){function u(e){t(!e||e instanceof SyntaxError?ono.syntax('Unable to resolve $ref pointer "%s"',r.url):e)}debug("Reading %s",r.url);var i=plugins.all(e.resolve);i=plugins.filter(i,"canRead",r),plugins.sort(i),plugins.run(i,"read",r).then(n,u)})}function parseFile(r,e){return new Promise(function(n,t){function u(e){!e.plugin.allowEmpty&&isEmpty(e.result)?t(ono.syntax('Error parsing "%s" as %s. \nParsed value is empty',r.url,e.plugin.name)):n(e)}function i(e){e?(e=e instanceof Error?e:new Error(e),t(ono.syntax(e,"Error parsing %s",r.url))):t(ono.syntax("Unable to parse %s",r.url))}debug("Parsing %s",r.url);var s=plugins.all(e.parse),l=plugins.filter(s,"canParse",r),o=l.length>0?l:s;plugins.sort(o),plugins.run(o,"parse",r).then(u,i)})}function isEmpty(r){return void 0===r||"object"==typeof r&&0===Object.keys(r).length||"string"==typeof r&&0===r.trim().length||Buffer.isBuffer(r)&&0===r.length}var ono=require("ono"),debug=require("./util/debug"),url=require("./util/url"),plugins=require("./util/plugins"),Promise=require("./util/promise");module.exports=parse;

}).call(this,{"isBuffer":require("../node_modules/is-buffer/index.js")})

},{"../node_modules/is-buffer/index.js":36,"./util/debug":16,"./util/plugins":17,"./util/promise":18,"./util/url":19,"ono":69}],6:[function(require,module,exports){
(function (Buffer){
"use strict";var BINARY_REGEXP=/\.(jpeg|jpg|gif|png|bmp|ico)$/i;module.exports={order:400,allowEmpty:!0,canParse:function(r){return Buffer.isBuffer(r.data)&&BINARY_REGEXP.test(r.url)},parse:function(r){return Buffer.isBuffer(r.data)?r.data:new Buffer(r.data)}};

}).call(this,require("buffer").Buffer)

},{"buffer":25}],7:[function(require,module,exports){
(function (Buffer){
"use strict";var Promise=require("../util/promise");module.exports={order:100,allowEmpty:!0,canParse:".json",parse:function(r){return new Promise(function(e,t){var i=r.data;Buffer.isBuffer(i)&&(i=i.toString()),e("string"==typeof i?0===i.trim().length?void 0:JSON.parse(i):i)})}};

}).call(this,{"isBuffer":require("../../node_modules/is-buffer/index.js")})

},{"../../node_modules/is-buffer/index.js":36,"../util/promise":18}],8:[function(require,module,exports){
(function (Buffer){
"use strict";var TEXT_REGEXP=/\.(txt|htm|html|md|xml|js|min|map|css|scss|less|svg)$/i;module.exports={order:300,allowEmpty:!0,encoding:"utf8",canParse:function(t){return("string"==typeof t.data||Buffer.isBuffer(t.data))&&TEXT_REGEXP.test(t.url)},parse:function(t){if("string"==typeof t.data)return t.data;if(Buffer.isBuffer(t.data))return t.data.toString(this.encoding);throw new Error("data is not text")}};

}).call(this,{"isBuffer":require("../../node_modules/is-buffer/index.js")})

},{"../../node_modules/is-buffer/index.js":36}],9:[function(require,module,exports){
(function (Buffer){
"use strict";var Promise=require("../util/promise"),YAML=require("../util/yaml");module.exports={order:200,allowEmpty:!0,canParse:[".yaml",".yml",".json"],parse:function(r){return new Promise(function(e,t){var i=r.data;Buffer.isBuffer(i)&&(i=i.toString()),e("string"==typeof i?YAML.parse(i):i)})}};

}).call(this,{"isBuffer":require("../../node_modules/is-buffer/index.js")})

},{"../../node_modules/is-buffer/index.js":36,"../util/promise":18,"../util/yaml":20}],10:[function(require,module,exports){
"use strict";function Pointer(e,r){this.$ref=e,this.path=r,this.value=void 0,this.circular=!1}function resolveIf$Ref(e,r){if($Ref.isAllowed$Ref(e.value,r)){var t=url.resolve(e.path,e.value.$ref);if(t!==e.path){var s=e.$ref.$refs._resolve(t,r);return $Ref.isExtended$Ref(e.value)?e.value=$Ref.dereference(e.value,s.value):(e.$ref=s.$ref,e.path=s.path,e.value=s.value),!0}e.circular=!0}}function setValue(e,r,t){if(!e.value||"object"!=typeof e.value)throw ono.syntax('Error assigning $ref pointer "%s". \nCannot set "%s" of a non-object.',e.path,r);return"-"===r&&Array.isArray(e.value)?e.value.push(t):e.value[r]=t,t}module.exports=Pointer;var $Ref=require("./ref"),url=require("./util/url"),ono=require("ono"),slashes=/\//g,tildes=/~/g,escapedSlash=/~1/g,escapedTilde=/~0/g;Pointer.prototype.resolve=function(e,r){var t=Pointer.parse(this.path);this.value=e;for(var s=0;s<t.length;s++){resolveIf$Ref(this,r)&&(this.path=Pointer.join(this.path,t.slice(s)));var i=t[s];if(void 0===this.value[i])throw ono.syntax('Error resolving $ref pointer "%s". \nToken "%s" does not exist.',this.path,i);this.value=this.value[i]}return resolveIf$Ref(this,r),this},Pointer.prototype.set=function(e,r,t){var s,i=Pointer.parse(this.path);if(0===i.length)return this.value=r,r;this.value=e;for(var a=0;a<i.length-1;a++)resolveIf$Ref(this,t),s=i[a],this.value&&void 0!==this.value[s]?this.value=this.value[s]:this.value=setValue(this,s,{});return resolveIf$Ref(this,t),s=i[i.length-1],setValue(this,s,r),e},Pointer.parse=function(e){var r=url.getHash(e).substr(1);if(!r)return[];r=r.split("/");for(var t=0;t<r.length;t++)r[t]=decodeURI(r[t].replace(escapedSlash,"/").replace(escapedTilde,"~"));if(""!==r[0])throw ono.syntax('Invalid $ref pointer "%s". Pointers must begin with "#/"',r);return r.slice(1)},Pointer.join=function(e,r){-1===e.indexOf("#")&&(e+="#"),r=Array.isArray(r)?r:[r];for(var t=0;t<r.length;t++){var s=r[t];e+="/"+encodeURI(s.replace(tildes,"~0").replace(slashes,"~1"))}return e};

},{"./ref":11,"./util/url":19,"ono":69}],11:[function(require,module,exports){
"use strict";function $Ref(){this.path=void 0,this.value=void 0,this.$refs=void 0,this.pathType=void 0}module.exports=$Ref;var Pointer=require("./pointer");$Ref.prototype.exists=function(e,t){try{return this.resolve(e,t),!0}catch(r){return!1}},$Ref.prototype.get=function(e,t){return this.resolve(e,t).value},$Ref.prototype.resolve=function(e,t){var r=new Pointer(this,e);return r.resolve(this.value,t)},$Ref.prototype.set=function(e,t){var r=new Pointer(this,e);this.value=r.set(this.value,t)},$Ref.is$Ref=function(e){return e&&"object"==typeof e&&"string"==typeof e.$ref&&e.$ref.length>0},$Ref.isExternal$Ref=function(e){return $Ref.is$Ref(e)&&"#"!==e.$ref[0]},$Ref.isAllowed$Ref=function(e,t){return!$Ref.is$Ref(e)||"#"!==e.$ref[0]&&t&&!t.resolve.external?void 0:!0},$Ref.isExtended$Ref=function(e){return $Ref.is$Ref(e)&&Object.keys(e).length>1},$Ref.dereference=function(e,t){if(t&&"object"==typeof t&&$Ref.isExtended$Ref(e)){var r={};return Object.keys(e).forEach(function(t){"$ref"!==t&&(r[t]=e[t])}),Object.keys(t).forEach(function(e){e in r||(r[e]=t[e])}),r}return t};

},{"./pointer":10}],12:[function(require,module,exports){
"use strict";function $Refs(){this.circular=!1,this._$refs={},this._root$Ref=null}function getPaths(e,r){var t=Object.keys(e);return r=Array.isArray(r[0])?r[0]:Array.prototype.slice.call(r),r.length>0&&r[0]&&(t=t.filter(function(t){return-1!==r.indexOf(e[t].pathType)})),t.map(function(r){return{encoded:r,decoded:"file"===e[r].pathType?url.toFileSystemPath(r,!0):r}})}var ono=require("ono"),$Ref=require("./ref"),url=require("./util/url");module.exports=$Refs,$Refs.prototype.paths=function(e){var r=getPaths(this._$refs,arguments);return r.map(function(e){return e.decoded})},$Refs.prototype.values=function(e){var r=this._$refs,t=getPaths(r,arguments);return t.reduce(function(e,t){return e[t.decoded]=r[t.encoded].value,e},{})},$Refs.prototype.toJSON=$Refs.prototype.values,$Refs.prototype.exists=function(e,r){try{return this._resolve(e,r),!0}catch(t){return!1}},$Refs.prototype.get=function(e,r){return this._resolve(e,r).value},$Refs.prototype.set=function(e,r){e=url.resolve(this._root$Ref.path,e);var t=url.stripHash(e),o=this._$refs[t];if(!o)throw ono('Error resolving $ref pointer "%s". \n"%s" not found.',e,t);o.set(e,r)},$Refs.prototype._add=function(e,r){var t=url.stripHash(e),o=new $Ref;return o.path=t,o.value=r,o.$refs=this,this._$refs[t]=o,this._root$Ref=this._root$Ref||o,o},$Refs.prototype._resolve=function(e,r){e=url.resolve(this._root$Ref.path,e);var t=url.stripHash(e),o=this._$refs[t];if(!o)throw ono('Error resolving $ref pointer "%s". \n"%s" not found.',e,t);return o.resolve(e,r)},$Refs.prototype._get$Ref=function(e){e=url.resolve(this._root$Ref.path,e);var r=url.stripHash(e);return this._$refs[r]};

},{"./ref":11,"./util/url":19,"ono":69}],13:[function(require,module,exports){
"use strict";function resolveExternal(e,r){if(!r.resolve.external)return Promise.resolve();try{debug("Resolving $ref pointers in %s",e.$refs._root$Ref.path);var s=crawl(e.schema,e.$refs._root$Ref.path+"#",e.$refs,r);return Promise.all(s)}catch(t){return Promise.reject(t)}}function crawl(e,r,s,t){var o=[];return e&&"object"==typeof e&&($Ref.isExternal$Ref(e)?o.push(resolve$Ref(e,r,s,t)):Object.keys(e).forEach(function(i){var n=Pointer.join(r,i),l=e[i];$Ref.isExternal$Ref(l)?o.push(resolve$Ref(l,n,s,t)):o=o.concat(crawl(l,n,s,t))})),o}function resolve$Ref(e,r,s,t){debug('Resolving $ref pointer "%s" at %s',e.$ref,r);var o=url.resolve(r,e.$ref),i=url.stripHash(o);return e=s._$refs[i],e?Promise.resolve(e.value):parse(o,s,t).then(function(e){debug("Resolving $ref pointers in %s",i);var r=crawl(e,i+"#",s,t);return Promise.all(r)})}var Promise=require("./util/promise"),$Ref=require("./ref"),Pointer=require("./pointer"),parse=require("./parse"),debug=require("./util/debug"),url=require("./util/url");module.exports=resolveExternal;

},{"./parse":5,"./pointer":10,"./ref":11,"./util/debug":16,"./util/promise":18,"./util/url":19}],14:[function(require,module,exports){
"use strict";var fs=require("fs"),ono=require("ono"),Promise=require("../util/promise"),url=require("../util/url"),debug=require("../util/debug");module.exports={order:100,canRead:function(r){return url.isFileSystemPath(r.url)},read:function(r){return new Promise(function(e,i){var u;try{u=url.toFileSystemPath(r.url)}catch(o){i(ono.uri(o,"Malformed URI: %s",r.url))}debug("Opening file: %s",u);try{fs.readFile(u,function(r,o){r?i(ono(r,'Error opening file "%s"',u)):e(o)})}catch(o){i(ono(o,'Error opening file "%s"',u))}})}};

},{"../util/debug":16,"../util/promise":18,"../util/url":19,"fs":24,"ono":69}],15:[function(require,module,exports){
(function (process,Buffer){
"use strict";function download(e,t,o){return new Promise(function(r,n){e=url.parse(e),o=o||[],o.push(e.href),get(e,t).then(function(s){if(s.statusCode>=400)throw ono({status:s.statusCode},"HTTP ERROR %d",s.statusCode);if(s.statusCode>=300)if(o.length>t.redirects)n(ono({status:s.statusCode},"Error downloading %s. \nToo many redirects: \n  %s",o[0],o.join(" \n  ")));else{if(!s.headers.location)throw ono({status:s.statusCode},"HTTP %d redirect with no location header",s.statusCode);debug("HTTP %d redirect %s -> %s",s.statusCode,e.href,s.headers.location);var u=url.resolve(e,s.headers.location);download(u,t,o).then(r,n)}else r(s.body||new Buffer(0))})["catch"](function(t){n(ono(t,"Error downloading",e.href))})})}function get(e,t){return new Promise(function(o,r){debug("GET",e.href);var n="https:"===e.protocol?https:http,s=n.get({hostname:e.hostname,port:e.port,path:e.path,auth:e.auth,headers:t.headers||{},withCredentials:t.withCredentials});"function"==typeof s.setTimeout&&s.setTimeout(t.timeout),s.on("timeout",function(){s.abort()}),s.on("error",r),s.once("response",function(e){e.body=new Buffer(0),e.on("data",function(t){e.body=Buffer.concat([e.body,new Buffer(t)])}),e.on("error",r),e.on("end",function(){o(e)})})})}var http=require("http"),https=require("https"),ono=require("ono"),url=require("../util/url"),debug=require("../util/debug"),Promise=require("../util/promise");module.exports={order:200,headers:null,timeout:5e3,redirects:5,withCredentials:!1,canRead:function(e){return url.isHttp(e.url)},read:function(e){var t=url.parse(e.url);return process.browser&&!t.protocol&&(t.protocol=url.parse(location.href).protocol),download(t,this)}};

}).call(this,require('_process'),require("buffer").Buffer)

},{"../util/debug":16,"../util/promise":18,"../util/url":19,"_process":71,"buffer":25,"http":87,"https":33,"ono":69}],16:[function(require,module,exports){
"use strict";var debug=require("debug");module.exports=debug("json-schema-ref-parser");

},{"debug":29}],17:[function(require,module,exports){
"use strict";function getResult(e,r,t,n){var u=e[r];if("function"==typeof u)return u.apply(e,[t,n]);if(!n){if(u instanceof RegExp)return u.test(t.url);if("string"==typeof u)return u===t.extension;if(Array.isArray(u))return-1!==u.indexOf(t.extension)}return u}var Promise=require("./promise"),debug=require("./debug");exports.all=function(e){return Object.keys(e).filter(function(r){return"object"==typeof e[r]}).map(function(r){return e[r].name=r,e[r]})},exports.filter=function(e,r,t){return e.filter(function(e){return!!getResult(e,r,t)})},exports.sort=function(e){return e.forEach(function(e){e.order=e.order||Number.MAX_SAFE_INTEGER}),e.sort(function(e,r){return e.order-r.order})},exports.run=function(e,r,t){var n,u,i=0;return new Promise(function(o,f){function s(){if(n=e[i++],!n)return f(u);try{debug("  %s",n.name);var o=getResult(n,r,t,c);o&&"function"==typeof o.then?o.then(a,p):void 0!==o&&a(o)}catch(s){p(s)}}function c(e,r){e?p(e):a(r)}function a(e){debug("    success"),o({plugin:n,result:e})}function p(e){debug("    %s",e.message||e),u=e,s()}s()})};

},{"./debug":16,"./promise":18}],18:[function(require,module,exports){
"use strict";module.exports="function"==typeof Promise?Promise:require("es6-promise").Promise;

},{"es6-promise":31}],19:[function(require,module,exports){
(function (process){
"use strict";var isWindows=/^win/.test(process.platform),forwardSlashPattern=/\//g,protocolPattern=/^([a-z0-9.+-]+):\/\//i,url=module.exports,urlEncodePatterns=[/\?/g,"%3F",/\#/g,"%23",isWindows?/\\/g:/\//,"/"],urlDecodePatterns=[/\%23/g,"#",/\%24/g,"$",/\%26/g,"&",/\%2C/g,",",/\%40/g,"@"];exports.parse=require("url").parse,exports.resolve=require("url").resolve,exports.cwd=function(){return process.browser?location.href:process.cwd()+"/"},exports.getProtocol=function(r){var e=protocolPattern.exec(r);return e?e[1].toLowerCase():void 0},exports.getExtension=function(r){var e=r.lastIndexOf(".");return e>=0?r.substr(e).toLowerCase():""},exports.getHash=function(r){var e=r.indexOf("#");return e>=0?r.substr(e):"#"},exports.stripHash=function(r){var e=r.indexOf("#");return e>=0&&(r=r.substr(0,e)),r},exports.isHttp=function(r){var e=url.getProtocol(r);return"http"===e||"https"===e?!0:void 0===e?process.browser:!1},exports.isFileSystemPath=function(r){if(process.browser)return!1;var e=url.getProtocol(r);return void 0===e||"file"===e},exports.fromFileSystemPath=function(r){for(var e=0;e<urlEncodePatterns.length;e+=2)r=r.replace(urlEncodePatterns[e],urlEncodePatterns[e+1]);return encodeURI(r)},exports.toFileSystemPath=function(r,e){r=decodeURI(r);for(var t=0;t<urlDecodePatterns.length;t+=2)r=r.replace(urlDecodePatterns[t],urlDecodePatterns[t+1]);var o="file://"===r.substr(0,7).toLowerCase();return o&&(r="/"===r[7]?r.substr(8):r.substr(7),isWindows&&"/"===r[1]&&(r=r[0]+":"+r.substr(1)),e?r="file:///"+r:(o=!1,r=isWindows?r:"/"+r)),isWindows&&!o&&(r=r.replace(forwardSlashPattern,"\\")),r};

}).call(this,require('_process'))

},{"_process":71,"url":93}],20:[function(require,module,exports){
"use strict";var yaml=require("js-yaml"),ono=require("ono");module.exports={parse:function(r,e){try{return yaml.safeLoad(r)}catch(o){throw o instanceof Error?o:ono(o,o.message)}},stringify:function(r,e,o){try{var t=("string"==typeof o?o.length:o)||2;return yaml.safeDump(r,{indent:t})}catch(n){throw n instanceof Error?n:ono(n,n.message)}}};

},{"js-yaml":38,"ono":69}],21:[function(require,module,exports){
"use strict";module.exports={order:100,canValidate:function(e){return!!e.resolved},validate:function(e){}};

},{}],22:[function(require,module,exports){
var lookup="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";!function(t){"use strict";function r(t){var r=t.charCodeAt(0);return r===h||r===u?62:r===c||r===f?63:o>r?-1:o+10>r?r-o+26+26:i+26>r?r-i:A+26>r?r-A+26:void 0}function e(t){function e(t){i[f++]=t}var n,h,c,o,A,i;if(t.length%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var u=t.length;A="="===t.charAt(u-2)?2:"="===t.charAt(u-1)?1:0,i=new a(3*t.length/4-A),c=A>0?t.length-4:t.length;var f=0;for(n=0,h=0;c>n;n+=4,h+=3)o=r(t.charAt(n))<<18|r(t.charAt(n+1))<<12|r(t.charAt(n+2))<<6|r(t.charAt(n+3)),e((16711680&o)>>16),e((65280&o)>>8),e(255&o);return 2===A?(o=r(t.charAt(n))<<2|r(t.charAt(n+1))>>4,e(255&o)):1===A&&(o=r(t.charAt(n))<<10|r(t.charAt(n+1))<<4|r(t.charAt(n+2))>>2,e(o>>8&255),e(255&o)),i}function n(t){function r(t){return lookup.charAt(t)}function e(t){return r(t>>18&63)+r(t>>12&63)+r(t>>6&63)+r(63&t)}var n,a,h,c=t.length%3,o="";for(n=0,h=t.length-c;h>n;n+=3)a=(t[n]<<16)+(t[n+1]<<8)+t[n+2],o+=e(a);switch(c){case 1:a=t[t.length-1],o+=r(a>>2),o+=r(a<<4&63),o+="==";break;case 2:a=(t[t.length-2]<<8)+t[t.length-1],o+=r(a>>10),o+=r(a>>4&63),o+=r(a<<2&63),o+="="}return o}var a="undefined"!=typeof Uint8Array?Uint8Array:Array,h="+".charCodeAt(0),c="/".charCodeAt(0),o="0".charCodeAt(0),A="a".charCodeAt(0),i="A".charCodeAt(0),u="-".charCodeAt(0),f="_".charCodeAt(0);t.toByteArray=e,t.fromByteArray=n}("undefined"==typeof exports?this.base64js={}:exports);

},{}],23:[function(require,module,exports){

},{}],24:[function(require,module,exports){

},{}],25:[function(require,module,exports){
(function (global){
/*!
 * The buffer module from node.js, for the browser.
 *
 * @author   Feross Aboukhadijeh <feross@feross.org> <http://feross.org>
 * @license  MIT
 */
"use strict";function typedArraySupport(){function t(){}try{var e=new Uint8Array(1);return e.foo=function(){return 42},e.constructor=t,42===e.foo()&&e.constructor===t&&"function"==typeof e.subarray&&0===e.subarray(1,1).byteLength}catch(r){return!1}}function kMaxLength(){return Buffer.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function Buffer(t){return this instanceof Buffer?(Buffer.TYPED_ARRAY_SUPPORT||(this.length=0,this.parent=void 0),"number"==typeof t?fromNumber(this,t):"string"==typeof t?fromString(this,t,arguments.length>1?arguments[1]:"utf8"):fromObject(this,t)):arguments.length>1?new Buffer(t,arguments[1]):new Buffer(t)}function fromNumber(t,e){if(t=allocate(t,0>e?0:0|checked(e)),!Buffer.TYPED_ARRAY_SUPPORT)for(var r=0;e>r;r++)t[r]=0;return t}function fromString(t,e,r){"string"==typeof r&&""!==r||(r="utf8");var n=0|byteLength(e,r);return t=allocate(t,n),t.write(e,r),t}function fromObject(t,e){if(Buffer.isBuffer(e))return fromBuffer(t,e);if(isArray(e))return fromArray(t,e);if(null==e)throw new TypeError("must start with number, buffer, array or string");if("undefined"!=typeof ArrayBuffer){if(e.buffer instanceof ArrayBuffer)return fromTypedArray(t,e);if(e instanceof ArrayBuffer)return fromArrayBuffer(t,e)}return e.length?fromArrayLike(t,e):fromJsonObject(t,e)}function fromBuffer(t,e){var r=0|checked(e.length);return t=allocate(t,r),e.copy(t,0,0,r),t}function fromArray(t,e){var r=0|checked(e.length);t=allocate(t,r);for(var n=0;r>n;n+=1)t[n]=255&e[n];return t}function fromTypedArray(t,e){var r=0|checked(e.length);t=allocate(t,r);for(var n=0;r>n;n+=1)t[n]=255&e[n];return t}function fromArrayBuffer(t,e){return Buffer.TYPED_ARRAY_SUPPORT?(e.byteLength,t=Buffer._augment(new Uint8Array(e))):t=fromTypedArray(t,new Uint8Array(e)),t}function fromArrayLike(t,e){var r=0|checked(e.length);t=allocate(t,r);for(var n=0;r>n;n+=1)t[n]=255&e[n];return t}function fromJsonObject(t,e){var r,n=0;"Buffer"===e.type&&isArray(e.data)&&(r=e.data,n=0|checked(r.length)),t=allocate(t,n);for(var f=0;n>f;f+=1)t[f]=255&r[f];return t}function allocate(t,e){Buffer.TYPED_ARRAY_SUPPORT?(t=Buffer._augment(new Uint8Array(e)),t.__proto__=Buffer.prototype):(t.length=e,t._isBuffer=!0);var r=0!==e&&e<=Buffer.poolSize>>>1;return r&&(t.parent=rootParent),t}function checked(t){if(t>=kMaxLength())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+kMaxLength().toString(16)+" bytes");return 0|t}function SlowBuffer(t,e){if(!(this instanceof SlowBuffer))return new SlowBuffer(t,e);var r=new Buffer(t,e);return delete r.parent,r}function byteLength(t,e){"string"!=typeof t&&(t=""+t);var r=t.length;if(0===r)return 0;for(var n=!1;;)switch(e){case"ascii":case"binary":case"raw":case"raws":return r;case"utf8":case"utf-8":return utf8ToBytes(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return base64ToBytes(t).length;default:if(n)return utf8ToBytes(t).length;e=(""+e).toLowerCase(),n=!0}}function slowToString(t,e,r){var n=!1;if(e=0|e,r=void 0===r||r===1/0?this.length:0|r,t||(t="utf8"),0>e&&(e=0),r>this.length&&(r=this.length),e>=r)return"";for(;;)switch(t){case"hex":return hexSlice(this,e,r);case"utf8":case"utf-8":return utf8Slice(this,e,r);case"ascii":return asciiSlice(this,e,r);case"binary":return binarySlice(this,e,r);case"base64":return base64Slice(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return utf16leSlice(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function hexWrite(t,e,r,n){r=Number(r)||0;var f=t.length-r;n?(n=Number(n),n>f&&(n=f)):n=f;var i=e.length;if(i%2!==0)throw new Error("Invalid hex string");n>i/2&&(n=i/2);for(var o=0;n>o;o++){var u=parseInt(e.substr(2*o,2),16);if(isNaN(u))throw new Error("Invalid hex string");t[r+o]=u}return o}function utf8Write(t,e,r,n){return blitBuffer(utf8ToBytes(e,t.length-r),t,r,n)}function asciiWrite(t,e,r,n){return blitBuffer(asciiToBytes(e),t,r,n)}function binaryWrite(t,e,r,n){return asciiWrite(t,e,r,n)}function base64Write(t,e,r,n){return blitBuffer(base64ToBytes(e),t,r,n)}function ucs2Write(t,e,r,n){return blitBuffer(utf16leToBytes(e,t.length-r),t,r,n)}function base64Slice(t,e,r){return 0===e&&r===t.length?base64.fromByteArray(t):base64.fromByteArray(t.slice(e,r))}function utf8Slice(t,e,r){r=Math.min(t.length,r);for(var n=[],f=e;r>f;){var i=t[f],o=null,u=i>239?4:i>223?3:i>191?2:1;if(r>=f+u){var s,a,h,c;switch(u){case 1:128>i&&(o=i);break;case 2:s=t[f+1],128===(192&s)&&(c=(31&i)<<6|63&s,c>127&&(o=c));break;case 3:s=t[f+1],a=t[f+2],128===(192&s)&&128===(192&a)&&(c=(15&i)<<12|(63&s)<<6|63&a,c>2047&&(55296>c||c>57343)&&(o=c));break;case 4:s=t[f+1],a=t[f+2],h=t[f+3],128===(192&s)&&128===(192&a)&&128===(192&h)&&(c=(15&i)<<18|(63&s)<<12|(63&a)<<6|63&h,c>65535&&1114112>c&&(o=c))}}null===o?(o=65533,u=1):o>65535&&(o-=65536,n.push(o>>>10&1023|55296),o=56320|1023&o),n.push(o),f+=u}return decodeCodePointsArray(n)}function decodeCodePointsArray(t){var e=t.length;if(MAX_ARGUMENTS_LENGTH>=e)return String.fromCharCode.apply(String,t);for(var r="",n=0;e>n;)r+=String.fromCharCode.apply(String,t.slice(n,n+=MAX_ARGUMENTS_LENGTH));return r}function asciiSlice(t,e,r){var n="";r=Math.min(t.length,r);for(var f=e;r>f;f++)n+=String.fromCharCode(127&t[f]);return n}function binarySlice(t,e,r){var n="";r=Math.min(t.length,r);for(var f=e;r>f;f++)n+=String.fromCharCode(t[f]);return n}function hexSlice(t,e,r){var n=t.length;(!e||0>e)&&(e=0),(!r||0>r||r>n)&&(r=n);for(var f="",i=e;r>i;i++)f+=toHex(t[i]);return f}function utf16leSlice(t,e,r){for(var n=t.slice(e,r),f="",i=0;i<n.length;i+=2)f+=String.fromCharCode(n[i]+256*n[i+1]);return f}function checkOffset(t,e,r){if(t%1!==0||0>t)throw new RangeError("offset is not uint");if(t+e>r)throw new RangeError("Trying to access beyond buffer length")}function checkInt(t,e,r,n,f,i){if(!Buffer.isBuffer(t))throw new TypeError("buffer must be a Buffer instance");if(e>f||i>e)throw new RangeError("value is out of bounds");if(r+n>t.length)throw new RangeError("index out of range")}function objectWriteUInt16(t,e,r,n){0>e&&(e=65535+e+1);for(var f=0,i=Math.min(t.length-r,2);i>f;f++)t[r+f]=(e&255<<8*(n?f:1-f))>>>8*(n?f:1-f)}function objectWriteUInt32(t,e,r,n){0>e&&(e=4294967295+e+1);for(var f=0,i=Math.min(t.length-r,4);i>f;f++)t[r+f]=e>>>8*(n?f:3-f)&255}function checkIEEE754(t,e,r,n,f,i){if(e>f||i>e)throw new RangeError("value is out of bounds");if(r+n>t.length)throw new RangeError("index out of range");if(0>r)throw new RangeError("index out of range")}function writeFloat(t,e,r,n,f){return f||checkIEEE754(t,e,r,4,3.4028234663852886e38,-3.4028234663852886e38),ieee754.write(t,e,r,n,23,4),r+4}function writeDouble(t,e,r,n,f){return f||checkIEEE754(t,e,r,8,1.7976931348623157e308,-1.7976931348623157e308),ieee754.write(t,e,r,n,52,8),r+8}function base64clean(t){if(t=stringtrim(t).replace(INVALID_BASE64_RE,""),t.length<2)return"";for(;t.length%4!==0;)t+="=";return t}function stringtrim(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function toHex(t){return 16>t?"0"+t.toString(16):t.toString(16)}function utf8ToBytes(t,e){e=e||1/0;for(var r,n=t.length,f=null,i=[],o=0;n>o;o++){if(r=t.charCodeAt(o),r>55295&&57344>r){if(!f){if(r>56319){(e-=3)>-1&&i.push(239,191,189);continue}if(o+1===n){(e-=3)>-1&&i.push(239,191,189);continue}f=r;continue}if(56320>r){(e-=3)>-1&&i.push(239,191,189),f=r;continue}r=(f-55296<<10|r-56320)+65536}else f&&(e-=3)>-1&&i.push(239,191,189);if(f=null,128>r){if((e-=1)<0)break;i.push(r)}else if(2048>r){if((e-=2)<0)break;i.push(r>>6|192,63&r|128)}else if(65536>r){if((e-=3)<0)break;i.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(1114112>r))throw new Error("Invalid code point");if((e-=4)<0)break;i.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return i}function asciiToBytes(t){for(var e=[],r=0;r<t.length;r++)e.push(255&t.charCodeAt(r));return e}function utf16leToBytes(t,e){for(var r,n,f,i=[],o=0;o<t.length&&!((e-=2)<0);o++)r=t.charCodeAt(o),n=r>>8,f=r%256,i.push(f),i.push(n);return i}function base64ToBytes(t){return base64.toByteArray(base64clean(t))}function blitBuffer(t,e,r,n){for(var f=0;n>f&&!(f+r>=e.length||f>=t.length);f++)e[f+r]=t[f];return f}var base64=require("base64-js"),ieee754=require("ieee754"),isArray=require("isarray");exports.Buffer=Buffer,exports.SlowBuffer=SlowBuffer,exports.INSPECT_MAX_BYTES=50,Buffer.poolSize=8192;var rootParent={};Buffer.TYPED_ARRAY_SUPPORT=void 0!==global.TYPED_ARRAY_SUPPORT?global.TYPED_ARRAY_SUPPORT:typedArraySupport(),Buffer.TYPED_ARRAY_SUPPORT?(Buffer.prototype.__proto__=Uint8Array.prototype,Buffer.__proto__=Uint8Array):(Buffer.prototype.length=void 0,Buffer.prototype.parent=void 0),Buffer.isBuffer=function(t){return!(null==t||!t._isBuffer)},Buffer.compare=function(t,e){if(!Buffer.isBuffer(t)||!Buffer.isBuffer(e))throw new TypeError("Arguments must be Buffers");if(t===e)return 0;for(var r=t.length,n=e.length,f=0,i=Math.min(r,n);i>f&&t[f]===e[f];)++f;return f!==i&&(r=t[f],n=e[f]),n>r?-1:r>n?1:0},Buffer.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"raw":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},Buffer.concat=function(t,e){if(!isArray(t))throw new TypeError("list argument must be an Array of Buffers.");if(0===t.length)return new Buffer(0);var r;if(void 0===e)for(e=0,r=0;r<t.length;r++)e+=t[r].length;var n=new Buffer(e),f=0;for(r=0;r<t.length;r++){var i=t[r];i.copy(n,f),f+=i.length}return n},Buffer.byteLength=byteLength,Buffer.prototype.toString=function(){var t=0|this.length;return 0===t?"":0===arguments.length?utf8Slice(this,0,t):slowToString.apply(this,arguments)},Buffer.prototype.equals=function(t){if(!Buffer.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t?!0:0===Buffer.compare(this,t)},Buffer.prototype.inspect=function(){var t="",e=exports.INSPECT_MAX_BYTES;return this.length>0&&(t=this.toString("hex",0,e).match(/.{2}/g).join(" "),this.length>e&&(t+=" ... ")),"<Buffer "+t+">"},Buffer.prototype.compare=function(t){if(!Buffer.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t?0:Buffer.compare(this,t)},Buffer.prototype.indexOf=function(t,e){function r(t,e,r){for(var n=-1,f=0;r+f<t.length;f++)if(t[r+f]===e[-1===n?0:f-n]){if(-1===n&&(n=f),f-n+1===e.length)return r+n}else n=-1;return-1}if(e>2147483647?e=2147483647:-2147483648>e&&(e=-2147483648),e>>=0,0===this.length)return-1;if(e>=this.length)return-1;if(0>e&&(e=Math.max(this.length+e,0)),"string"==typeof t)return 0===t.length?-1:String.prototype.indexOf.call(this,t,e);if(Buffer.isBuffer(t))return r(this,t,e);if("number"==typeof t)return Buffer.TYPED_ARRAY_SUPPORT&&"function"===Uint8Array.prototype.indexOf?Uint8Array.prototype.indexOf.call(this,t,e):r(this,[t],e);throw new TypeError("val must be string, number or Buffer")},Buffer.prototype.get=function(t){return console.log(".get() is deprecated. Access using array indexes instead."),this.readUInt8(t)},Buffer.prototype.set=function(t,e){return console.log(".set() is deprecated. Access using array indexes instead."),this.writeUInt8(t,e)},Buffer.prototype.write=function(t,e,r,n){if(void 0===e)n="utf8",r=this.length,e=0;else if(void 0===r&&"string"==typeof e)n=e,r=this.length,e=0;else if(isFinite(e))e=0|e,isFinite(r)?(r=0|r,void 0===n&&(n="utf8")):(n=r,r=void 0);else{var f=n;n=e,e=0|r,r=f}var i=this.length-e;if((void 0===r||r>i)&&(r=i),t.length>0&&(0>r||0>e)||e>this.length)throw new RangeError("attempt to write outside buffer bounds");n||(n="utf8");for(var o=!1;;)switch(n){case"hex":return hexWrite(this,t,e,r);case"utf8":case"utf-8":return utf8Write(this,t,e,r);case"ascii":return asciiWrite(this,t,e,r);case"binary":return binaryWrite(this,t,e,r);case"base64":return base64Write(this,t,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ucs2Write(this,t,e,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},Buffer.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var MAX_ARGUMENTS_LENGTH=4096;Buffer.prototype.slice=function(t,e){var r=this.length;t=~~t,e=void 0===e?r:~~e,0>t?(t+=r,0>t&&(t=0)):t>r&&(t=r),0>e?(e+=r,0>e&&(e=0)):e>r&&(e=r),t>e&&(e=t);var n;if(Buffer.TYPED_ARRAY_SUPPORT)n=Buffer._augment(this.subarray(t,e));else{var f=e-t;n=new Buffer(f,void 0);for(var i=0;f>i;i++)n[i]=this[i+t]}return n.length&&(n.parent=this.parent||this),n},Buffer.prototype.readUIntLE=function(t,e,r){t=0|t,e=0|e,r||checkOffset(t,e,this.length);for(var n=this[t],f=1,i=0;++i<e&&(f*=256);)n+=this[t+i]*f;return n},Buffer.prototype.readUIntBE=function(t,e,r){t=0|t,e=0|e,r||checkOffset(t,e,this.length);for(var n=this[t+--e],f=1;e>0&&(f*=256);)n+=this[t+--e]*f;return n},Buffer.prototype.readUInt8=function(t,e){return e||checkOffset(t,1,this.length),this[t]},Buffer.prototype.readUInt16LE=function(t,e){return e||checkOffset(t,2,this.length),this[t]|this[t+1]<<8},Buffer.prototype.readUInt16BE=function(t,e){return e||checkOffset(t,2,this.length),this[t]<<8|this[t+1]},Buffer.prototype.readUInt32LE=function(t,e){return e||checkOffset(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},Buffer.prototype.readUInt32BE=function(t,e){return e||checkOffset(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},Buffer.prototype.readIntLE=function(t,e,r){t=0|t,e=0|e,r||checkOffset(t,e,this.length);for(var n=this[t],f=1,i=0;++i<e&&(f*=256);)n+=this[t+i]*f;return f*=128,n>=f&&(n-=Math.pow(2,8*e)),n},Buffer.prototype.readIntBE=function(t,e,r){t=0|t,e=0|e,r||checkOffset(t,e,this.length);for(var n=e,f=1,i=this[t+--n];n>0&&(f*=256);)i+=this[t+--n]*f;return f*=128,i>=f&&(i-=Math.pow(2,8*e)),i},Buffer.prototype.readInt8=function(t,e){return e||checkOffset(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},Buffer.prototype.readInt16LE=function(t,e){e||checkOffset(t,2,this.length);var r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},Buffer.prototype.readInt16BE=function(t,e){e||checkOffset(t,2,this.length);var r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},Buffer.prototype.readInt32LE=function(t,e){return e||checkOffset(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},Buffer.prototype.readInt32BE=function(t,e){return e||checkOffset(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},Buffer.prototype.readFloatLE=function(t,e){return e||checkOffset(t,4,this.length),ieee754.read(this,t,!0,23,4)},Buffer.prototype.readFloatBE=function(t,e){return e||checkOffset(t,4,this.length),ieee754.read(this,t,!1,23,4)},Buffer.prototype.readDoubleLE=function(t,e){return e||checkOffset(t,8,this.length),ieee754.read(this,t,!0,52,8)},Buffer.prototype.readDoubleBE=function(t,e){return e||checkOffset(t,8,this.length),ieee754.read(this,t,!1,52,8)},Buffer.prototype.writeUIntLE=function(t,e,r,n){t=+t,e=0|e,r=0|r,n||checkInt(this,t,e,r,Math.pow(2,8*r),0);var f=1,i=0;for(this[e]=255&t;++i<r&&(f*=256);)this[e+i]=t/f&255;return e+r},Buffer.prototype.writeUIntBE=function(t,e,r,n){t=+t,e=0|e,r=0|r,n||checkInt(this,t,e,r,Math.pow(2,8*r),0);var f=r-1,i=1;for(this[e+f]=255&t;--f>=0&&(i*=256);)this[e+f]=t/i&255;return e+r},Buffer.prototype.writeUInt8=function(t,e,r){return t=+t,e=0|e,r||checkInt(this,t,e,1,255,0),Buffer.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[e]=255&t,e+1},Buffer.prototype.writeUInt16LE=function(t,e,r){return t=+t,e=0|e,r||checkInt(this,t,e,2,65535,0),Buffer.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):objectWriteUInt16(this,t,e,!0),e+2},Buffer.prototype.writeUInt16BE=function(t,e,r){return t=+t,e=0|e,r||checkInt(this,t,e,2,65535,0),Buffer.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):objectWriteUInt16(this,t,e,!1),e+2},Buffer.prototype.writeUInt32LE=function(t,e,r){return t=+t,e=0|e,r||checkInt(this,t,e,4,4294967295,0),Buffer.TYPED_ARRAY_SUPPORT?(this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t):objectWriteUInt32(this,t,e,!0),e+4},Buffer.prototype.writeUInt32BE=function(t,e,r){return t=+t,e=0|e,r||checkInt(this,t,e,4,4294967295,0),Buffer.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):objectWriteUInt32(this,t,e,!1),e+4},Buffer.prototype.writeIntLE=function(t,e,r,n){if(t=+t,e=0|e,!n){var f=Math.pow(2,8*r-1);checkInt(this,t,e,r,f-1,-f)}var i=0,o=1,u=0>t?1:0;for(this[e]=255&t;++i<r&&(o*=256);)this[e+i]=(t/o>>0)-u&255;return e+r},Buffer.prototype.writeIntBE=function(t,e,r,n){if(t=+t,e=0|e,!n){var f=Math.pow(2,8*r-1);checkInt(this,t,e,r,f-1,-f)}var i=r-1,o=1,u=0>t?1:0;for(this[e+i]=255&t;--i>=0&&(o*=256);)this[e+i]=(t/o>>0)-u&255;return e+r},Buffer.prototype.writeInt8=function(t,e,r){return t=+t,e=0|e,r||checkInt(this,t,e,1,127,-128),Buffer.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),0>t&&(t=255+t+1),this[e]=255&t,e+1},Buffer.prototype.writeInt16LE=function(t,e,r){return t=+t,e=0|e,r||checkInt(this,t,e,2,32767,-32768),Buffer.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):objectWriteUInt16(this,t,e,!0),e+2},Buffer.prototype.writeInt16BE=function(t,e,r){return t=+t,e=0|e,r||checkInt(this,t,e,2,32767,-32768),Buffer.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):objectWriteUInt16(this,t,e,!1),e+2},Buffer.prototype.writeInt32LE=function(t,e,r){return t=+t,e=0|e,r||checkInt(this,t,e,4,2147483647,-2147483648),Buffer.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24):objectWriteUInt32(this,t,e,!0),e+4},Buffer.prototype.writeInt32BE=function(t,e,r){return t=+t,e=0|e,r||checkInt(this,t,e,4,2147483647,-2147483648),0>t&&(t=4294967295+t+1),Buffer.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):objectWriteUInt32(this,t,e,!1),e+4},Buffer.prototype.writeFloatLE=function(t,e,r){return writeFloat(this,t,e,!0,r)},Buffer.prototype.writeFloatBE=function(t,e,r){return writeFloat(this,t,e,!1,r)},Buffer.prototype.writeDoubleLE=function(t,e,r){return writeDouble(this,t,e,!0,r)},Buffer.prototype.writeDoubleBE=function(t,e,r){return writeDouble(this,t,e,!1,r)},Buffer.prototype.copy=function(t,e,r,n){if(r||(r=0),n||0===n||(n=this.length),e>=t.length&&(e=t.length),e||(e=0),n>0&&r>n&&(n=r),n===r)return 0;if(0===t.length||0===this.length)return 0;if(0>e)throw new RangeError("targetStart out of bounds");if(0>r||r>=this.length)throw new RangeError("sourceStart out of bounds");if(0>n)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),t.length-e<n-r&&(n=t.length-e+r);var f,i=n-r;if(this===t&&e>r&&n>e)for(f=i-1;f>=0;f--)t[f+e]=this[f+r];else if(1e3>i||!Buffer.TYPED_ARRAY_SUPPORT)for(f=0;i>f;f++)t[f+e]=this[f+r];else t._set(this.subarray(r,r+i),e);return i},Buffer.prototype.fill=function(t,e,r){if(t||(t=0),e||(e=0),r||(r=this.length),e>r)throw new RangeError("end < start");if(r!==e&&0!==this.length){if(0>e||e>=this.length)throw new RangeError("start out of bounds");if(0>r||r>this.length)throw new RangeError("end out of bounds");var n;if("number"==typeof t)for(n=e;r>n;n++)this[n]=t;else{var f=utf8ToBytes(t.toString()),i=f.length;for(n=e;r>n;n++)this[n]=f[n%i]}return this}},Buffer.prototype.toArrayBuffer=function(){if("undefined"!=typeof Uint8Array){if(Buffer.TYPED_ARRAY_SUPPORT)return new Buffer(this).buffer;for(var t=new Uint8Array(this.length),e=0,r=t.length;r>e;e+=1)t[e]=this[e];return t.buffer}throw new TypeError("Buffer.toArrayBuffer not supported in this browser")};var BP=Buffer.prototype;Buffer._augment=function(t){return t.constructor=Buffer,t._isBuffer=!0,t._set=t.set,t.get=BP.get,t.set=BP.set,t.write=BP.write,t.toString=BP.toString,t.toLocaleString=BP.toString,t.toJSON=BP.toJSON,t.equals=BP.equals,t.compare=BP.compare,t.indexOf=BP.indexOf,t.copy=BP.copy,t.slice=BP.slice,t.readUIntLE=BP.readUIntLE,t.readUIntBE=BP.readUIntBE,t.readUInt8=BP.readUInt8,t.readUInt16LE=BP.readUInt16LE,t.readUInt16BE=BP.readUInt16BE,t.readUInt32LE=BP.readUInt32LE,t.readUInt32BE=BP.readUInt32BE,t.readIntLE=BP.readIntLE,t.readIntBE=BP.readIntBE,t.readInt8=BP.readInt8,t.readInt16LE=BP.readInt16LE,t.readInt16BE=BP.readInt16BE,t.readInt32LE=BP.readInt32LE,t.readInt32BE=BP.readInt32BE,t.readFloatLE=BP.readFloatLE,t.readFloatBE=BP.readFloatBE,t.readDoubleLE=BP.readDoubleLE,t.readDoubleBE=BP.readDoubleBE,t.writeUInt8=BP.writeUInt8,t.writeUIntLE=BP.writeUIntLE,t.writeUIntBE=BP.writeUIntBE,t.writeUInt16LE=BP.writeUInt16LE,t.writeUInt16BE=BP.writeUInt16BE,t.writeUInt32LE=BP.writeUInt32LE,t.writeUInt32BE=BP.writeUInt32BE,t.writeIntLE=BP.writeIntLE,t.writeIntBE=BP.writeIntBE,t.writeInt8=BP.writeInt8,t.writeInt16LE=BP.writeInt16LE,t.writeInt16BE=BP.writeInt16BE,t.writeInt32LE=BP.writeInt32LE,t.writeInt32BE=BP.writeInt32BE,t.writeFloatLE=BP.writeFloatLE,t.writeFloatBE=BP.writeFloatBE,t.writeDoubleLE=BP.writeDoubleLE,t.writeDoubleBE=BP.writeDoubleBE,t.fill=BP.fill,t.inspect=BP.inspect,t.toArrayBuffer=BP.toArrayBuffer,t};var INVALID_BASE64_RE=/[^+\/0-9A-Za-z-_]/g;

}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})

},{"base64-js":22,"ieee754":34,"isarray":37}],26:[function(require,module,exports){
module.exports={100:"Continue",101:"Switching Protocols",102:"Processing",200:"OK",201:"Created",202:"Accepted",203:"Non-Authoritative Information",204:"No Content",205:"Reset Content",206:"Partial Content",207:"Multi-Status",208:"Already Reported",226:"IM Used",300:"Multiple Choices",301:"Moved Permanently",302:"Found",303:"See Other",304:"Not Modified",305:"Use Proxy",307:"Temporary Redirect",308:"Permanent Redirect",400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",406:"Not Acceptable",407:"Proxy Authentication Required",408:"Request Timeout",409:"Conflict",410:"Gone",411:"Length Required",412:"Precondition Failed",413:"Payload Too Large",414:"URI Too Long",415:"Unsupported Media Type",416:"Range Not Satisfiable",417:"Expectation Failed",418:"I'm a teapot",421:"Misdirected Request",422:"Unprocessable Entity",423:"Locked",424:"Failed Dependency",425:"Unordered Collection",426:"Upgrade Required",428:"Precondition Required",429:"Too Many Requests",431:"Request Header Fields Too Large",500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Timeout",505:"HTTP Version Not Supported",506:"Variant Also Negotiates",507:"Insufficient Storage",508:"Loop Detected",509:"Bandwidth Limit Exceeded",510:"Not Extended",511:"Network Authentication Required"};

},{}],27:[function(require,module,exports){
(function (process,global){
"use strict";var next=global.process&&process.nextTick||global.setImmediate||function(n){setTimeout(n,0)};module.exports=function(n,t){return n?void t.then(function(t){next(function(){n(null,t)})},function(t){next(function(){n(t)})}):t};

}).call(this,require('_process'),typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})

},{"_process":71}],28:[function(require,module,exports){
(function (Buffer){
function isArray(r){return Array.isArray?Array.isArray(r):"[object Array]"===objectToString(r)}function isBoolean(r){return"boolean"==typeof r}function isNull(r){return null===r}function isNullOrUndefined(r){return null==r}function isNumber(r){return"number"==typeof r}function isString(r){return"string"==typeof r}function isSymbol(r){return"symbol"==typeof r}function isUndefined(r){return void 0===r}function isRegExp(r){return"[object RegExp]"===objectToString(r)}function isObject(r){return"object"==typeof r&&null!==r}function isDate(r){return"[object Date]"===objectToString(r)}function isError(r){return"[object Error]"===objectToString(r)||r instanceof Error}function isFunction(r){return"function"==typeof r}function isPrimitive(r){return null===r||"boolean"==typeof r||"number"==typeof r||"string"==typeof r||"symbol"==typeof r||"undefined"==typeof r}function objectToString(r){return Object.prototype.toString.call(r)}exports.isArray=isArray,exports.isBoolean=isBoolean,exports.isNull=isNull,exports.isNullOrUndefined=isNullOrUndefined,exports.isNumber=isNumber,exports.isString=isString,exports.isSymbol=isSymbol,exports.isUndefined=isUndefined,exports.isRegExp=isRegExp,exports.isObject=isObject,exports.isDate=isDate,exports.isError=isError,exports.isFunction=isFunction,exports.isPrimitive=isPrimitive,exports.isBuffer=Buffer.isBuffer;

}).call(this,{"isBuffer":require("../../is-buffer/index.js")})

},{"../../is-buffer/index.js":36}],29:[function(require,module,exports){
function useColors(){return"WebkitAppearance"in document.documentElement.style||window.console&&(console.firebug||console.exception&&console.table)||navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31}function formatArgs(){var o=arguments,e=this.useColors;if(o[0]=(e?"%c":"")+this.namespace+(e?" %c":" ")+o[0]+(e?"%c ":" ")+"+"+exports.humanize(this.diff),!e)return o;var r="color: "+this.color;o=[o[0],r,"color: inherit"].concat(Array.prototype.slice.call(o,1));var t=0,s=0;return o[0].replace(/%[a-z%]/g,function(o){"%%"!==o&&(t++,"%c"===o&&(s=t))}),o.splice(s,0,r),o}function log(){return"object"==typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)}function save(o){try{null==o?exports.storage.removeItem("debug"):exports.storage.debug=o}catch(e){}}function load(){var o;try{o=exports.storage.debug}catch(e){}return o}function localstorage(){try{return window.localStorage}catch(o){}}exports=module.exports=require("./debug"),exports.log=log,exports.formatArgs=formatArgs,exports.save=save,exports.load=load,exports.useColors=useColors,exports.storage="undefined"!=typeof chrome&&"undefined"!=typeof chrome.storage?chrome.storage.local:localstorage(),exports.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"],exports.formatters.j=function(o){return JSON.stringify(o)},exports.enable(load());

},{"./debug":30}],30:[function(require,module,exports){
function selectColor(){return exports.colors[prevColor++%exports.colors.length]}function debug(e){function r(){}function o(){var e=o,r=+new Date,s=r-(prevTime||r);e.diff=s,e.prev=prevTime,e.curr=r,prevTime=r,null==e.useColors&&(e.useColors=exports.useColors()),null==e.color&&e.useColors&&(e.color=selectColor());var t=Array.prototype.slice.call(arguments);t[0]=exports.coerce(t[0]),"string"!=typeof t[0]&&(t=["%o"].concat(t));var n=0;t[0]=t[0].replace(/%([a-z%])/g,function(r,o){if("%%"===r)return r;n++;var s=exports.formatters[o];if("function"==typeof s){var p=t[n];r=s.call(e,p),t.splice(n,1),n--}return r}),"function"==typeof exports.formatArgs&&(t=exports.formatArgs.apply(e,t));var p=o.log||exports.log||console.log.bind(console);p.apply(e,t)}r.enabled=!1,o.enabled=!0;var s=exports.enabled(e)?o:r;return s.namespace=e,s}function enable(e){exports.save(e);for(var r=(e||"").split(/[\s,]+/),o=r.length,s=0;o>s;s++)r[s]&&(e=r[s].replace(/\*/g,".*?"),"-"===e[0]?exports.skips.push(new RegExp("^"+e.substr(1)+"$")):exports.names.push(new RegExp("^"+e+"$")))}function disable(){exports.enable("")}function enabled(e){var r,o;for(r=0,o=exports.skips.length;o>r;r++)if(exports.skips[r].test(e))return!1;for(r=0,o=exports.names.length;o>r;r++)if(exports.names[r].test(e))return!0;return!1}function coerce(e){return e instanceof Error?e.stack||e.message:e}exports=module.exports=debug,exports.coerce=coerce,exports.disable=disable,exports.enable=enable,exports.enabled=enabled,exports.humanize=require("ms"),exports.names=[],exports.skips=[],exports.formatters={};var prevColor=0,prevTime;

},{"ms":68}],31:[function(require,module,exports){
(function (process,global){
/*!
 * @overview es6-promise - a tiny implementation of Promises/A+.
 * @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald)
 * @license   Licensed under MIT license
 *            See https://raw.githubusercontent.com/jakearchibald/es6-promise/master/LICENSE
 * @version   3.1.2
 */
(function(){"use strict";function t(t){return"function"==typeof t||"object"==typeof t&&null!==t}function e(t){return"function"==typeof t}function n(t){W=t}function r(t){H=t}function o(){return function(){process.nextTick(a)}}function i(){return function(){U(a)}}function s(){var t=0,e=new Q(a),n=document.createTextNode("");return e.observe(n,{characterData:!0}),function(){n.data=t=++t%2}}function u(){var t=new MessageChannel;return t.port1.onmessage=a,function(){t.port2.postMessage(0)}}function c(){return function(){setTimeout(a,1)}}function a(){for(var t=0;G>t;t+=2){var e=X[t],n=X[t+1];e(n),X[t]=void 0,X[t+1]=void 0}G=0}function f(){try{var t=require,e=t("vertx");return U=e.runOnLoop||e.runOnContext,i()}catch(n){return c()}}function l(t,e){var n=this,r=n._state;if(r===et&&!t||r===nt&&!e)return this;var o=new this.constructor(p),i=n._result;if(r){var s=arguments[r-1];H(function(){C(r,o,s,i)})}else j(n,o,t,e);return o}function h(t){var e=this;if(t&&"object"==typeof t&&t.constructor===e)return t;var n=new e(p);return g(n,t),n}function p(){}function _(){return new TypeError("You cannot resolve a promise with itself")}function v(){return new TypeError("A promises callback cannot return that same promise.")}function d(t){try{return t.then}catch(e){return rt.error=e,rt}}function y(t,e,n,r){try{t.call(e,n,r)}catch(o){return o}}function m(t,e,n){H(function(t){var r=!1,o=y(n,e,function(n){r||(r=!0,e!==n?g(t,n):E(t,n))},function(e){r||(r=!0,S(t,e))},"Settle: "+(t._label||" unknown promise"));!r&&o&&(r=!0,S(t,o))},t)}function w(t,e){e._state===et?E(t,e._result):e._state===nt?S(t,e._result):j(e,void 0,function(e){g(t,e)},function(e){S(t,e)})}function b(t,n,r){n.constructor===t.constructor&&r===Z&&constructor.resolve===$?w(t,n):r===rt?S(t,rt.error):void 0===r?E(t,n):e(r)?m(t,n,r):E(t,n)}function g(e,n){e===n?S(e,_()):t(n)?b(e,n,d(n)):E(e,n)}function A(t){t._onerror&&t._onerror(t._result),T(t)}function E(t,e){t._state===tt&&(t._result=e,t._state=et,0!==t._subscribers.length&&H(T,t))}function S(t,e){t._state===tt&&(t._state=nt,t._result=e,H(A,t))}function j(t,e,n,r){var o=t._subscribers,i=o.length;t._onerror=null,o[i]=e,o[i+et]=n,o[i+nt]=r,0===i&&t._state&&H(T,t)}function T(t){var e=t._subscribers,n=t._state;if(0!==e.length){for(var r,o,i=t._result,s=0;s<e.length;s+=3)r=e[s],o=e[s+n],r?C(n,r,o,i):o(i);t._subscribers.length=0}}function P(){this.error=null}function x(t,e){try{return t(e)}catch(n){return ot.error=n,ot}}function C(t,n,r,o){var i,s,u,c,a=e(r);if(a){if(i=x(r,o),i===ot?(c=!0,s=i.error,i=null):u=!0,n===i)return void S(n,v())}else i=o,u=!0;n._state!==tt||(a&&u?g(n,i):c?S(n,s):t===et?E(n,i):t===nt&&S(n,i))}function M(t,e){try{e(function(e){g(t,e)},function(e){S(t,e)})}catch(n){S(t,n)}}function O(t){return new ft(this,t).promise}function k(t){function e(t){g(o,t)}function n(t){S(o,t)}var r=this,o=new r(p);if(!B(t))return S(o,new TypeError("You must pass an array to race.")),o;for(var i=t.length,s=0;o._state===tt&&i>s;s++)j(r.resolve(t[s]),void 0,e,n);return o}function Y(t){var e=this,n=new e(p);return S(n,t),n}function q(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}function F(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}function D(t){this._id=ct++,this._state=void 0,this._result=void 0,this._subscribers=[],p!==t&&("function"!=typeof t&&q(),this instanceof D?M(this,t):F())}function K(t,e){this._instanceConstructor=t,this.promise=new t(p),Array.isArray(e)?(this._input=e,this.length=e.length,this._remaining=e.length,this._result=new Array(this.length),0===this.length?E(this.promise,this._result):(this.length=this.length||0,this._enumerate(),0===this._remaining&&E(this.promise,this._result))):S(this.promise,this._validationError())}function L(){var t;if("undefined"!=typeof global)t=global;else if("undefined"!=typeof self)t=self;else try{t=Function("return this")()}catch(e){throw new Error("polyfill failed because global object is unavailable in this environment")}var n=t.Promise;n&&"[object Promise]"===Object.prototype.toString.call(n.resolve())&&!n.cast||(t.Promise=at)}var N;N=Array.isArray?Array.isArray:function(t){return"[object Array]"===Object.prototype.toString.call(t)};var U,W,z,B=N,G=0,H=function(t,e){X[G]=t,X[G+1]=e,G+=2,2===G&&(W?W(a):z())},I="undefined"!=typeof window?window:void 0,J=I||{},Q=J.MutationObserver||J.WebKitMutationObserver,R="undefined"!=typeof process&&"[object process]"==={}.toString.call(process),V="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel,X=new Array(1e3);z=R?o():Q?s():V?u():void 0===I&&"function"==typeof require?f():c();var Z=l,$=h,tt=void 0,et=1,nt=2,rt=new P,ot=new P,it=O,st=k,ut=Y,ct=0,at=D;D.all=it,D.race=st,D.resolve=$,D.reject=ut,D._setScheduler=n,D._setAsap=r,D._asap=H,D.prototype={constructor:D,then:Z,"catch":function(t){return this.then(null,t)}};var ft=K;K.prototype._validationError=function(){return new Error("Array Methods must be provided an Array")},K.prototype._enumerate=function(){for(var t=this.length,e=this._input,n=0;this._state===tt&&t>n;n++)this._eachEntry(e[n],n)},K.prototype._eachEntry=function(t,e){var n=this._instanceConstructor,r=n.resolve;if(r===$){var o=d(t);if(o===Z&&t._state!==tt)this._settledAt(t._state,e,t._result);else if("function"!=typeof o)this._remaining--,this._result[e]=t;else if(n===at){var i=new n(p);b(i,t,o),this._willSettleAt(i,e)}else this._willSettleAt(new n(function(e){e(t)}),e)}else this._willSettleAt(r(t),e)},K.prototype._settledAt=function(t,e,n){var r=this.promise;r._state===tt&&(this._remaining--,t===nt?S(r,n):this._result[e]=n),0===this._remaining&&E(r,this._result)},K.prototype._willSettleAt=function(t,e){var n=this;j(t,void 0,function(t){n._settledAt(et,e,t)},function(t){n._settledAt(nt,e,t)})};var lt=L,ht={Promise:at,polyfill:lt};"function"==typeof define&&define.amd?define(function(){return ht}):"undefined"!=typeof module&&module.exports?module.exports=ht:"undefined"!=typeof this&&(this.ES6Promise=ht),lt()}).call(this);

}).call(this,require('_process'),typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})

},{"_process":71}],32:[function(require,module,exports){
function EventEmitter(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function isFunction(e){return"function"==typeof e}function isNumber(e){return"number"==typeof e}function isObject(e){return"object"==typeof e&&null!==e}function isUndefined(e){return void 0===e}module.exports=EventEmitter,EventEmitter.EventEmitter=EventEmitter,EventEmitter.prototype._events=void 0,EventEmitter.prototype._maxListeners=void 0,EventEmitter.defaultMaxListeners=10,EventEmitter.prototype.setMaxListeners=function(e){if(!isNumber(e)||0>e||isNaN(e))throw TypeError("n must be a positive number");return this._maxListeners=e,this},EventEmitter.prototype.emit=function(e){var t,i,n,s,r,o;if(this._events||(this._events={}),"error"===e&&(!this._events.error||isObject(this._events.error)&&!this._events.error.length)){if(t=arguments[1],t instanceof Error)throw t;throw TypeError('Uncaught, unspecified "error" event.')}if(i=this._events[e],isUndefined(i))return!1;if(isFunction(i))switch(arguments.length){case 1:i.call(this);break;case 2:i.call(this,arguments[1]);break;case 3:i.call(this,arguments[1],arguments[2]);break;default:s=Array.prototype.slice.call(arguments,1),i.apply(this,s)}else if(isObject(i))for(s=Array.prototype.slice.call(arguments,1),o=i.slice(),n=o.length,r=0;n>r;r++)o[r].apply(this,s);return!0},EventEmitter.prototype.addListener=function(e,t){var i;if(!isFunction(t))throw TypeError("listener must be a function");return this._events||(this._events={}),this._events.newListener&&this.emit("newListener",e,isFunction(t.listener)?t.listener:t),this._events[e]?isObject(this._events[e])?this._events[e].push(t):this._events[e]=[this._events[e],t]:this._events[e]=t,isObject(this._events[e])&&!this._events[e].warned&&(i=isUndefined(this._maxListeners)?EventEmitter.defaultMaxListeners:this._maxListeners,i&&i>0&&this._events[e].length>i&&(this._events[e].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[e].length),"function"==typeof console.trace&&console.trace())),this},EventEmitter.prototype.on=EventEmitter.prototype.addListener,EventEmitter.prototype.once=function(e,t){function i(){this.removeListener(e,i),n||(n=!0,t.apply(this,arguments))}if(!isFunction(t))throw TypeError("listener must be a function");var n=!1;return i.listener=t,this.on(e,i),this},EventEmitter.prototype.removeListener=function(e,t){var i,n,s,r;if(!isFunction(t))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;if(i=this._events[e],s=i.length,n=-1,i===t||isFunction(i.listener)&&i.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(isObject(i)){for(r=s;r-- >0;)if(i[r]===t||i[r].listener&&i[r].listener===t){n=r;break}if(0>n)return this;1===i.length?(i.length=0,delete this._events[e]):i.splice(n,1),this._events.removeListener&&this.emit("removeListener",e,t)}return this},EventEmitter.prototype.removeAllListeners=function(e){var t,i;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[e]&&delete this._events[e],this;if(0===arguments.length){for(t in this._events)"removeListener"!==t&&this.removeAllListeners(t);return this.removeAllListeners("removeListener"),this._events={},this}if(i=this._events[e],isFunction(i))this.removeListener(e,i);else if(i)for(;i.length;)this.removeListener(e,i[i.length-1]);return delete this._events[e],this},EventEmitter.prototype.listeners=function(e){var t;return t=this._events&&this._events[e]?isFunction(this._events[e])?[this._events[e]]:this._events[e].slice():[]},EventEmitter.prototype.listenerCount=function(e){if(this._events){var t=this._events[e];if(isFunction(t))return 1;if(t)return t.length}return 0},EventEmitter.listenerCount=function(e,t){return e.listenerCount(t)};

},{}],33:[function(require,module,exports){
var http=require("http"),https=module.exports;for(var key in http)http.hasOwnProperty(key)&&(https[key]=http[key]);https.request=function(t,e){return t||(t={}),t.scheme="https",t.protocol="https:",http.request.call(this,t,e)};

},{"http":87}],34:[function(require,module,exports){
exports.read=function(a,o,t,r,h){var M,p,w=8*h-r-1,f=(1<<w)-1,e=f>>1,i=-7,N=t?h-1:0,n=t?-1:1,s=a[o+N];for(N+=n,M=s&(1<<-i)-1,s>>=-i,i+=w;i>0;M=256*M+a[o+N],N+=n,i-=8);for(p=M&(1<<-i)-1,M>>=-i,i+=r;i>0;p=256*p+a[o+N],N+=n,i-=8);if(0===M)M=1-e;else{if(M===f)return p?NaN:(s?-1:1)*(1/0);p+=Math.pow(2,r),M-=e}return(s?-1:1)*p*Math.pow(2,M-r)},exports.write=function(a,o,t,r,h,M){var p,w,f,e=8*M-h-1,i=(1<<e)-1,N=i>>1,n=23===h?Math.pow(2,-24)-Math.pow(2,-77):0,s=r?0:M-1,u=r?1:-1,l=0>o||0===o&&0>1/o?1:0;for(o=Math.abs(o),isNaN(o)||o===1/0?(w=isNaN(o)?1:0,p=i):(p=Math.floor(Math.log(o)/Math.LN2),o*(f=Math.pow(2,-p))<1&&(p--,f*=2),o+=p+N>=1?n/f:n*Math.pow(2,1-N),o*f>=2&&(p++,f/=2),p+N>=i?(w=0,p=i):p+N>=1?(w=(o*f-1)*Math.pow(2,h),p+=N):(w=o*Math.pow(2,N-1)*Math.pow(2,h),p=0));h>=8;a[t+s]=255&w,s+=u,w/=256,h-=8);for(p=p<<h|w,e+=h;e>0;a[t+s]=255&p,s+=u,p/=256,e-=8);a[t+s-u]|=128*l};

},{}],35:[function(require,module,exports){
"function"==typeof Object.create?module.exports=function(t,e){t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}})}:module.exports=function(t,e){t.super_=e;var o=function(){};o.prototype=e.prototype,t.prototype=new o,t.prototype.constructor=t};

},{}],36:[function(require,module,exports){
module.exports=function(r){return!(null==r||!(r._isBuffer||r.constructor&&"function"==typeof r.constructor.isBuffer&&r.constructor.isBuffer(r)))};

},{}],37:[function(require,module,exports){
var toString={}.toString;module.exports=Array.isArray||function(r){return"[object Array]"==toString.call(r)};

},{}],38:[function(require,module,exports){
"use strict";var yaml=require("./lib/js-yaml.js");module.exports=yaml;

},{"./lib/js-yaml.js":39}],39:[function(require,module,exports){
"use strict";function deprecated(e){return function(){throw new Error("Function "+e+" is deprecated and cannot be used.")}}var loader=require("./js-yaml/loader"),dumper=require("./js-yaml/dumper");module.exports.Type=require("./js-yaml/type"),module.exports.Schema=require("./js-yaml/schema"),module.exports.FAILSAFE_SCHEMA=require("./js-yaml/schema/failsafe"),module.exports.JSON_SCHEMA=require("./js-yaml/schema/json"),module.exports.CORE_SCHEMA=require("./js-yaml/schema/core"),module.exports.DEFAULT_SAFE_SCHEMA=require("./js-yaml/schema/default_safe"),module.exports.DEFAULT_FULL_SCHEMA=require("./js-yaml/schema/default_full"),module.exports.load=loader.load,module.exports.loadAll=loader.loadAll,module.exports.safeLoad=loader.safeLoad,module.exports.safeLoadAll=loader.safeLoadAll,module.exports.dump=dumper.dump,module.exports.safeDump=dumper.safeDump,module.exports.YAMLException=require("./js-yaml/exception"),module.exports.MINIMAL_SCHEMA=require("./js-yaml/schema/failsafe"),module.exports.SAFE_SCHEMA=require("./js-yaml/schema/default_safe"),module.exports.DEFAULT_SCHEMA=require("./js-yaml/schema/default_full"),module.exports.scan=deprecated("scan"),module.exports.parse=deprecated("parse"),module.exports.compose=deprecated("compose"),module.exports.addConstructor=deprecated("addConstructor");

},{"./js-yaml/dumper":41,"./js-yaml/exception":42,"./js-yaml/loader":43,"./js-yaml/schema":45,"./js-yaml/schema/core":46,"./js-yaml/schema/default_full":47,"./js-yaml/schema/default_safe":48,"./js-yaml/schema/failsafe":49,"./js-yaml/schema/json":50,"./js-yaml/type":51}],40:[function(require,module,exports){
"use strict";function isNothing(e){return"undefined"==typeof e||null===e}function isObject(e){return"object"==typeof e&&null!==e}function toArray(e){return Array.isArray(e)?e:isNothing(e)?[]:[e]}function extend(e,t){var r,o,n,i;if(t)for(i=Object.keys(t),r=0,o=i.length;o>r;r+=1)n=i[r],e[n]=t[n];return e}function repeat(e,t){var r,o="";for(r=0;t>r;r+=1)o+=e;return o}function isNegativeZero(e){return 0===e&&Number.NEGATIVE_INFINITY===1/e}module.exports.isNothing=isNothing,module.exports.isObject=isObject,module.exports.toArray=toArray,module.exports.repeat=repeat,module.exports.isNegativeZero=isNegativeZero,module.exports.extend=extend;

},{}],41:[function(require,module,exports){
"use strict";function compileStyleMap(e,t){var n,i,r,E,o,l,a;if(null===t)return{};for(n={},i=Object.keys(t),r=0,E=i.length;E>r;r+=1)o=i[r],l=String(t[o]),"!!"===o.slice(0,2)&&(o="tag:yaml.org,2002:"+o.slice(2)),a=e.compiledTypeMap[o],a&&_hasOwnProperty.call(a.styleAliases,l)&&(l=a.styleAliases[l]),n[o]=l;return n}function encodeHex(e){var t,n,i;if(t=e.toString(16).toUpperCase(),255>=e)n="x",i=2;else if(65535>=e)n="u",i=4;else{if(!(4294967295>=e))throw new YAMLException("code point within a string may not be greater than 0xFFFFFFFF");n="U",i=8}return"\\"+n+common.repeat("0",i-t.length)+t}function State(e){this.schema=e.schema||DEFAULT_FULL_SCHEMA,this.indent=Math.max(1,e.indent||2),this.skipInvalid=e.skipInvalid||!1,this.flowLevel=common.isNothing(e.flowLevel)?-1:e.flowLevel,this.styleMap=compileStyleMap(this.schema,e.styles||null),this.sortKeys=e.sortKeys||!1,this.lineWidth=e.lineWidth||80,this.noRefs=e.noRefs||!1,this.noCompatMode=e.noCompatMode||!1,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}function indentString(e,t){for(var n,i=common.repeat(" ",t),r=0,E=-1,o="",l=e.length;l>r;)E=e.indexOf("\n",r),-1===E?(n=e.slice(r),r=l):(n=e.slice(r,E+1),r=E+1),n.length&&"\n"!==n&&(o+=i),o+=n;return o}function generateNextLine(e,t){return"\n"+common.repeat(" ",e.indent*t)}function testImplicitResolving(e,t){var n,i,r;for(n=0,i=e.implicitTypes.length;i>n;n+=1)if(r=e.implicitTypes[n],r.resolve(t))return!0;return!1}function isWhitespace(e){return e===CHAR_SPACE||e===CHAR_TAB}function isPrintable(e){return e>=32&&126>=e||e>=161&&55295>=e&&8232!==e&&8233!==e||e>=57344&&65533>=e&&65279!==e||e>=65536&&1114111>=e}function isPlainSafe(e){return isPrintable(e)&&65279!==e&&e!==CHAR_COMMA&&e!==CHAR_LEFT_SQUARE_BRACKET&&e!==CHAR_RIGHT_SQUARE_BRACKET&&e!==CHAR_LEFT_CURLY_BRACKET&&e!==CHAR_RIGHT_CURLY_BRACKET&&e!==CHAR_COLON&&e!==CHAR_SHARP}function isPlainSafeFirst(e){return isPrintable(e)&&65279!==e&&!isWhitespace(e)&&e!==CHAR_MINUS&&e!==CHAR_QUESTION&&e!==CHAR_COLON&&e!==CHAR_COMMA&&e!==CHAR_LEFT_SQUARE_BRACKET&&e!==CHAR_RIGHT_SQUARE_BRACKET&&e!==CHAR_LEFT_CURLY_BRACKET&&e!==CHAR_RIGHT_CURLY_BRACKET&&e!==CHAR_SHARP&&e!==CHAR_AMPERSAND&&e!==CHAR_ASTERISK&&e!==CHAR_EXCLAMATION&&e!==CHAR_VERTICAL_LINE&&e!==CHAR_GREATER_THAN&&e!==CHAR_SINGLE_QUOTE&&e!==CHAR_DOUBLE_QUOTE&&e!==CHAR_PERCENT&&e!==CHAR_COMMERCIAL_AT&&e!==CHAR_GRAVE_ACCENT}function chooseScalarStyle(e,t,n,i,r){var E,o,l=!1,a=!1,s=-1!==i,c=-1,A=isPlainSafeFirst(e.charCodeAt(0))&&!isWhitespace(e.charCodeAt(e.length-1));if(t)for(E=0;E<e.length;E++){if(o=e.charCodeAt(E),!isPrintable(o))return STYLE_DOUBLE;A=A&&isPlainSafe(o)}else{for(E=0;E<e.length;E++){if(o=e.charCodeAt(E),o===CHAR_LINE_FEED)l=!0,s&&(a=a||E-c-1>i&&" "!==e[c+1],c=E);else if(!isPrintable(o))return STYLE_DOUBLE;A=A&&isPlainSafe(o)}a=a||s&&E-c-1>i&&" "!==e[c+1]}return l||a?" "===e[0]&&n>9?STYLE_DOUBLE:a?STYLE_FOLDED:STYLE_LITERAL:A&&!r(e)?STYLE_PLAIN:STYLE_SINGLE}function writeScalar(e,t,n,i){e.dump=function(){function r(t){return testImplicitResolving(e,t)}if(0===t.length)return"''";if(!e.noCompatMode&&-1!==DEPRECATED_BOOLEANS_SYNTAX.indexOf(t))return"'"+t+"'";var E=e.indent*Math.max(1,n),o=-1===e.lineWidth?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-E),l=i||e.flowLevel>-1&&n>=e.flowLevel;switch(chooseScalarStyle(t,l,e.indent,o,r)){case STYLE_PLAIN:return t;case STYLE_SINGLE:return"'"+t.replace(/'/g,"''")+"'";case STYLE_LITERAL:return"|"+blockHeader(t,e.indent)+dropEndingNewline(indentString(t,E));case STYLE_FOLDED:return">"+blockHeader(t,e.indent)+dropEndingNewline(indentString(foldString(t,o),E));case STYLE_DOUBLE:return'"'+escapeString(t,o)+'"';default:throw new YAMLException("impossible error: invalid scalar style")}}()}function blockHeader(e,t){var n=" "===e[0]?String(t):"",i="\n"===e[e.length-1],r=i&&("\n"===e[e.length-2]||"\n"===e),E=r?"+":i?"":"-";return n+E+"\n"}function dropEndingNewline(e){return"\n"===e[e.length-1]?e.slice(0,-1):e}function foldString(e,t){for(var n,i,r=/(\n+)([^\n]*)/g,E=function(){var n=e.indexOf("\n");return n=-1!==n?n:e.length,r.lastIndex=n,foldLine(e.slice(0,n),t)}(),o="\n"===e[0]||" "===e[0];i=r.exec(e);){var l=i[1],a=i[2];n=" "===a[0],E+=l+(o||n||""===a?"":"\n")+foldLine(a,t),o=n}return E}function foldLine(e,t){if(""===e||" "===e[0])return e;for(var n,i,r=/ [^ ]/g,E=0,o=0,l=0,a="";n=r.exec(e);)l=n.index,l-E>t&&(i=o>E?o:l,a+="\n"+e.slice(E,i),E=i+1),o=l;return a+="\n",a+=e.length-E>t&&o>E?e.slice(E,o)+"\n"+e.slice(o+1):e.slice(E),a.slice(1)}function escapeString(e){for(var t,n,i="",r=0;r<e.length;r++)t=e.charCodeAt(r),n=ESCAPE_SEQUENCES[t],i+=!n&&isPrintable(t)?e[r]:n||encodeHex(t);return i}function writeFlowSequence(e,t,n){var i,r,E="",o=e.tag;for(i=0,r=n.length;r>i;i+=1)writeNode(e,t,n[i],!1,!1)&&(0!==i&&(E+=", "),E+=e.dump);e.tag=o,e.dump="["+E+"]"}function writeBlockSequence(e,t,n,i){var r,E,o="",l=e.tag;for(r=0,E=n.length;E>r;r+=1)writeNode(e,t+1,n[r],!0,!0)&&(i&&0===r||(o+=generateNextLine(e,t)),o+="- "+e.dump);e.tag=l,e.dump=o||"[]"}function writeFlowMapping(e,t,n){var i,r,E,o,l,a="",s=e.tag,c=Object.keys(n);for(i=0,r=c.length;r>i;i+=1)l="",0!==i&&(l+=", "),E=c[i],o=n[E],writeNode(e,t,E,!1,!1)&&(e.dump.length>1024&&(l+="? "),l+=e.dump+": ",writeNode(e,t,o,!1,!1)&&(l+=e.dump,a+=l));e.tag=s,e.dump="{"+a+"}"}function writeBlockMapping(e,t,n,i){var r,E,o,l,a,s,c="",A=e.tag,u=Object.keys(n);if(e.sortKeys===!0)u.sort();else if("function"==typeof e.sortKeys)u.sort(e.sortKeys);else if(e.sortKeys)throw new YAMLException("sortKeys must be a boolean or a function");for(r=0,E=u.length;E>r;r+=1)s="",i&&0===r||(s+=generateNextLine(e,t)),o=u[r],l=n[o],writeNode(e,t+1,o,!0,!0,!0)&&(a=null!==e.tag&&"?"!==e.tag||e.dump&&e.dump.length>1024,a&&(s+=e.dump&&CHAR_LINE_FEED===e.dump.charCodeAt(0)?"?":"? "),s+=e.dump,a&&(s+=generateNextLine(e,t)),writeNode(e,t+1,l,!0,a)&&(s+=e.dump&&CHAR_LINE_FEED===e.dump.charCodeAt(0)?":":": ",s+=e.dump,c+=s));e.tag=A,e.dump=c||"{}"}function detectType(e,t,n){var i,r,E,o,l,a;for(r=n?e.explicitTypes:e.implicitTypes,E=0,o=r.length;o>E;E+=1)if(l=r[E],(l.instanceOf||l.predicate)&&(!l.instanceOf||"object"==typeof t&&t instanceof l.instanceOf)&&(!l.predicate||l.predicate(t))){if(e.tag=n?l.tag:"?",l.represent){if(a=e.styleMap[l.tag]||l.defaultStyle,"[object Function]"===_toString.call(l.represent))i=l.represent(t,a);else{if(!_hasOwnProperty.call(l.represent,a))throw new YAMLException("!<"+l.tag+'> tag resolver accepts not "'+a+'" style');i=l.represent[a](t,a)}e.dump=i}return!0}return!1}function writeNode(e,t,n,i,r,E){e.tag=null,e.dump=n,detectType(e,n,!1)||detectType(e,n,!0);var o=_toString.call(e.dump);i&&(i=e.flowLevel<0||e.flowLevel>t);var l,a,s="[object Object]"===o||"[object Array]"===o;if(s&&(l=e.duplicates.indexOf(n),a=-1!==l),(null!==e.tag&&"?"!==e.tag||a||2!==e.indent&&t>0)&&(r=!1),a&&e.usedDuplicates[l])e.dump="*ref_"+l;else{if(s&&a&&!e.usedDuplicates[l]&&(e.usedDuplicates[l]=!0),"[object Object]"===o)i&&0!==Object.keys(e.dump).length?(writeBlockMapping(e,t,e.dump,r),a&&(e.dump="&ref_"+l+e.dump)):(writeFlowMapping(e,t,e.dump),a&&(e.dump="&ref_"+l+" "+e.dump));else if("[object Array]"===o)i&&0!==e.dump.length?(writeBlockSequence(e,t,e.dump,r),a&&(e.dump="&ref_"+l+e.dump)):(writeFlowSequence(e,t,e.dump),a&&(e.dump="&ref_"+l+" "+e.dump));else{if("[object String]"!==o){if(e.skipInvalid)return!1;throw new YAMLException("unacceptable kind of an object to dump "+o)}"?"!==e.tag&&writeScalar(e,e.dump,t,E)}null!==e.tag&&"?"!==e.tag&&(e.dump="!<"+e.tag+"> "+e.dump)}return!0}function getDuplicateReferences(e,t){var n,i,r=[],E=[];for(inspectNode(e,r,E),n=0,i=E.length;i>n;n+=1)t.duplicates.push(r[E[n]]);t.usedDuplicates=new Array(i)}function inspectNode(e,t,n){var i,r,E;if(null!==e&&"object"==typeof e)if(r=t.indexOf(e),-1!==r)-1===n.indexOf(r)&&n.push(r);else if(t.push(e),Array.isArray(e))for(r=0,E=e.length;E>r;r+=1)inspectNode(e[r],t,n);else for(i=Object.keys(e),r=0,E=i.length;E>r;r+=1)inspectNode(e[i[r]],t,n)}function dump(e,t){t=t||{};var n=new State(t);return n.noRefs||getDuplicateReferences(e,n),writeNode(n,0,e,!0,!0)?n.dump+"\n":""}function safeDump(e,t){return dump(e,common.extend({schema:DEFAULT_SAFE_SCHEMA},t))}var common=require("./common"),YAMLException=require("./exception"),DEFAULT_FULL_SCHEMA=require("./schema/default_full"),DEFAULT_SAFE_SCHEMA=require("./schema/default_safe"),_toString=Object.prototype.toString,_hasOwnProperty=Object.prototype.hasOwnProperty,CHAR_TAB=9,CHAR_LINE_FEED=10,CHAR_SPACE=32,CHAR_EXCLAMATION=33,CHAR_DOUBLE_QUOTE=34,CHAR_SHARP=35,CHAR_PERCENT=37,CHAR_AMPERSAND=38,CHAR_SINGLE_QUOTE=39,CHAR_ASTERISK=42,CHAR_COMMA=44,CHAR_MINUS=45,CHAR_COLON=58,CHAR_GREATER_THAN=62,CHAR_QUESTION=63,CHAR_COMMERCIAL_AT=64,CHAR_LEFT_SQUARE_BRACKET=91,CHAR_RIGHT_SQUARE_BRACKET=93,CHAR_GRAVE_ACCENT=96,CHAR_LEFT_CURLY_BRACKET=123,CHAR_VERTICAL_LINE=124,CHAR_RIGHT_CURLY_BRACKET=125,ESCAPE_SEQUENCES={};ESCAPE_SEQUENCES[0]="\\0",ESCAPE_SEQUENCES[7]="\\a",ESCAPE_SEQUENCES[8]="\\b",ESCAPE_SEQUENCES[9]="\\t",ESCAPE_SEQUENCES[10]="\\n",ESCAPE_SEQUENCES[11]="\\v",ESCAPE_SEQUENCES[12]="\\f",ESCAPE_SEQUENCES[13]="\\r",ESCAPE_SEQUENCES[27]="\\e",ESCAPE_SEQUENCES[34]='\\"',ESCAPE_SEQUENCES[92]="\\\\",ESCAPE_SEQUENCES[133]="\\N",ESCAPE_SEQUENCES[160]="\\_",ESCAPE_SEQUENCES[8232]="\\L",ESCAPE_SEQUENCES[8233]="\\P";var DEPRECATED_BOOLEANS_SYNTAX=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],STYLE_PLAIN=1,STYLE_SINGLE=2,STYLE_LITERAL=3,STYLE_FOLDED=4,STYLE_DOUBLE=5;module.exports.dump=dump,module.exports.safeDump=safeDump;

},{"./common":40,"./exception":42,"./schema/default_full":47,"./schema/default_safe":48}],42:[function(require,module,exports){
"use strict";function YAMLException(t,r){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack||"",this.name="YAMLException",this.reason=t,this.mark=r,this.message=(this.reason||"(unknown reason)")+(this.mark?" "+this.mark.toString():"")}YAMLException.prototype=Object.create(Error.prototype),YAMLException.prototype.constructor=YAMLException,YAMLException.prototype.toString=function(t){var r=this.name+": ";return r+=this.reason||"(unknown reason)",!t&&this.mark&&(r+=" "+this.mark.toString()),r},module.exports=YAMLException;

},{}],43:[function(require,module,exports){
"use strict";function is_EOL(e){return 10===e||13===e}function is_WHITE_SPACE(e){return 9===e||32===e}function is_WS_OR_EOL(e){return 9===e||32===e||10===e||13===e}function is_FLOW_INDICATOR(e){return 44===e||91===e||93===e||123===e||125===e}function fromHexCode(e){var t;return e>=48&&57>=e?e-48:(t=32|e,t>=97&&102>=t?t-97+10:-1)}function escapedHexLen(e){return 120===e?2:117===e?4:85===e?8:0}function fromDecimalCode(e){return e>=48&&57>=e?e-48:-1}function simpleEscapeSequence(e){return 48===e?"\x00":97===e?"":98===e?"\b":116===e?"   ":9===e?"   ":110===e?"\n":118===e?"\x0B":102===e?"\f":114===e?"\r":101===e?"":32===e?" ":34===e?'"':47===e?"/":92===e?"\\":78===e?"":95===e?" ":76===e?"\u2028":80===e?"\u2029":""}function charFromCodepoint(e){return 65535>=e?String.fromCharCode(e):String.fromCharCode((e-65536>>10)+55296,(e-65536&1023)+56320)}function State(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||DEFAULT_FULL_SCHEMA,this.onWarning=t.onWarning||null,this.legacy=t.legacy||!1,this.json=t.json||!1,this.listener=t.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=e.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.documents=[]}function generateError(e,t){return new YAMLException(t,new Mark(e.filename,e.input,e.position,e.line,e.position-e.lineStart))}function throwError(e,t){throw generateError(e,t)}function throwWarning(e,t){e.onWarning&&e.onWarning.call(null,generateError(e,t))}function captureSegment(e,t,n,i){var o,r,a,s;if(n>t){if(s=e.input.slice(t,n),i)for(o=0,r=s.length;r>o;o+=1)a=s.charCodeAt(o),9===a||a>=32&&1114111>=a||throwError(e,"expected valid JSON character");else PATTERN_NON_PRINTABLE.test(s)&&throwError(e,"the stream contains non-printable characters");e.result+=s}}function mergeMappings(e,t,n,i){var o,r,a,s;for(common.isObject(n)||throwError(e,"cannot merge mappings; the provided source object is unacceptable"),o=Object.keys(n),a=0,s=o.length;s>a;a+=1)r=o[a],_hasOwnProperty.call(t,r)||(t[r]=n[r],i[r]=!0)}function storeMappingPair(e,t,n,i,o,r){var a,s;if(o=String(o),null===t&&(t={}),"tag:yaml.org,2002:merge"===i)if(Array.isArray(r))for(a=0,s=r.length;s>a;a+=1)mergeMappings(e,t,r[a],n);else mergeMappings(e,t,r,n);else e.json||_hasOwnProperty.call(n,o)||!_hasOwnProperty.call(t,o)||throwError(e,"duplicated mapping key"),t[o]=r,delete n[o];return t}function readLineBreak(e){var t;t=e.input.charCodeAt(e.position),10===t?e.position++:13===t?(e.position++,10===e.input.charCodeAt(e.position)&&e.position++):throwError(e,"a line break is expected"),e.line+=1,e.lineStart=e.position}function skipSeparationSpace(e,t,n){for(var i=0,o=e.input.charCodeAt(e.position);0!==o;){for(;is_WHITE_SPACE(o);)o=e.input.charCodeAt(++e.position);if(t&&35===o)do o=e.input.charCodeAt(++e.position);while(10!==o&&13!==o&&0!==o);if(!is_EOL(o))break;for(readLineBreak(e),o=e.input.charCodeAt(e.position),i++,e.lineIndent=0;32===o;)e.lineIndent++,o=e.input.charCodeAt(++e.position)}return-1!==n&&0!==i&&e.lineIndent<n&&throwWarning(e,"deficient indentation"),i}function testDocumentSeparator(e){var t,n=e.position;return t=e.input.charCodeAt(n),(45===t||46===t)&&t===e.input.charCodeAt(n+1)&&t===e.input.charCodeAt(n+2)&&(n+=3,t=e.input.charCodeAt(n),0===t||is_WS_OR_EOL(t))}function writeFoldedLines(e,t){1===t?e.result+=" ":t>1&&(e.result+=common.repeat("\n",t-1))}function readPlainScalar(e,t,n){var i,o,r,a,s,p,c,l,u,d=e.kind,h=e.result;if(u=e.input.charCodeAt(e.position),is_WS_OR_EOL(u)||is_FLOW_INDICATOR(u)||35===u||38===u||42===u||33===u||124===u||62===u||39===u||34===u||37===u||64===u||96===u)return!1;if((63===u||45===u)&&(o=e.input.charCodeAt(e.position+1),is_WS_OR_EOL(o)||n&&is_FLOW_INDICATOR(o)))return!1;for(e.kind="scalar",e.result="",r=a=e.position,s=!1;0!==u;){if(58===u){if(o=e.input.charCodeAt(e.position+1),is_WS_OR_EOL(o)||n&&is_FLOW_INDICATOR(o))break}else if(35===u){if(i=e.input.charCodeAt(e.position-1),is_WS_OR_EOL(i))break}else{if(e.position===e.lineStart&&testDocumentSeparator(e)||n&&is_FLOW_INDICATOR(u))break;if(is_EOL(u)){if(p=e.line,c=e.lineStart,l=e.lineIndent,skipSeparationSpace(e,!1,-1),e.lineIndent>=t){s=!0,u=e.input.charCodeAt(e.position);continue}e.position=a,e.line=p,e.lineStart=c,e.lineIndent=l;break}}s&&(captureSegment(e,r,a,!1),writeFoldedLines(e,e.line-p),r=a=e.position,s=!1),is_WHITE_SPACE(u)||(a=e.position+1),u=e.input.charCodeAt(++e.position)}return captureSegment(e,r,a,!1),e.result?!0:(e.kind=d,e.result=h,!1)}function readSingleQuotedScalar(e,t){var n,i,o;if(n=e.input.charCodeAt(e.position),39!==n)return!1;for(e.kind="scalar",e.result="",e.position++,i=o=e.position;0!==(n=e.input.charCodeAt(e.position));)if(39===n){if(captureSegment(e,i,e.position,!0),n=e.input.charCodeAt(++e.position),39!==n)return!0;i=o=e.position,e.position++}else is_EOL(n)?(captureSegment(e,i,o,!0),writeFoldedLines(e,skipSeparationSpace(e,!1,t)),i=o=e.position):e.position===e.lineStart&&testDocumentSeparator(e)?throwError(e,"unexpected end of the document within a single quoted scalar"):(e.position++,o=e.position);throwError(e,"unexpected end of the stream within a single quoted scalar")}function readDoubleQuotedScalar(e,t){var n,i,o,r,a,s;if(s=e.input.charCodeAt(e.position),34!==s)return!1;for(e.kind="scalar",e.result="",e.position++,n=i=e.position;0!==(s=e.input.charCodeAt(e.position));){if(34===s)return captureSegment(e,n,e.position,!0),e.position++,!0;if(92===s){if(captureSegment(e,n,e.position,!0),s=e.input.charCodeAt(++e.position),is_EOL(s))skipSeparationSpace(e,!1,t);else if(256>s&&simpleEscapeCheck[s])e.result+=simpleEscapeMap[s],e.position++;else if((a=escapedHexLen(s))>0){for(o=a,r=0;o>0;o--)s=e.input.charCodeAt(++e.position),(a=fromHexCode(s))>=0?r=(r<<4)+a:throwError(e,"expected hexadecimal character");e.result+=charFromCodepoint(r),e.position++}else throwError(e,"unknown escape sequence");n=i=e.position}else is_EOL(s)?(captureSegment(e,n,i,!0),writeFoldedLines(e,skipSeparationSpace(e,!1,t)),n=i=e.position):e.position===e.lineStart&&testDocumentSeparator(e)?throwError(e,"unexpected end of the document within a double quoted scalar"):(e.position++,i=e.position)}throwError(e,"unexpected end of the stream within a double quoted scalar")}function readFlowCollection(e,t){var n,i,o,r,a,s,p,c,l,u,d,h=!0,f=e.tag,_=e.anchor,A={};if(d=e.input.charCodeAt(e.position),91===d)r=93,p=!1,i=[];else{if(123!==d)return!1;r=125,p=!0,i={}}for(null!==e.anchor&&(e.anchorMap[e.anchor]=i),d=e.input.charCodeAt(++e.position);0!==d;){if(skipSeparationSpace(e,!0,t),d=e.input.charCodeAt(e.position),d===r)return e.position++,e.tag=f,e.anchor=_,e.kind=p?"mapping":"sequence",e.result=i,!0;h||throwError(e,"missed comma between flow collection entries"),l=c=u=null,a=s=!1,63===d&&(o=e.input.charCodeAt(e.position+1),is_WS_OR_EOL(o)&&(a=s=!0,e.position++,skipSeparationSpace(e,!0,t))),n=e.line,composeNode(e,t,CONTEXT_FLOW_IN,!1,!0),l=e.tag,c=e.result,skipSeparationSpace(e,!0,t),d=e.input.charCodeAt(e.position),!s&&e.line!==n||58!==d||(a=!0,d=e.input.charCodeAt(++e.position),skipSeparationSpace(e,!0,t),composeNode(e,t,CONTEXT_FLOW_IN,!1,!0),u=e.result),p?storeMappingPair(e,i,A,l,c,u):a?i.push(storeMappingPair(e,null,A,l,c,u)):i.push(c),skipSeparationSpace(e,!0,t),d=e.input.charCodeAt(e.position),44===d?(h=!0,d=e.input.charCodeAt(++e.position)):h=!1}throwError(e,"unexpected end of the stream within a flow collection")}function readBlockScalar(e,t){var n,i,o,r,a=CHOMPING_CLIP,s=!1,p=!1,c=t,l=0,u=!1;if(r=e.input.charCodeAt(e.position),124===r)i=!1;else{if(62!==r)return!1;i=!0}for(e.kind="scalar",e.result="";0!==r;)if(r=e.input.charCodeAt(++e.position),43===r||45===r)CHOMPING_CLIP===a?a=43===r?CHOMPING_KEEP:CHOMPING_STRIP:throwError(e,"repeat of a chomping mode identifier");else{if(!((o=fromDecimalCode(r))>=0))break;0===o?throwError(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):p?throwError(e,"repeat of an indentation width identifier"):(c=t+o-1,p=!0)}if(is_WHITE_SPACE(r)){do r=e.input.charCodeAt(++e.position);while(is_WHITE_SPACE(r));if(35===r)do r=e.input.charCodeAt(++e.position);while(!is_EOL(r)&&0!==r)}for(;0!==r;){for(readLineBreak(e),e.lineIndent=0,r=e.input.charCodeAt(e.position);(!p||e.lineIndent<c)&&32===r;)e.lineIndent++,r=e.input.charCodeAt(++e.position);if(!p&&e.lineIndent>c&&(c=e.lineIndent),is_EOL(r))l++;else{if(e.lineIndent<c){a===CHOMPING_KEEP?e.result+=common.repeat("\n",s?1+l:l):a===CHOMPING_CLIP&&s&&(e.result+="\n");break}for(i?is_WHITE_SPACE(r)?(u=!0,e.result+=common.repeat("\n",s?1+l:l)):u?(u=!1,e.result+=common.repeat("\n",l+1)):0===l?s&&(e.result+=" "):e.result+=common.repeat("\n",l):e.result+=common.repeat("\n",s?1+l:l),s=!0,p=!0,l=0,n=e.position;!is_EOL(r)&&0!==r;)r=e.input.charCodeAt(++e.position);captureSegment(e,n,e.position,!1)}}return!0}function readBlockSequence(e,t){var n,i,o,r=e.tag,a=e.anchor,s=[],p=!1;for(null!==e.anchor&&(e.anchorMap[e.anchor]=s),o=e.input.charCodeAt(e.position);0!==o&&45===o&&(i=e.input.charCodeAt(e.position+1),is_WS_OR_EOL(i));)if(p=!0,e.position++,skipSeparationSpace(e,!0,-1)&&e.lineIndent<=t)s.push(null),o=e.input.charCodeAt(e.position);else if(n=e.line,composeNode(e,t,CONTEXT_BLOCK_IN,!1,!0),s.push(e.result),skipSeparationSpace(e,!0,-1),o=e.input.charCodeAt(e.position),(e.line===n||e.lineIndent>t)&&0!==o)throwError(e,"bad indentation of a sequence entry");else if(e.lineIndent<t)break;return p?(e.tag=r,e.anchor=a,e.kind="sequence",e.result=s,!0):!1}function readBlockMapping(e,t,n){var i,o,r,a,s=e.tag,p=e.anchor,c={},l={},u=null,d=null,h=null,f=!1,_=!1;for(null!==e.anchor&&(e.anchorMap[e.anchor]=c),a=e.input.charCodeAt(e.position);0!==a;){if(i=e.input.charCodeAt(e.position+1),r=e.line,63!==a&&58!==a||!is_WS_OR_EOL(i)){if(!composeNode(e,n,CONTEXT_FLOW_OUT,!1,!0))break;if(e.line===r){for(a=e.input.charCodeAt(e.position);is_WHITE_SPACE(a);)a=e.input.charCodeAt(++e.position);if(58===a)a=e.input.charCodeAt(++e.position),is_WS_OR_EOL(a)||throwError(e,"a whitespace character is expected after the key-value separator within a block mapping"),f&&(storeMappingPair(e,c,l,u,d,null),u=d=h=null),_=!0,f=!1,o=!1,u=e.tag,d=e.result;else{if(!_)return e.tag=s,e.anchor=p,!0;throwError(e,"can not read an implicit mapping pair; a colon is missed")}}else{if(!_)return e.tag=s,e.anchor=p,!0;throwError(e,"can not read a block mapping entry; a multiline key may not be an implicit key")}}else 63===a?(f&&(storeMappingPair(e,c,l,u,d,null),u=d=h=null),_=!0,f=!0,o=!0):f?(f=!1,o=!0):throwError(e,"incomplete explicit mapping pair; a key node is missed"),e.position+=1,a=i;if((e.line===r||e.lineIndent>t)&&(composeNode(e,t,CONTEXT_BLOCK_OUT,!0,o)&&(f?d=e.result:h=e.result),f||(storeMappingPair(e,c,l,u,d,h),u=d=h=null),skipSeparationSpace(e,!0,-1),a=e.input.charCodeAt(e.position)),e.lineIndent>t&&0!==a)throwError(e,"bad indentation of a mapping entry");else if(e.lineIndent<t)break}return f&&storeMappingPair(e,c,l,u,d,null),_&&(e.tag=s,e.anchor=p,e.kind="mapping",e.result=c),_}function readTagProperty(e){var t,n,i,o,r=!1,a=!1;if(o=e.input.charCodeAt(e.position),33!==o)return!1;if(null!==e.tag&&throwError(e,"duplication of a tag property"),o=e.input.charCodeAt(++e.position),60===o?(r=!0,o=e.input.charCodeAt(++e.position)):33===o?(a=!0,n="!!",o=e.input.charCodeAt(++e.position)):n="!",t=e.position,r){do o=e.input.charCodeAt(++e.position);while(0!==o&&62!==o);e.position<e.length?(i=e.input.slice(t,e.position),o=e.input.charCodeAt(++e.position)):throwError(e,"unexpected end of the stream within a verbatim tag")}else{for(;0!==o&&!is_WS_OR_EOL(o);)33===o&&(a?throwError(e,"tag suffix cannot contain exclamation marks"):(n=e.input.slice(t-1,e.position+1),PATTERN_TAG_HANDLE.test(n)||throwError(e,"named tag handle cannot contain such characters"),a=!0,t=e.position+1)),o=e.input.charCodeAt(++e.position);i=e.input.slice(t,e.position),PATTERN_FLOW_INDICATORS.test(i)&&throwError(e,"tag suffix cannot contain flow indicator characters")}return i&&!PATTERN_TAG_URI.test(i)&&throwError(e,"tag name cannot contain such characters: "+i),r?e.tag=i:_hasOwnProperty.call(e.tagMap,n)?e.tag=e.tagMap[n]+i:"!"===n?e.tag="!"+i:"!!"===n?e.tag="tag:yaml.org,2002:"+i:throwError(e,'undeclared tag handle "'+n+'"'),!0}function readAnchorProperty(e){var t,n;if(n=e.input.charCodeAt(e.position),38!==n)return!1;for(null!==e.anchor&&throwError(e,"duplication of an anchor property"),n=e.input.charCodeAt(++e.position),t=e.position;0!==n&&!is_WS_OR_EOL(n)&&!is_FLOW_INDICATOR(n);)n=e.input.charCodeAt(++e.position);return e.position===t&&throwError(e,"name of an anchor node must contain at least one character"),e.anchor=e.input.slice(t,e.position),!0}function readAlias(e){var t,n,i;if(i=e.input.charCodeAt(e.position),42!==i)return!1;for(i=e.input.charCodeAt(++e.position),t=e.position;0!==i&&!is_WS_OR_EOL(i)&&!is_FLOW_INDICATOR(i);)i=e.input.charCodeAt(++e.position);return e.position===t&&throwError(e,"name of an alias node must contain at least one character"),n=e.input.slice(t,e.position),e.anchorMap.hasOwnProperty(n)||throwError(e,'unidentified alias "'+n+'"'),e.result=e.anchorMap[n],skipSeparationSpace(e,!0,-1),!0}function composeNode(e,t,n,i,o){var r,a,s,p,c,l,u,d,h=1,f=!1,_=!1;if(null!==e.listener&&e.listener("open",e),e.tag=null,e.anchor=null,e.kind=null,e.result=null,r=a=s=CONTEXT_BLOCK_OUT===n||CONTEXT_BLOCK_IN===n,i&&skipSeparationSpace(e,!0,-1)&&(f=!0,e.lineIndent>t?h=1:e.lineIndent===t?h=0:e.lineIndent<t&&(h=-1)),1===h)for(;readTagProperty(e)||readAnchorProperty(e);)skipSeparationSpace(e,!0,-1)?(f=!0,s=r,e.lineIndent>t?h=1:e.lineIndent===t?h=0:e.lineIndent<t&&(h=-1)):s=!1;if(s&&(s=f||o),1!==h&&CONTEXT_BLOCK_OUT!==n||(u=CONTEXT_FLOW_IN===n||CONTEXT_FLOW_OUT===n?t:t+1,d=e.position-e.lineStart,1===h?s&&(readBlockSequence(e,d)||readBlockMapping(e,d,u))||readFlowCollection(e,u)?_=!0:(a&&readBlockScalar(e,u)||readSingleQuotedScalar(e,u)||readDoubleQuotedScalar(e,u)?_=!0:readAlias(e)?(_=!0,null===e.tag&&null===e.anchor||throwError(e,"alias node should not have any properties")):readPlainScalar(e,u,CONTEXT_FLOW_IN===n)&&(_=!0,null===e.tag&&(e.tag="?")),null!==e.anchor&&(e.anchorMap[e.anchor]=e.result)):0===h&&(_=s&&readBlockSequence(e,d))),null!==e.tag&&"!"!==e.tag)if("?"===e.tag){for(p=0,c=e.implicitTypes.length;c>p;p+=1)if(l=e.implicitTypes[p],l.resolve(e.result)){e.result=l.construct(e.result),e.tag=l.tag,null!==e.anchor&&(e.anchorMap[e.anchor]=e.result);break}}else _hasOwnProperty.call(e.typeMap,e.tag)?(l=e.typeMap[e.tag],null!==e.result&&l.kind!==e.kind&&throwError(e,"unacceptable node kind for !<"+e.tag+'> tag; it should be "'+l.kind+'", not "'+e.kind+'"'),l.resolve(e.result)?(e.result=l.construct(e.result),null!==e.anchor&&(e.anchorMap[e.anchor]=e.result)):throwError(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")):throwError(e,"unknown tag !<"+e.tag+">");return null!==e.listener&&e.listener("close",e),null!==e.tag||null!==e.anchor||_}function readDocument(e){var t,n,i,o,r=e.position,a=!1;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap={},e.anchorMap={};0!==(o=e.input.charCodeAt(e.position))&&(skipSeparationSpace(e,!0,-1),o=e.input.charCodeAt(e.position),!(e.lineIndent>0||37!==o));){for(a=!0,o=e.input.charCodeAt(++e.position),t=e.position;0!==o&&!is_WS_OR_EOL(o);)o=e.input.charCodeAt(++e.position);for(n=e.input.slice(t,e.position),i=[],n.length<1&&throwError(e,"directive name must not be less than one character in length");0!==o;){for(;is_WHITE_SPACE(o);)o=e.input.charCodeAt(++e.position);if(35===o){do o=e.input.charCodeAt(++e.position);while(0!==o&&!is_EOL(o));break}if(is_EOL(o))break;for(t=e.position;0!==o&&!is_WS_OR_EOL(o);)o=e.input.charCodeAt(++e.position);i.push(e.input.slice(t,e.position))}0!==o&&readLineBreak(e),_hasOwnProperty.call(directiveHandlers,n)?directiveHandlers[n](e,n,i):throwWarning(e,'unknown document directive "'+n+'"')}return skipSeparationSpace(e,!0,-1),0===e.lineIndent&&45===e.input.charCodeAt(e.position)&&45===e.input.charCodeAt(e.position+1)&&45===e.input.charCodeAt(e.position+2)?(e.position+=3,skipSeparationSpace(e,!0,-1)):a&&throwError(e,"directives end mark is expected"),composeNode(e,e.lineIndent-1,CONTEXT_BLOCK_OUT,!1,!0),skipSeparationSpace(e,!0,-1),e.checkLineBreaks&&PATTERN_NON_ASCII_LINE_BREAKS.test(e.input.slice(r,e.position))&&throwWarning(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&testDocumentSeparator(e)?void(46===e.input.charCodeAt(e.position)&&(e.position+=3,skipSeparationSpace(e,!0,-1))):void(e.position<e.length-1&&throwError(e,"end of the stream or a document separator is expected"))}function loadDocuments(e,t){e=String(e),t=t||{},0!==e.length&&(10!==e.charCodeAt(e.length-1)&&13!==e.charCodeAt(e.length-1)&&(e+="\n"),65279===e.charCodeAt(0)&&(e=e.slice(1)));var n=new State(e,t);for(n.input+="\x00";32===n.input.charCodeAt(n.position);)n.lineIndent+=1,n.position+=1;for(;n.position<n.length-1;)readDocument(n);return n.documents}function loadAll(e,t,n){var i,o,r=loadDocuments(e,n);for(i=0,o=r.length;o>i;i+=1)t(r[i])}function load(e,t){var n=loadDocuments(e,t);if(0!==n.length){if(1===n.length)return n[0];throw new YAMLException("expected a single document in the stream, but found more")}}function safeLoadAll(e,t,n){loadAll(e,t,common.extend({schema:DEFAULT_SAFE_SCHEMA},n))}function safeLoad(e,t){return load(e,common.extend({schema:DEFAULT_SAFE_SCHEMA},t))}for(var common=require("./common"),YAMLException=require("./exception"),Mark=require("./mark"),DEFAULT_SAFE_SCHEMA=require("./schema/default_safe"),DEFAULT_FULL_SCHEMA=require("./schema/default_full"),_hasOwnProperty=Object.prototype.hasOwnProperty,CONTEXT_FLOW_IN=1,CONTEXT_FLOW_OUT=2,CONTEXT_BLOCK_IN=3,CONTEXT_BLOCK_OUT=4,CHOMPING_CLIP=1,CHOMPING_STRIP=2,CHOMPING_KEEP=3,PATTERN_NON_PRINTABLE=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,PATTERN_NON_ASCII_LINE_BREAKS=/[\x85\u2028\u2029]/,PATTERN_FLOW_INDICATORS=/[,\[\]\{\}]/,PATTERN_TAG_HANDLE=/^(?:!|!!|![a-z\-]+!)$/i,PATTERN_TAG_URI=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i,simpleEscapeCheck=new Array(256),simpleEscapeMap=new Array(256),i=0;256>i;i++)simpleEscapeCheck[i]=simpleEscapeSequence(i)?1:0,simpleEscapeMap[i]=simpleEscapeSequence(i);var directiveHandlers={YAML:function(e,t,n){var i,o,r;null!==e.version&&throwError(e,"duplication of %YAML directive"),1!==n.length&&throwError(e,"YAML directive accepts exactly one argument"),i=/^([0-9]+)\.([0-9]+)$/.exec(n[0]),null===i&&throwError(e,"ill-formed argument of the YAML directive"),o=parseInt(i[1],10),r=parseInt(i[2],10),1!==o&&throwError(e,"unacceptable YAML version of the document"),e.version=n[0],e.checkLineBreaks=2>r,1!==r&&2!==r&&throwWarning(e,"unsupported YAML version of the document")},TAG:function(e,t,n){var i,o;2!==n.length&&throwError(e,"TAG directive accepts exactly two arguments"),i=n[0],o=n[1],PATTERN_TAG_HANDLE.test(i)||throwError(e,"ill-formed tag handle (first argument) of the TAG directive"),_hasOwnProperty.call(e.tagMap,i)&&throwError(e,'there is a previously declared suffix for "'+i+'" tag handle'),PATTERN_TAG_URI.test(o)||throwError(e,"ill-formed tag prefix (second argument) of the TAG directive"),e.tagMap[i]=o}};module.exports.loadAll=loadAll,module.exports.load=load,module.exports.safeLoadAll=safeLoadAll,module.exports.safeLoad=safeLoad;

},{"./common":40,"./exception":42,"./mark":44,"./schema/default_full":47,"./schema/default_safe":48}],44:[function(require,module,exports){
"use strict";function Mark(t,i,n,e,r){this.name=t,this.buffer=i,this.position=n,this.line=e,this.column=r}var common=require("./common");Mark.prototype.getSnippet=function(t,i){var n,e,r,o,s;if(!this.buffer)return null;for(t=t||4,i=i||75,n="",e=this.position;e>0&&-1==="\x00\r\n\u2028\u2029".indexOf(this.buffer.charAt(e-1));)if(e-=1,this.position-e>i/2-1){n=" ... ",e+=5;break}for(r="",o=this.position;o<this.buffer.length&&-1==="\x00\r\n\u2028\u2029".indexOf(this.buffer.charAt(o));)if(o+=1,o-this.position>i/2-1){r=" ... ",o-=5;break}return s=this.buffer.slice(e,o),common.repeat(" ",t)+n+s+r+"\n"+common.repeat(" ",t+this.position-e+n.length)+"^"},Mark.prototype.toString=function(t){var i,n="";return this.name&&(n+='in "'+this.name+'" '),n+="at line "+(this.line+1)+", column "+(this.column+1),t||(i=this.getSnippet(),i&&(n+=":\n"+i)),n},module.exports=Mark;

},{"./common":40}],45:[function(require,module,exports){
"use strict";function compileList(i,e,t){var c=[];return i.include.forEach(function(i){t=compileList(i,e,t)}),i[e].forEach(function(i){t.forEach(function(e,t){e.tag===i.tag&&c.push(t)}),t.push(i)}),t.filter(function(i,e){return-1===c.indexOf(e)})}function compileMap(){function i(i){c[i.tag]=i}var e,t,c={};for(e=0,t=arguments.length;t>e;e+=1)arguments[e].forEach(i);return c}function Schema(i){this.include=i.include||[],this.implicit=i.implicit||[],this.explicit=i.explicit||[],this.implicit.forEach(function(i){if(i.loadKind&&"scalar"!==i.loadKind)throw new YAMLException("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.")}),this.compiledImplicit=compileList(this,"implicit",[]),this.compiledExplicit=compileList(this,"explicit",[]),this.compiledTypeMap=compileMap(this.compiledImplicit,this.compiledExplicit)}var common=require("./common"),YAMLException=require("./exception"),Type=require("./type");Schema.DEFAULT=null,Schema.create=function(){var i,e;switch(arguments.length){case 1:i=Schema.DEFAULT,e=arguments[0];break;case 2:i=arguments[0],e=arguments[1];break;default:throw new YAMLException("Wrong number of arguments for Schema.create function")}if(i=common.toArray(i),e=common.toArray(e),!i.every(function(i){return i instanceof Schema}))throw new YAMLException("Specified list of super schemas (or a single Schema object) contains a non-Schema object.");if(!e.every(function(i){return i instanceof Type}))throw new YAMLException("Specified list of YAML types (or a single Type object) contains a non-Type object.");return new Schema({include:i,explicit:e})},module.exports=Schema;

},{"./common":40,"./exception":42,"./type":51}],46:[function(require,module,exports){
"use strict";var Schema=require("../schema");module.exports=new Schema({include:[require("./json")]});

},{"../schema":45,"./json":50}],47:[function(require,module,exports){
"use strict";var Schema=require("../schema");module.exports=Schema.DEFAULT=new Schema({include:[require("./default_safe")],explicit:[require("../type/js/undefined"),require("../type/js/regexp"),require("../type/js/function")]});

},{"../schema":45,"../type/js/function":56,"../type/js/regexp":57,"../type/js/undefined":58,"./default_safe":48}],48:[function(require,module,exports){
"use strict";var Schema=require("../schema");module.exports=new Schema({include:[require("./core")],implicit:[require("../type/timestamp"),require("../type/merge")],explicit:[require("../type/binary"),require("../type/omap"),require("../type/pairs"),require("../type/set")]});

},{"../schema":45,"../type/binary":52,"../type/merge":60,"../type/omap":62,"../type/pairs":63,"../type/set":65,"../type/timestamp":67,"./core":46}],49:[function(require,module,exports){
"use strict";var Schema=require("../schema");module.exports=new Schema({explicit:[require("../type/str"),require("../type/seq"),require("../type/map")]});

},{"../schema":45,"../type/map":59,"../type/seq":64,"../type/str":66}],50:[function(require,module,exports){
"use strict";var Schema=require("../schema");module.exports=new Schema({include:[require("./failsafe")],implicit:[require("../type/null"),require("../type/bool"),require("../type/int"),require("../type/float")]});

},{"../schema":45,"../type/bool":53,"../type/float":54,"../type/int":55,"../type/null":61,"./failsafe":49}],51:[function(require,module,exports){
"use strict";function compileStyleAliases(e){var t={};return null!==e&&Object.keys(e).forEach(function(n){e[n].forEach(function(e){t[String(e)]=n})}),t}function Type(e,t){if(t=t||{},Object.keys(t).forEach(function(t){if(-1===TYPE_CONSTRUCTOR_OPTIONS.indexOf(t))throw new YAMLException('Unknown option "'+t+'" is met in definition of "'+e+'" YAML type.')}),this.tag=e,this.kind=t.kind||null,this.resolve=t.resolve||function(){return!0},this.construct=t.construct||function(e){return e},this.instanceOf=t.instanceOf||null,this.predicate=t.predicate||null,this.represent=t.represent||null,this.defaultStyle=t.defaultStyle||null,this.styleAliases=compileStyleAliases(t.styleAliases||null),-1===YAML_NODE_KINDS.indexOf(this.kind))throw new YAMLException('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}var YAMLException=require("./exception"),TYPE_CONSTRUCTOR_OPTIONS=["kind","resolve","construct","instanceOf","predicate","represent","defaultStyle","styleAliases"],YAML_NODE_KINDS=["scalar","sequence","mapping"];module.exports=Type;

},{"./exception":42}],52:[function(require,module,exports){
"use strict";function resolveYamlBinary(r){if(null===r)return!1;var e,n,u=0,t=r.length,a=BASE64_MAP;for(n=0;t>n;n++)if(e=a.indexOf(r.charAt(n)),!(e>64)){if(0>e)return!1;u+=6}return u%8===0}function constructYamlBinary(r){var e,n,u=r.replace(/[\r\n=]/g,""),t=u.length,a=BASE64_MAP,f=0,i=[];for(e=0;t>e;e++)e%4===0&&e&&(i.push(f>>16&255),i.push(f>>8&255),i.push(255&f)),f=f<<6|a.indexOf(u.charAt(e));return n=t%4*6,0===n?(i.push(f>>16&255),i.push(f>>8&255),i.push(255&f)):18===n?(i.push(f>>10&255),i.push(f>>2&255)):12===n&&i.push(f>>4&255),NodeBuffer?new NodeBuffer(i):i}function representYamlBinary(r){var e,n,u="",t=0,a=r.length,f=BASE64_MAP;for(e=0;a>e;e++)e%3===0&&e&&(u+=f[t>>18&63],u+=f[t>>12&63],u+=f[t>>6&63],u+=f[63&t]),t=(t<<8)+r[e];return n=a%3,0===n?(u+=f[t>>18&63],u+=f[t>>12&63],u+=f[t>>6&63],u+=f[63&t]):2===n?(u+=f[t>>10&63],u+=f[t>>4&63],u+=f[t<<2&63],u+=f[64]):1===n&&(u+=f[t>>2&63],u+=f[t<<4&63],u+=f[64],u+=f[64]),u}function isBinary(r){return NodeBuffer&&NodeBuffer.isBuffer(r)}var NodeBuffer;try{var _require=require;NodeBuffer=_require("buffer").Buffer}catch(__){}var Type=require("../type"),BASE64_MAP="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r";module.exports=new Type("tag:yaml.org,2002:binary",{kind:"scalar",resolve:resolveYamlBinary,construct:constructYamlBinary,predicate:isBinary,represent:representYamlBinary});

},{"../type":51}],53:[function(require,module,exports){
"use strict";function resolveYamlBoolean(e){if(null===e)return!1;var r=e.length;return 4===r&&("true"===e||"True"===e||"TRUE"===e)||5===r&&("false"===e||"False"===e||"FALSE"===e)}function constructYamlBoolean(e){return"true"===e||"True"===e||"TRUE"===e}function isBoolean(e){return"[object Boolean]"===Object.prototype.toString.call(e)}var Type=require("../type");module.exports=new Type("tag:yaml.org,2002:bool",{kind:"scalar",resolve:resolveYamlBoolean,construct:constructYamlBoolean,predicate:isBoolean,represent:{lowercase:function(e){return e?"true":"false"},uppercase:function(e){return e?"TRUE":"FALSE"},camelcase:function(e){return e?"True":"False"}},defaultStyle:"lowercase"});

},{"../type":51}],54:[function(require,module,exports){
"use strict";function resolveYamlFloat(e){return null===e?!1:!!YAML_FLOAT_PATTERN.test(e)}function constructYamlFloat(e){var r,t,a,n;return r=e.replace(/_/g,"").toLowerCase(),t="-"===r[0]?-1:1,n=[],"+-".indexOf(r[0])>=0&&(r=r.slice(1)),".inf"===r?1===t?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:".nan"===r?NaN:r.indexOf(":")>=0?(r.split(":").forEach(function(e){n.unshift(parseFloat(e,10))}),r=0,a=1,n.forEach(function(e){r+=e*a,a*=60}),t*r):t*parseFloat(r,10)}function representYamlFloat(e,r){var t;if(isNaN(e))switch(r){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===e)switch(r){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===e)switch(r){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(common.isNegativeZero(e))return"-0.0";return t=e.toString(10),SCIENTIFIC_WITHOUT_DOT.test(t)?t.replace("e",".e"):t}function isFloat(e){return"[object Number]"===Object.prototype.toString.call(e)&&(e%1!==0||common.isNegativeZero(e))}var common=require("../common"),Type=require("../type"),YAML_FLOAT_PATTERN=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)\\.[0-9_]*(?:[eE][-+][0-9]+)?|\\.[0-9_]+(?:[eE][-+][0-9]+)?|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\\.[0-9_]*|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"),SCIENTIFIC_WITHOUT_DOT=/^[-+]?[0-9]+e/;module.exports=new Type("tag:yaml.org,2002:float",{kind:"scalar",resolve:resolveYamlFloat,construct:constructYamlFloat,predicate:isFloat,represent:representYamlFloat,defaultStyle:"lowercase"});

},{"../common":40,"../type":51}],55:[function(require,module,exports){
"use strict";function isHexCode(e){return e>=48&&57>=e||e>=65&&70>=e||e>=97&&102>=e}function isOctCode(e){return e>=48&&55>=e}function isDecCode(e){return e>=48&&57>=e}function resolveYamlInteger(e){if(null===e)return!1;var r,t=e.length,n=0,i=!1;if(!t)return!1;if(r=e[n],"-"!==r&&"+"!==r||(r=e[++n]),"0"===r){if(n+1===t)return!0;if(r=e[++n],"b"===r){for(n++;t>n;n++)if(r=e[n],"_"!==r){if("0"!==r&&"1"!==r)return!1;i=!0}return i}if("x"===r){for(n++;t>n;n++)if(r=e[n],"_"!==r){if(!isHexCode(e.charCodeAt(n)))return!1;i=!0}return i}for(;t>n;n++)if(r=e[n],"_"!==r){if(!isOctCode(e.charCodeAt(n)))return!1;i=!0}return i}for(;t>n;n++)if(r=e[n],"_"!==r){if(":"===r)break;if(!isDecCode(e.charCodeAt(n)))return!1;i=!0}return i?":"!==r?!0:/^(:[0-5]?[0-9])+$/.test(e.slice(n)):!1}function constructYamlInteger(e){var r,t,n=e,i=1,o=[];return-1!==n.indexOf("_")&&(n=n.replace(/_/g,"")),r=n[0],"-"!==r&&"+"!==r||("-"===r&&(i=-1),n=n.slice(1),r=n[0]),"0"===n?0:"0"===r?"b"===n[1]?i*parseInt(n.slice(2),2):"x"===n[1]?i*parseInt(n,16):i*parseInt(n,8):-1!==n.indexOf(":")?(n.split(":").forEach(function(e){o.unshift(parseInt(e,10))}),n=0,t=1,o.forEach(function(e){n+=e*t,t*=60}),i*n):i*parseInt(n,10)}function isInteger(e){return"[object Number]"===Object.prototype.toString.call(e)&&e%1===0&&!common.isNegativeZero(e)}var common=require("../common"),Type=require("../type");module.exports=new Type("tag:yaml.org,2002:int",{kind:"scalar",resolve:resolveYamlInteger,construct:constructYamlInteger,predicate:isInteger,represent:{binary:function(e){return"0b"+e.toString(2)},octal:function(e){return"0"+e.toString(8)},decimal:function(e){return e.toString(10)},hexadecimal:function(e){return"0x"+e.toString(16).toUpperCase()}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}});

},{"../common":40,"../type":51}],56:[function(require,module,exports){
"use strict";function resolveJavascriptFunction(e){if(null===e)return!1;try{var r="("+e+")",n=esprima.parse(r,{range:!0});return"Program"===n.type&&1===n.body.length&&"ExpressionStatement"===n.body[0].type&&"FunctionExpression"===n.body[0].expression.type}catch(t){return!1}}function constructJavascriptFunction(e){var r,n="("+e+")",t=esprima.parse(n,{range:!0}),o=[];if("Program"!==t.type||1!==t.body.length||"ExpressionStatement"!==t.body[0].type||"FunctionExpression"!==t.body[0].expression.type)throw new Error("Failed to resolve function");return t.body[0].expression.params.forEach(function(e){o.push(e.name)}),r=t.body[0].expression.body.range,new Function(o,n.slice(r[0]+1,r[1]-1))}function representJavascriptFunction(e){return e.toString()}function isFunction(e){return"[object Function]"===Object.prototype.toString.call(e)}var esprima;try{var _require=require;esprima=_require("esprima")}catch(_){"undefined"!=typeof window&&(esprima=window.esprima)}var Type=require("../../type");module.exports=new Type("tag:yaml.org,2002:js/function",{kind:"scalar",resolve:resolveJavascriptFunction,construct:constructJavascriptFunction,predicate:isFunction,represent:representJavascriptFunction});

},{"../../type":51}],57:[function(require,module,exports){
"use strict";function resolveJavascriptRegExp(e){if(null===e)return!1;if(0===e.length)return!1;var r=e,t=/\/([gim]*)$/.exec(e),n="";if("/"===r[0]){if(t&&(n=t[1]),n.length>3)return!1;if("/"!==r[r.length-n.length-1])return!1}return!0}function constructJavascriptRegExp(e){var r=e,t=/\/([gim]*)$/.exec(e),n="";return"/"===r[0]&&(t&&(n=t[1]),r=r.slice(1,r.length-n.length-1)),new RegExp(r,n)}function representJavascriptRegExp(e){var r="/"+e.source+"/";return e.global&&(r+="g"),e.multiline&&(r+="m"),e.ignoreCase&&(r+="i"),r}function isRegExp(e){return"[object RegExp]"===Object.prototype.toString.call(e)}var Type=require("../../type");module.exports=new Type("tag:yaml.org,2002:js/regexp",{kind:"scalar",resolve:resolveJavascriptRegExp,construct:constructJavascriptRegExp,predicate:isRegExp,represent:representJavascriptRegExp});

},{"../../type":51}],58:[function(require,module,exports){
"use strict";function resolveJavascriptUndefined(){return!0}function constructJavascriptUndefined(){}function representJavascriptUndefined(){return""}function isUndefined(e){return"undefined"==typeof e}var Type=require("../../type");module.exports=new Type("tag:yaml.org,2002:js/undefined",{kind:"scalar",resolve:resolveJavascriptUndefined,construct:constructJavascriptUndefined,predicate:isUndefined,represent:representJavascriptUndefined});

},{"../../type":51}],59:[function(require,module,exports){
"use strict";var Type=require("../type");module.exports=new Type("tag:yaml.org,2002:map",{kind:"mapping",construct:function(e){return null!==e?e:{}}});

},{"../type":51}],60:[function(require,module,exports){
"use strict";function resolveYamlMerge(e){return"<<"===e||null===e}var Type=require("../type");module.exports=new Type("tag:yaml.org,2002:merge",{kind:"scalar",resolve:resolveYamlMerge});

},{"../type":51}],61:[function(require,module,exports){
"use strict";function resolveYamlNull(l){if(null===l)return!0;var e=l.length;return 1===e&&"~"===l||4===e&&("null"===l||"Null"===l||"NULL"===l)}function constructYamlNull(){return null}function isNull(l){return null===l}var Type=require("../type");module.exports=new Type("tag:yaml.org,2002:null",{kind:"scalar",resolve:resolveYamlNull,construct:constructYamlNull,predicate:isNull,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"}},defaultStyle:"lowercase"});

},{"../type":51}],62:[function(require,module,exports){
"use strict";function resolveYamlOmap(r){if(null===r)return!0;var t,e,n,o,u,a=[],l=r;for(t=0,e=l.length;e>t;t+=1){if(n=l[t],u=!1,"[object Object]"!==_toString.call(n))return!1;for(o in n)if(_hasOwnProperty.call(n,o)){if(u)return!1;u=!0}if(!u)return!1;if(-1!==a.indexOf(o))return!1;a.push(o)}return!0}function constructYamlOmap(r){return null!==r?r:[]}var Type=require("../type"),_hasOwnProperty=Object.prototype.hasOwnProperty,_toString=Object.prototype.toString;module.exports=new Type("tag:yaml.org,2002:omap",{kind:"sequence",resolve:resolveYamlOmap,construct:constructYamlOmap});

},{"../type":51}],63:[function(require,module,exports){
"use strict";function resolveYamlPairs(r){if(null===r)return!0;var e,t,n,l,o,a=r;for(o=new Array(a.length),e=0,t=a.length;t>e;e+=1){if(n=a[e],"[object Object]"!==_toString.call(n))return!1;if(l=Object.keys(n),1!==l.length)return!1;o[e]=[l[0],n[l[0]]]}return!0}function constructYamlPairs(r){if(null===r)return[];var e,t,n,l,o,a=r;for(o=new Array(a.length),e=0,t=a.length;t>e;e+=1)n=a[e],l=Object.keys(n),o[e]=[l[0],n[l[0]]];return o}var Type=require("../type"),_toString=Object.prototype.toString;module.exports=new Type("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:resolveYamlPairs,construct:constructYamlPairs});

},{"../type":51}],64:[function(require,module,exports){
"use strict";var Type=require("../type");module.exports=new Type("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(e){return null!==e?e:[]}});

},{"../type":51}],65:[function(require,module,exports){
"use strict";function resolveYamlSet(e){if(null===e)return!0;var r,t=e;for(r in t)if(_hasOwnProperty.call(t,r)&&null!==t[r])return!1;return!0}function constructYamlSet(e){return null!==e?e:{}}var Type=require("../type"),_hasOwnProperty=Object.prototype.hasOwnProperty;module.exports=new Type("tag:yaml.org,2002:set",{kind:"mapping",resolve:resolveYamlSet,construct:constructYamlSet});

},{"../type":51}],66:[function(require,module,exports){
"use strict";var Type=require("../type");module.exports=new Type("tag:yaml.org,2002:str",{kind:"scalar",construct:function(r){return null!==r?r:""}});

},{"../type":51}],67:[function(require,module,exports){
"use strict";function resolveYamlTimestamp(e){return null===e?!1:null!==YAML_DATE_REGEXP.exec(e)?!0:null!==YAML_TIMESTAMP_REGEXP.exec(e)}function constructYamlTimestamp(e){var t,r,n,l,a,m,s,T,i,E,u=0,o=null;if(t=YAML_DATE_REGEXP.exec(e),null===t&&(t=YAML_TIMESTAMP_REGEXP.exec(e)),null===t)throw new Error("Date resolve error");if(r=+t[1],n=+t[2]-1,l=+t[3],!t[4])return new Date(Date.UTC(r,n,l));if(a=+t[4],m=+t[5],s=+t[6],t[7]){for(u=t[7].slice(0,3);u.length<3;)u+="0";u=+u}return t[9]&&(T=+t[10],i=+(t[11]||0),o=6e4*(60*T+i),"-"===t[9]&&(o=-o)),E=new Date(Date.UTC(r,n,l,a,m,s,u)),o&&E.setTime(E.getTime()-o),E}function representYamlTimestamp(e){return e.toISOString()}var Type=require("../type"),YAML_DATE_REGEXP=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),YAML_TIMESTAMP_REGEXP=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");module.exports=new Type("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:resolveYamlTimestamp,construct:constructYamlTimestamp,instanceOf:Date,represent:representYamlTimestamp});

},{"../type":51}],68:[function(require,module,exports){
function parse(e){if(e=""+e,!(e.length>1e4)){var a=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(e);if(a){var r=parseFloat(a[1]),c=(a[2]||"ms").toLowerCase();switch(c){case"years":case"year":case"yrs":case"yr":case"y":return r*y;case"days":case"day":case"d":return r*d;case"hours":case"hour":case"hrs":case"hr":case"h":return r*h;case"minutes":case"minute":case"mins":case"min":case"m":return r*m;case"seconds":case"second":case"secs":case"sec":case"s":return r*s;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r}}}}function short(e){return e>=d?Math.round(e/d)+"d":e>=h?Math.round(e/h)+"h":e>=m?Math.round(e/m)+"m":e>=s?Math.round(e/s)+"s":e+"ms"}function long(e){return plural(e,d,"day")||plural(e,h,"hour")||plural(e,m,"minute")||plural(e,s,"second")||e+" ms"}function plural(s,e,a){return e>s?void 0:1.5*e>s?Math.floor(s/e)+" "+a:Math.ceil(s/e)+" "+a+"s"}var s=1e3,m=60*s,h=60*m,d=24*h,y=365.25*d;module.exports=function(s,e){return e=e||{},"string"==typeof s?parse(s):e["long"]?long(s):short(s)};

},{}],69:[function(require,module,exports){
/**!
 * Ono v2.2.1
 *
 * @link https://github.com/BigstickCarpet/ono
 * @license MIT
 */
"use strict";function create(e){return function(r,t,o,n){var c,a=module.exports.formatter;"string"==typeof r?(c=a.apply(null,arguments),r=t=void 0):c="string"==typeof t?a.apply(null,slice.call(arguments,1)):a.apply(null,slice.call(arguments,2)),r instanceof Error||(t=r,r=void 0),r&&(c+=(c?" \n":"")+r.message);var i=new e(c);return extendError(i,r),extendToJSON(i),extend(i,t),i}}function extendError(e,r){r&&(extendStack(e,r),extend(e,r,!0))}function extendToJSON(e){e.toJSON=errorToJSON,e.inspect=errorToString}function extend(e,r,t){if(r&&"object"==typeof r)for(var o=Object.keys(r),n=0;n<o.length;n++){var c=o[n];if(!(t&&vendorSpecificErrorProperties.indexOf(c)>=0))try{e[c]=r[c]}catch(a){}}}function errorToJSON(){var e={},r=Object.keys(this);r=r.concat(vendorSpecificErrorProperties);for(var t=0;t<r.length;t++){var o=r[t],n=this[o],c=typeof n;"undefined"!==c&&"function"!==c&&(e[o]=n)}return e}function errorToString(){return JSON.stringify(this,null,2).replace(/\\n/g,"\n")}function extendStack(e,r){if(hasLazyStack(r))extendStackProperty(e,r);else{var t=r.stack;t&&(e.stack+=" \n\n"+r.stack)}}function hasLazyStack(e){if(!supportsLazyStack)return!1;var r=Object.getOwnPropertyDescriptor(e,"stack");return r?"function"==typeof r.get:!1}function extendStackProperty(e,r){var t=Object.getOwnPropertyDescriptor(r,"stack");if(t){var o=Object.getOwnPropertyDescriptor(e,"stack");Object.defineProperty(e,"stack",{get:function(){return o.get.apply(e)+" \n\n"+r.stack},enumerable:!1,configurable:!0})}}var util=require("util"),slice=Array.prototype.slice,vendorSpecificErrorProperties=["name","message","description","number","fileName","lineNumber","columnNumber","sourceURL","line","column","stack"];module.exports=create(Error),module.exports.error=create(Error),module.exports.eval=create(EvalError),module.exports.range=create(RangeError),module.exports.reference=create(ReferenceError),module.exports.syntax=create(SyntaxError),module.exports.type=create(TypeError),module.exports.uri=create(URIError),module.exports.formatter=util.format;var supportsLazyStack=function(){return!(!Object.getOwnPropertyDescriptor||!Object.defineProperty||"undefined"!=typeof navigator&&/Android/.test(navigator.userAgent))}();

},{"util":97}],70:[function(require,module,exports){
(function (process){
"use strict";function nextTick(e){for(var s=new Array(arguments.length-1),n=0;n<s.length;)s[n++]=arguments[n];process.nextTick(function(){e.apply(null,s)})}!process.version||0===process.version.indexOf("v0.")||0===process.version.indexOf("v1.")&&0!==process.version.indexOf("v1.8.")?module.exports=nextTick:module.exports=process.nextTick;

}).call(this,require('_process'))

},{"_process":71}],71:[function(require,module,exports){
function cleanUpNextTick(){draining=!1,currentQueue.length?queue=currentQueue.concat(queue):queueIndex=-1,queue.length&&drainQueue()}function drainQueue(){if(!draining){var e=setTimeout(cleanUpNextTick);draining=!0;for(var n=queue.length;n;){for(currentQueue=queue,queue=[];++queueIndex<n;)currentQueue&&currentQueue[queueIndex].run();queueIndex=-1,n=queue.length}currentQueue=null,draining=!1,clearTimeout(e)}}function Item(e,n){this.fun=e,this.array=n}function noop(){}var process=module.exports={},queue=[],draining=!1,currentQueue,queueIndex=-1;process.nextTick=function(e){var n=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)n[r-1]=arguments[r];queue.push(new Item(e,n)),1!==queue.length||draining||setTimeout(drainQueue,0)},Item.prototype.run=function(){this.fun.apply(null,this.array)},process.title="browser",process.browser=!0,process.env={},process.argv=[],process.version="",process.versions={},process.on=noop,process.addListener=noop,process.once=noop,process.off=noop,process.removeListener=noop,process.removeAllListeners=noop,process.emit=noop,process.binding=function(e){throw new Error("process.binding is not supported")},process.cwd=function(){return"/"},process.chdir=function(e){throw new Error("process.chdir is not supported")},process.umask=function(){return 0};

},{}],72:[function(require,module,exports){
(function (global){
/*! https://mths.be/punycode v1.4.1 by @mathias */
!function(e){function o(e){throw new RangeError(T[e])}function n(e,o){for(var n=e.length,r=[];n--;)r[n]=o(e[n]);return r}function r(e,o){var r=e.split("@"),t="";r.length>1&&(t=r[0]+"@",e=r[1]),e=e.replace(S,".");var u=e.split("."),i=n(u,o).join(".");return t+i}function t(e){for(var o,n,r=[],t=0,u=e.length;u>t;)o=e.charCodeAt(t++),o>=55296&&56319>=o&&u>t?(n=e.charCodeAt(t++),56320==(64512&n)?r.push(((1023&o)<<10)+(1023&n)+65536):(r.push(o),t--)):r.push(o);return r}function u(e){return n(e,function(e){var o="";return e>65535&&(e-=65536,o+=P(e>>>10&1023|55296),e=56320|1023&e),o+=P(e)}).join("")}function i(e){return 10>e-48?e-22:26>e-65?e-65:26>e-97?e-97:b}function f(e,o){return e+22+75*(26>e)-((0!=o)<<5)}function c(e,o,n){var r=0;for(e=n?M(e/j):e>>1,e+=M(e/o);e>L*C>>1;r+=b)e=M(e/L);return M(r+(L+1)*e/(e+m))}function l(e){var n,r,t,f,l,s,d,a,p,h,v=[],g=e.length,w=0,m=I,j=A;for(r=e.lastIndexOf(E),0>r&&(r=0),t=0;r>t;++t)e.charCodeAt(t)>=128&&o("not-basic"),v.push(e.charCodeAt(t));for(f=r>0?r+1:0;g>f;){for(l=w,s=1,d=b;f>=g&&o("invalid-input"),a=i(e.charCodeAt(f++)),(a>=b||a>M((x-w)/s))&&o("overflow"),w+=a*s,p=j>=d?y:d>=j+C?C:d-j,!(p>a);d+=b)h=b-p,s>M(x/h)&&o("overflow"),s*=h;n=v.length+1,j=c(w-l,n,0==l),M(w/n)>x-m&&o("overflow"),m+=M(w/n),w%=n,v.splice(w++,0,m)}return u(v)}function s(e){var n,r,u,i,l,s,d,a,p,h,v,g,w,m,j,F=[];for(e=t(e),g=e.length,n=I,r=0,l=A,s=0;g>s;++s)v=e[s],128>v&&F.push(P(v));for(u=i=F.length,i&&F.push(E);g>u;){for(d=x,s=0;g>s;++s)v=e[s],v>=n&&d>v&&(d=v);for(w=u+1,d-n>M((x-r)/w)&&o("overflow"),r+=(d-n)*w,n=d,s=0;g>s;++s)if(v=e[s],n>v&&++r>x&&o("overflow"),v==n){for(a=r,p=b;h=l>=p?y:p>=l+C?C:p-l,!(h>a);p+=b)j=a-h,m=b-h,F.push(P(f(h+j%m,0))),a=M(j/m);F.push(P(f(a,0))),l=c(r,w,u==i),r=0,++u}++r,++n}return F.join("")}function d(e){return r(e,function(e){return F.test(e)?l(e.slice(4).toLowerCase()):e})}function a(e){return r(e,function(e){return O.test(e)?"xn--"+s(e):e})}var p="object"==typeof exports&&exports&&!exports.nodeType&&exports,h="object"==typeof module&&module&&!module.nodeType&&module,v="object"==typeof global&&global;v.global!==v&&v.window!==v&&v.self!==v||(e=v);var g,w,x=2147483647,b=36,y=1,C=26,m=38,j=700,A=72,I=128,E="-",F=/^xn--/,O=/[^\x20-\x7E]/,S=/[\x2E\u3002\uFF0E\uFF61]/g,T={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},L=b-y,M=Math.floor,P=String.fromCharCode;if(g={version:"1.4.1",ucs2:{decode:t,encode:u},decode:l,encode:s,toASCII:a,toUnicode:d},"function"==typeof define&&"object"==typeof define.amd&&define.amd)define("punycode",function(){return g});else if(p&&h)if(module.exports==p)h.exports=g;else for(w in g)g.hasOwnProperty(w)&&(p[w]=g[w]);else e.punycode=g}(this);

}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})

},{}],73:[function(require,module,exports){
"use strict";function hasOwnProperty(r,e){return Object.prototype.hasOwnProperty.call(r,e)}module.exports=function(r,e,t,n){e=e||"&",t=t||"=";var o={};if("string"!=typeof r||0===r.length)return o;var a=/\+/g;r=r.split(e);var s=1e3;n&&"number"==typeof n.maxKeys&&(s=n.maxKeys);var p=r.length;s>0&&p>s&&(p=s);for(var y=0;p>y;++y){var u,c,i,l,f=r[y].replace(a,"%20"),v=f.indexOf(t);v>=0?(u=f.substr(0,v),c=f.substr(v+1)):(u=f,c=""),i=decodeURIComponent(u),l=decodeURIComponent(c),hasOwnProperty(o,i)?isArray(o[i])?o[i].push(l):o[i]=[o[i],l]:o[i]=l}return o};var isArray=Array.isArray||function(r){return"[object Array]"===Object.prototype.toString.call(r)};

},{}],74:[function(require,module,exports){
"use strict";function map(r,e){if(r.map)return r.map(e);for(var t=[],n=0;n<r.length;n++)t.push(e(r[n],n));return t}var stringifyPrimitive=function(r){switch(typeof r){case"string":return r;case"boolean":return r?"true":"false";case"number":return isFinite(r)?r:"";default:return""}};module.exports=function(r,e,t,n){return e=e||"&",t=t||"=",null===r&&(r=void 0),"object"==typeof r?map(objectKeys(r),function(n){var i=encodeURIComponent(stringifyPrimitive(n))+t;return isArray(r[n])?map(r[n],function(r){return i+encodeURIComponent(stringifyPrimitive(r))}).join(e):i+encodeURIComponent(stringifyPrimitive(r[n]))}).join(e):n?encodeURIComponent(stringifyPrimitive(n))+t+encodeURIComponent(stringifyPrimitive(r)):""};var isArray=Array.isArray||function(r){return"[object Array]"===Object.prototype.toString.call(r)},objectKeys=Object.keys||function(r){var e=[];for(var t in r)Object.prototype.hasOwnProperty.call(r,t)&&e.push(t);return e};

},{}],75:[function(require,module,exports){
"use strict";exports.decode=exports.parse=require("./decode"),exports.encode=exports.stringify=require("./encode");

},{"./decode":73,"./encode":74}],76:[function(require,module,exports){
module.exports=require("./lib/_stream_duplex.js");

},{"./lib/_stream_duplex.js":77}],77:[function(require,module,exports){
"use strict";function Duplex(e){return this instanceof Duplex?(Readable.call(this,e),Writable.call(this,e),e&&e.readable===!1&&(this.readable=!1),e&&e.writable===!1&&(this.writable=!1),this.allowHalfOpen=!0,e&&e.allowHalfOpen===!1&&(this.allowHalfOpen=!1),void this.once("end",onend)):new Duplex(e)}function onend(){this.allowHalfOpen||this._writableState.ended||processNextTick(onEndNT,this)}function onEndNT(e){e.end()}function forEach(e,t){for(var r=0,i=e.length;i>r;r++)t(e[r],r)}var objectKeys=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t};module.exports=Duplex;var processNextTick=require("process-nextick-args"),util=require("core-util-is");util.inherits=require("inherits");var Readable=require("./_stream_readable"),Writable=require("./_stream_writable");util.inherits(Duplex,Readable);for(var keys=objectKeys(Writable.prototype),v=0;v<keys.length;v++){var method=keys[v];Duplex.prototype[method]||(Duplex.prototype[method]=Writable.prototype[method])}

},{"./_stream_readable":79,"./_stream_writable":81,"core-util-is":28,"inherits":35,"process-nextick-args":70}],78:[function(require,module,exports){
"use strict";function PassThrough(r){return this instanceof PassThrough?void Transform.call(this,r):new PassThrough(r)}module.exports=PassThrough;var Transform=require("./_stream_transform"),util=require("core-util-is");util.inherits=require("inherits"),util.inherits(PassThrough,Transform),PassThrough.prototype._transform=function(r,s,i){i(null,r)};

},{"./_stream_transform":80,"core-util-is":28,"inherits":35}],79:[function(require,module,exports){
(function (process){
"use strict";function ReadableState(e,t){Duplex=Duplex||require("./_stream_duplex"),e=e||{},this.objectMode=!!e.objectMode,t instanceof Duplex&&(this.objectMode=this.objectMode||!!e.readableObjectMode);var r=e.highWaterMark,n=this.objectMode?16:16384;this.highWaterMark=r||0===r?r:n,this.highWaterMark=~~this.highWaterMark,this.buffer=[],this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.ranOut=!1,this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(StringDecoder||(StringDecoder=require("string_decoder/").StringDecoder),this.decoder=new StringDecoder(e.encoding),this.encoding=e.encoding)}function Readable(e){return Duplex=Duplex||require("./_stream_duplex"),this instanceof Readable?(this._readableState=new ReadableState(e,this),this.readable=!0,e&&"function"==typeof e.read&&(this._read=e.read),void Stream.call(this)):new Readable(e)}function readableAddChunk(e,t,r,n,a){var i=chunkInvalid(t,r);if(i)e.emit("error",i);else if(null===r)t.reading=!1,onEofChunk(e,t);else if(t.objectMode||r&&r.length>0)if(t.ended&&!a){var d=new Error("stream.push() after EOF");e.emit("error",d)}else if(t.endEmitted&&a){var d=new Error("stream.unshift() after end event");e.emit("error",d)}else{var o;!t.decoder||a||n||(r=t.decoder.write(r),o=!t.objectMode&&0===r.length),a||(t.reading=!1),o||(t.flowing&&0===t.length&&!t.sync?(e.emit("data",r),e.read(0)):(t.length+=t.objectMode?1:r.length,a?t.buffer.unshift(r):t.buffer.push(r),t.needReadable&&emitReadable(e))),maybeReadMore(e,t)}else a||(t.reading=!1);return needMoreData(t)}function needMoreData(e){return!e.ended&&(e.needReadable||e.length<e.highWaterMark||0===e.length)}function computeNewHighWaterMark(e){return e>=MAX_HWM?e=MAX_HWM:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}function howMuchToRead(e,t){return 0===t.length&&t.ended?0:t.objectMode?0===e?0:1:null===e||isNaN(e)?t.flowing&&t.buffer.length?t.buffer[0].length:t.length:0>=e?0:(e>t.highWaterMark&&(t.highWaterMark=computeNewHighWaterMark(e)),e>t.length?t.ended?t.length:(t.needReadable=!0,0):e)}function chunkInvalid(e,t){var r=null;return Buffer.isBuffer(t)||"string"==typeof t||null===t||void 0===t||e.objectMode||(r=new TypeError("Invalid non-string/buffer chunk")),r}function onEofChunk(e,t){if(!t.ended){if(t.decoder){var r=t.decoder.end();r&&r.length&&(t.buffer.push(r),t.length+=t.objectMode?1:r.length)}t.ended=!0,emitReadable(e)}}function emitReadable(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(debug("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?processNextTick(emitReadable_,e):emitReadable_(e))}function emitReadable_(e){debug("emit readable"),e.emit("readable"),flow(e)}function maybeReadMore(e,t){t.readingMore||(t.readingMore=!0,processNextTick(maybeReadMore_,e,t))}function maybeReadMore_(e,t){for(var r=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length<t.highWaterMark&&(debug("maybeReadMore read 0"),e.read(0),r!==t.length);)r=t.length;t.readingMore=!1}function pipeOnDrain(e){return function(){var t=e._readableState;debug("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&EElistenerCount(e,"data")&&(t.flowing=!0,flow(e))}}function nReadingNextTick(e){debug("readable nexttick read 0"),e.read(0)}function resume(e,t){t.resumeScheduled||(t.resumeScheduled=!0,processNextTick(resume_,e,t))}function resume_(e,t){t.reading||(debug("resume read 0"),e.read(0)),t.resumeScheduled=!1,e.emit("resume"),flow(e),t.flowing&&!t.reading&&e.read(0)}function flow(e){var t=e._readableState;if(debug("flow",t.flowing),t.flowing)do var r=e.read();while(null!==r&&t.flowing)}function fromList(e,t){var r,n=t.buffer,a=t.length,i=!!t.decoder,d=!!t.objectMode;if(0===n.length)return null;if(0===a)r=null;else if(d)r=n.shift();else if(!e||e>=a)r=i?n.join(""):1===n.length?n[0]:Buffer.concat(n,a),n.length=0;else if(e<n[0].length){var o=n[0];r=o.slice(0,e),n[0]=o.slice(e)}else if(e===n[0].length)r=n.shift();else{r=i?"":new Buffer(e);for(var l=0,u=0,s=n.length;s>u&&e>l;u++){var o=n[0],h=Math.min(e-l,o.length);i?r+=o.slice(0,h):o.copy(r,l,0,h),h<o.length?n[0]=o.slice(h):n.shift(),l+=h}}return r}function endReadable(e){var t=e._readableState;if(t.length>0)throw new Error("endReadable called on non-empty stream");t.endEmitted||(t.ended=!0,processNextTick(endReadableNT,t,e))}function endReadableNT(e,t){e.endEmitted||0!==e.length||(e.endEmitted=!0,t.readable=!1,t.emit("end"))}function forEach(e,t){for(var r=0,n=e.length;n>r;r++)t(e[r],r)}function indexOf(e,t){for(var r=0,n=e.length;n>r;r++)if(e[r]===t)return r;return-1}module.exports=Readable;var processNextTick=require("process-nextick-args"),isArray=require("isarray"),Buffer=require("buffer").Buffer;Readable.ReadableState=ReadableState;var EE=require("events"),EElistenerCount=function(e,t){return e.listeners(t).length},Stream;!function(){try{Stream=require("stream")}catch(e){}finally{Stream||(Stream=require("events").EventEmitter)}}();var Buffer=require("buffer").Buffer,util=require("core-util-is");util.inherits=require("inherits");var debugUtil=require("util"),debug=void 0;debug=debugUtil&&debugUtil.debuglog?debugUtil.debuglog("stream"):function(){};var StringDecoder;util.inherits(Readable,Stream);var Duplex,Duplex;Readable.prototype.push=function(e,t){var r=this._readableState;return r.objectMode||"string"!=typeof e||(t=t||r.defaultEncoding,t!==r.encoding&&(e=new Buffer(e,t),t="")),readableAddChunk(this,r,e,t,!1)},Readable.prototype.unshift=function(e){var t=this._readableState;return readableAddChunk(this,t,e,"",!0)},Readable.prototype.isPaused=function(){return this._readableState.flowing===!1},Readable.prototype.setEncoding=function(e){return StringDecoder||(StringDecoder=require("string_decoder/").StringDecoder),this._readableState.decoder=new StringDecoder(e),this._readableState.encoding=e,this};var MAX_HWM=8388608;Readable.prototype.read=function(e){debug("read",e);var t=this._readableState,r=e;if(("number"!=typeof e||e>0)&&(t.emittedReadable=!1),0===e&&t.needReadable&&(t.length>=t.highWaterMark||t.ended))return debug("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?endReadable(this):emitReadable(this),null;if(e=howMuchToRead(e,t),0===e&&t.ended)return 0===t.length&&endReadable(this),null;var n=t.needReadable;debug("need readable",n),(0===t.length||t.length-e<t.highWaterMark)&&(n=!0,debug("length less than watermark",n)),(t.ended||t.reading)&&(n=!1,debug("reading or ended",n)),n&&(debug("do read"),t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1),n&&!t.reading&&(e=howMuchToRead(r,t));var a;return a=e>0?fromList(e,t):null,null===a&&(t.needReadable=!0,e=0),t.length-=e,0!==t.length||t.ended||(t.needReadable=!0),r!==e&&t.ended&&0===t.length&&endReadable(this),null!==a&&this.emit("data",a),a},Readable.prototype._read=function(e){this.emit("error",new Error("not implemented"))},Readable.prototype.pipe=function(e,t){function r(e){debug("onunpipe"),e===s&&a()}function n(){debug("onend"),e.end()}function a(){debug("cleanup"),e.removeListener("close",o),e.removeListener("finish",l),e.removeListener("drain",c),e.removeListener("error",d),e.removeListener("unpipe",r),s.removeListener("end",n),s.removeListener("end",a),s.removeListener("data",i),b=!0,!h.awaitDrain||e._writableState&&!e._writableState.needDrain||c()}function i(t){debug("ondata");var r=e.write(t);!1===r&&(1!==h.pipesCount||h.pipes[0]!==e||1!==s.listenerCount("data")||b||(debug("false write response, pause",s._readableState.awaitDrain),s._readableState.awaitDrain++),s.pause())}function d(t){debug("onerror",t),u(),e.removeListener("error",d),0===EElistenerCount(e,"error")&&e.emit("error",t)}function o(){e.removeListener("finish",l),u()}function l(){debug("onfinish"),e.removeListener("close",o),u()}function u(){debug("unpipe"),s.unpipe(e)}var s=this,h=this._readableState;switch(h.pipesCount){case 0:h.pipes=e;break;case 1:h.pipes=[h.pipes,e];break;default:h.pipes.push(e)}h.pipesCount+=1,debug("pipe count=%d opts=%j",h.pipesCount,t);var f=(!t||t.end!==!1)&&e!==process.stdout&&e!==process.stderr,p=f?n:a;h.endEmitted?processNextTick(p):s.once("end",p),e.on("unpipe",r);var c=pipeOnDrain(s);e.on("drain",c);var b=!1;return s.on("data",i),e._events&&e._events.error?isArray(e._events.error)?e._events.error.unshift(d):e._events.error=[d,e._events.error]:e.on("error",d),e.once("close",o),e.once("finish",l),e.emit("pipe",s),h.flowing||(debug("pipe resume"),s.resume()),e},Readable.prototype.unpipe=function(e){var t=this._readableState;if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes?this:(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this),this);if(!e){var r=t.pipes,n=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var a=0;n>a;a++)r[a].emit("unpipe",this);return this}var i=indexOf(t.pipes,e);return-1===i?this:(t.pipes.splice(i,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this),this)},Readable.prototype.on=function(e,t){var r=Stream.prototype.on.call(this,e,t);if("data"===e&&!1!==this._readableState.flowing&&this.resume(),"readable"===e&&!this._readableState.endEmitted){var n=this._readableState;n.readableListening||(n.readableListening=!0,n.emittedReadable=!1,n.needReadable=!0,n.reading?n.length&&emitReadable(this,n):processNextTick(nReadingNextTick,this))}return r},Readable.prototype.addListener=Readable.prototype.on,Readable.prototype.resume=function(){var e=this._readableState;return e.flowing||(debug("resume"),e.flowing=!0,resume(this,e)),this},Readable.prototype.pause=function(){return debug("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(debug("pause"),this._readableState.flowing=!1,this.emit("pause")),this},Readable.prototype.wrap=function(e){var t=this._readableState,r=!1,n=this;e.on("end",function(){if(debug("wrapped end"),t.decoder&&!t.ended){var e=t.decoder.end();e&&e.length&&n.push(e)}n.push(null)}),e.on("data",function(a){if(debug("wrapped data"),t.decoder&&(a=t.decoder.write(a)),(!t.objectMode||null!==a&&void 0!==a)&&(t.objectMode||a&&a.length)){var i=n.push(a);i||(r=!0,e.pause())}});for(var a in e)void 0===this[a]&&"function"==typeof e[a]&&(this[a]=function(t){return function(){return e[t].apply(e,arguments)}}(a));var i=["error","close","destroy","pause","resume"];return forEach(i,function(t){e.on(t,n.emit.bind(n,t))}),n._read=function(t){debug("wrapped _read",t),r&&(r=!1,e.resume())},n},Readable._fromList=fromList;

}).call(this,require('_process'))

},{"./_stream_duplex":77,"_process":71,"buffer":25,"core-util-is":28,"events":32,"inherits":35,"isarray":37,"process-nextick-args":70,"stream":86,"string_decoder/":91,"util":23}],80:[function(require,module,exports){
"use strict";function TransformState(r){this.afterTransform=function(t,n){return afterTransform(r,t,n)},this.needTransform=!1,this.transforming=!1,this.writecb=null,this.writechunk=null,this.writeencoding=null}function afterTransform(r,t,n){var e=r._transformState;e.transforming=!1;var i=e.writecb;if(!i)return r.emit("error",new Error("no writecb in Transform class"));e.writechunk=null,e.writecb=null,null!==n&&void 0!==n&&r.push(n),i(t);var a=r._readableState;a.reading=!1,(a.needReadable||a.length<a.highWaterMark)&&r._read(a.highWaterMark)}function Transform(r){if(!(this instanceof Transform))return new Transform(r);Duplex.call(this,r),this._transformState=new TransformState(this);var t=this;this._readableState.needReadable=!0,this._readableState.sync=!1,r&&("function"==typeof r.transform&&(this._transform=r.transform),"function"==typeof r.flush&&(this._flush=r.flush)),this.once("prefinish",function(){"function"==typeof this._flush?this._flush(function(r){done(t,r)}):done(t)})}function done(r,t){if(t)return r.emit("error",t);var n=r._writableState,e=r._transformState;if(n.length)throw new Error("calling transform done when ws.length != 0");if(e.transforming)throw new Error("calling transform done when still transforming");return r.push(null)}module.exports=Transform;var Duplex=require("./_stream_duplex"),util=require("core-util-is");util.inherits=require("inherits"),util.inherits(Transform,Duplex),Transform.prototype.push=function(r,t){return this._transformState.needTransform=!1,Duplex.prototype.push.call(this,r,t)},Transform.prototype._transform=function(r,t,n){throw new Error("not implemented")},Transform.prototype._write=function(r,t,n){var e=this._transformState;if(e.writecb=n,e.writechunk=r,e.writeencoding=t,!e.transforming){var i=this._readableState;(e.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},Transform.prototype._read=function(r){var t=this._transformState;null!==t.writechunk&&t.writecb&&!t.transforming?(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform)):t.needTransform=!0};

},{"./_stream_duplex":77,"core-util-is":28,"inherits":35}],81:[function(require,module,exports){
(function (process){
"use strict";function nop(){}function WriteReq(e,t,r){this.chunk=e,this.encoding=t,this.callback=r,this.next=null}function WritableState(e,t){Duplex=Duplex||require("./_stream_duplex"),e=e||{},this.objectMode=!!e.objectMode,t instanceof Duplex&&(this.objectMode=this.objectMode||!!e.writableObjectMode);var r=e.highWaterMark,i=this.objectMode?16:16384;this.highWaterMark=r||0===r?r:i,this.highWaterMark=~~this.highWaterMark,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1;var n=e.decodeStrings===!1;this.decodeStrings=!n,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){onwrite(t,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new CorkedRequest(this),this.corkedRequestsFree.next=new CorkedRequest(this)}function Writable(e){return Duplex=Duplex||require("./_stream_duplex"),this instanceof Writable||this instanceof Duplex?(this._writableState=new WritableState(e,this),this.writable=!0,e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev)),void Stream.call(this)):new Writable(e)}function writeAfterEnd(e,t){var r=new Error("write after end");e.emit("error",r),processNextTick(t,r)}function validChunk(e,t,r,i){var n=!0;if(!Buffer.isBuffer(r)&&"string"!=typeof r&&null!==r&&void 0!==r&&!t.objectMode){var s=new TypeError("Invalid non-string/buffer chunk");e.emit("error",s),processNextTick(i,s),n=!1}return n}function decodeChunk(e,t,r){return e.objectMode||e.decodeStrings===!1||"string"!=typeof t||(t=new Buffer(t,r)),t}function writeOrBuffer(e,t,r,i,n){r=decodeChunk(t,r,i),Buffer.isBuffer(r)&&(i="buffer");var s=t.objectMode?1:r.length;t.length+=s;var f=t.length<t.highWaterMark;if(f||(t.needDrain=!0),t.writing||t.corked){var u=t.lastBufferedRequest;t.lastBufferedRequest=new WriteReq(r,i,n),u?u.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else doWrite(e,t,!1,s,r,i,n);return f}function doWrite(e,t,r,i,n,s,f){t.writelen=i,t.writecb=f,t.writing=!0,t.sync=!0,r?e._writev(n,t.onwrite):e._write(n,s,t.onwrite),t.sync=!1}function onwriteError(e,t,r,i,n){--t.pendingcb,r?processNextTick(n,i):n(i),e._writableState.errorEmitted=!0,e.emit("error",i)}function onwriteStateUpdate(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}function onwrite(e,t){var r=e._writableState,i=r.sync,n=r.writecb;if(onwriteStateUpdate(r),t)onwriteError(e,r,i,t,n);else{var s=needFinish(r);s||r.corked||r.bufferProcessing||!r.bufferedRequest||clearBuffer(e,r),i?asyncWrite(afterWrite,e,r,s,n):afterWrite(e,r,s,n)}}function afterWrite(e,t,r,i){r||onwriteDrain(e,t),t.pendingcb--,i(),finishMaybe(e,t)}function onwriteDrain(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}function clearBuffer(e,t){t.bufferProcessing=!0;var r=t.bufferedRequest;if(e._writev&&r&&r.next){var i=t.bufferedRequestCount,n=new Array(i),s=t.corkedRequestsFree;s.entry=r;for(var f=0;r;)n[f]=r,r=r.next,f+=1;doWrite(e,t,!0,t.length,n,"",s.finish),t.pendingcb++,t.lastBufferedRequest=null,t.corkedRequestsFree=s.next,s.next=null}else{for(;r;){var u=r.chunk,o=r.encoding,a=r.callback,c=t.objectMode?1:u.length;if(doWrite(e,t,!1,c,u,o,a),r=r.next,t.writing)break}null===r&&(t.lastBufferedRequest=null)}t.bufferedRequestCount=0,t.bufferedRequest=r,t.bufferProcessing=!1}function needFinish(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function prefinish(e,t){t.prefinished||(t.prefinished=!0,e.emit("prefinish"))}function finishMaybe(e,t){var r=needFinish(t);return r&&(0===t.pendingcb?(prefinish(e,t),t.finished=!0,e.emit("finish")):prefinish(e,t)),r}function endWritable(e,t,r){t.ending=!0,finishMaybe(e,t),r&&(t.finished?processNextTick(r):e.once("finish",r)),t.ended=!0,e.writable=!1}function CorkedRequest(e){var t=this;this.next=null,this.entry=null,this.finish=function(r){var i=t.entry;for(t.entry=null;i;){var n=i.callback;e.pendingcb--,n(r),i=i.next}e.corkedRequestsFree?e.corkedRequestsFree.next=t:e.corkedRequestsFree=t}}module.exports=Writable;var processNextTick=require("process-nextick-args"),asyncWrite=!process.browser&&["v0.10","v0.9."].indexOf(process.version.slice(0,5))>-1?setImmediate:processNextTick,Buffer=require("buffer").Buffer;Writable.WritableState=WritableState;var util=require("core-util-is");util.inherits=require("inherits");var internalUtil={deprecate:require("util-deprecate")},Stream;!function(){try{Stream=require("stream")}catch(e){}finally{Stream||(Stream=require("events").EventEmitter)}}();var Buffer=require("buffer").Buffer;util.inherits(Writable,Stream);var Duplex;WritableState.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(WritableState.prototype,"buffer",{get:internalUtil.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.")})}catch(e){}}();var Duplex;Writable.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe. Not readable."))},Writable.prototype.write=function(e,t,r){var i=this._writableState,n=!1;return"function"==typeof t&&(r=t,t=null),Buffer.isBuffer(e)?t="buffer":t||(t=i.defaultEncoding),"function"!=typeof r&&(r=nop),i.ended?writeAfterEnd(this,r):validChunk(this,i,e,r)&&(i.pendingcb++,n=writeOrBuffer(this,i,e,t,r)),n},Writable.prototype.cork=function(){var e=this._writableState;e.corked++},Writable.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.finished||e.bufferProcessing||!e.bufferedRequest||clearBuffer(this,e))},Writable.prototype.setDefaultEncoding=function(e){if("string"==typeof e&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+e);this._writableState.defaultEncoding=e},Writable.prototype._write=function(e,t,r){r(new Error("not implemented"))},Writable.prototype._writev=null,Writable.prototype.end=function(e,t,r){var i=this._writableState;"function"==typeof e?(r=e,e=null,t=null):"function"==typeof t&&(r=t,t=null),null!==e&&void 0!==e&&this.write(e,t),i.corked&&(i.corked=1,this.uncork()),i.ending||i.finished||endWritable(this,i,r)};

}).call(this,require('_process'))

},{"./_stream_duplex":77,"_process":71,"buffer":25,"core-util-is":28,"events":32,"inherits":35,"process-nextick-args":70,"stream":86,"util-deprecate":95}],82:[function(require,module,exports){
module.exports=require("./lib/_stream_passthrough.js");

},{"./lib/_stream_passthrough.js":78}],83:[function(require,module,exports){
var Stream=function(){try{return require("stream")}catch(r){}}();exports=module.exports=require("./lib/_stream_readable.js"),exports.Stream=Stream||exports,exports.Readable=exports,exports.Writable=require("./lib/_stream_writable.js"),exports.Duplex=require("./lib/_stream_duplex.js"),exports.Transform=require("./lib/_stream_transform.js"),exports.PassThrough=require("./lib/_stream_passthrough.js");

},{"./lib/_stream_duplex.js":77,"./lib/_stream_passthrough.js":78,"./lib/_stream_readable.js":79,"./lib/_stream_transform.js":80,"./lib/_stream_writable.js":81,"stream":86}],84:[function(require,module,exports){
module.exports=require("./lib/_stream_transform.js");

},{"./lib/_stream_transform.js":80}],85:[function(require,module,exports){
module.exports=require("./lib/_stream_writable.js");

},{"./lib/_stream_writable.js":81}],86:[function(require,module,exports){
function Stream(){EE.call(this)}module.exports=Stream;var EE=require("events").EventEmitter,inherits=require("inherits");inherits(Stream,EE),Stream.Readable=require("readable-stream/readable.js"),Stream.Writable=require("readable-stream/writable.js"),Stream.Duplex=require("readable-stream/duplex.js"),Stream.Transform=require("readable-stream/transform.js"),Stream.PassThrough=require("readable-stream/passthrough.js"),Stream.Stream=Stream,Stream.prototype.pipe=function(e,r){function t(r){e.writable&&!1===e.write(r)&&m.pause&&m.pause()}function n(){m.readable&&m.resume&&m.resume()}function a(){u||(u=!0,e.end())}function o(){u||(u=!0,"function"==typeof e.destroy&&e.destroy())}function i(e){if(s(),0===EE.listenerCount(this,"error"))throw e}function s(){m.removeListener("data",t),e.removeListener("drain",n),m.removeListener("end",a),m.removeListener("close",o),m.removeListener("error",i),e.removeListener("error",i),m.removeListener("end",s),m.removeListener("close",s),e.removeListener("close",s)}var m=this;m.on("data",t),e.on("drain",n),e._isStdio||r&&r.end===!1||(m.on("end",a),m.on("close",o));var u=!1;return m.on("error",i),e.on("error",i),m.on("end",s),m.on("close",s),e.on("close",s),e.emit("pipe",m),e};

},{"events":32,"inherits":35,"readable-stream/duplex.js":76,"readable-stream/passthrough.js":82,"readable-stream/readable.js":83,"readable-stream/transform.js":84,"readable-stream/writable.js":85}],87:[function(require,module,exports){
(function (global){
var ClientRequest=require("./lib/request"),extend=require("xtend"),statusCodes=require("builtin-status-codes"),url=require("url"),http=exports;http.request=function(t,e){t="string"==typeof t?url.parse(t):extend(t);var r=-1===global.location.protocol.search(/^https?:$/)?"http:":"",s=t.protocol||r,o=t.hostname||t.host,n=t.port,u=t.path||"/";o&&-1!==o.indexOf(":")&&(o="["+o+"]"),t.url=(o?s+"//"+o:"")+(n?":"+n:"")+u,t.method=(t.method||"GET").toUpperCase(),t.headers=t.headers||{};var C=new ClientRequest(t);return e&&C.on("response",e),C},http.get=function(t,e){var r=http.request(t,e);return r.end(),r},http.Agent=function(){},http.Agent.defaultMaxSockets=4,http.STATUS_CODES=statusCodes,http.METHODS=["CHECKOUT","CONNECT","COPY","DELETE","GET","HEAD","LOCK","M-SEARCH","MERGE","MKACTIVITY","MKCOL","MOVE","NOTIFY","OPTIONS","PATCH","POST","PROPFIND","PROPPATCH","PURGE","PUT","REPORT","SEARCH","SUBSCRIBE","TRACE","UNLOCK","UNSUBSCRIBE"];

}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})

},{"./lib/request":89,"builtin-status-codes":26,"url":93,"xtend":98}],88:[function(require,module,exports){
(function (global){
function checkTypeSupport(e){try{return xhr.responseType=e,xhr.responseType===e}catch(r){}return!1}function isFunction(e){return"function"==typeof e}exports.fetch=isFunction(global.fetch)&&isFunction(global.ReadableByteStream),exports.blobConstructor=!1;try{new Blob([new ArrayBuffer(1)]),exports.blobConstructor=!0}catch(e){}var xhr=new global.XMLHttpRequest;xhr.open("GET",global.location.host?"/":"https://example.com");var haveArrayBuffer="undefined"!=typeof global.ArrayBuffer,haveSlice=haveArrayBuffer&&isFunction(global.ArrayBuffer.prototype.slice);exports.arraybuffer=haveArrayBuffer&&checkTypeSupport("arraybuffer"),exports.msstream=!exports.fetch&&haveSlice&&checkTypeSupport("ms-stream"),exports.mozchunkedarraybuffer=!exports.fetch&&haveArrayBuffer&&checkTypeSupport("moz-chunked-arraybuffer"),exports.overrideMimeType=isFunction(xhr.overrideMimeType),exports.vbArray=isFunction(global.VBArray),xhr=null;

}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})

},{}],89:[function(require,module,exports){
(function (process,global,Buffer){
function decideMode(e){return capability.fetch?"fetch":capability.mozchunkedarraybuffer?"moz-chunked-arraybuffer":capability.msstream?"ms-stream":capability.arraybuffer&&e?"arraybuffer":capability.vbArray&&e?"text:vbarray":"text"}function statusValid(e){try{var t=e.status;return null!==t&&0!==t}catch(r){return!1}}var capability=require("./capability"),inherits=require("inherits"),response=require("./response"),stream=require("stream"),toArrayBuffer=require("to-arraybuffer"),IncomingMessage=response.IncomingMessage,rStates=response.readyStates,ClientRequest=module.exports=function(e){var t=this;stream.Writable.call(t),t._opts=e,t._body=[],t._headers={},e.auth&&t.setHeader("Authorization","Basic "+new Buffer(e.auth).toString("base64")),Object.keys(e.headers).forEach(function(r){t.setHeader(r,e.headers[r])});var r;if("prefer-streaming"===e.mode)r=!1;else if("allow-wrong-content-type"===e.mode)r=!capability.overrideMimeType;else{if(e.mode&&"default"!==e.mode&&"prefer-fast"!==e.mode)throw new Error("Invalid value for opts.mode");r=!0}t._mode=decideMode(r),t.on("finish",function(){t._onFinish()})};inherits(ClientRequest,stream.Writable),ClientRequest.prototype.setHeader=function(e,t){var r=this,o=e.toLowerCase();-1===unsafeHeaders.indexOf(o)&&(r._headers[o]={name:e,value:t})},ClientRequest.prototype.getHeader=function(e){var t=this;return t._headers[e.toLowerCase()].value},ClientRequest.prototype.removeHeader=function(e){var t=this;delete t._headers[e.toLowerCase()]},ClientRequest.prototype._onFinish=function(){var e=this;if(!e._destroyed){var t,r=e._opts,o=e._headers;if("POST"!==r.method&&"PUT"!==r.method&&"PATCH"!==r.method||(t=capability.blobConstructor?new global.Blob(e._body.map(function(e){return toArrayBuffer(e)}),{type:(o["content-type"]||{}).value||""}):Buffer.concat(e._body).toString()),"fetch"===e._mode){var n=Object.keys(o).map(function(e){return[o[e].name,o[e].value]});global.fetch(e._opts.url,{method:e._opts.method,headers:n,body:t,mode:"cors",credentials:r.withCredentials?"include":"same-origin"}).then(function(t){e._fetchResponse=t,e._connect()},function(t){e.emit("error",t)})}else{var s=e._xhr=new global.XMLHttpRequest;try{s.open(e._opts.method,e._opts.url,!0)}catch(i){return void process.nextTick(function(){e.emit("error",i)})}"responseType"in s&&(s.responseType=e._mode.split(":")[0]),"withCredentials"in s&&(s.withCredentials=!!r.withCredentials),"text"===e._mode&&"overrideMimeType"in s&&s.overrideMimeType("text/plain; charset=x-user-defined"),Object.keys(o).forEach(function(e){s.setRequestHeader(o[e].name,o[e].value)}),e._response=null,s.onreadystatechange=function(){switch(s.readyState){case rStates.LOADING:case rStates.DONE:e._onXHRProgress()}},"moz-chunked-arraybuffer"===e._mode&&(s.onprogress=function(){e._onXHRProgress()}),s.onerror=function(){e._destroyed||e.emit("error",new Error("XHR error"))};try{s.send(t)}catch(i){return void process.nextTick(function(){e.emit("error",i)})}}}},ClientRequest.prototype._onXHRProgress=function(){var e=this;statusValid(e._xhr)&&!e._destroyed&&(e._response||e._connect(),e._response._onXHRProgress())},ClientRequest.prototype._connect=function(){var e=this;e._destroyed||(e._response=new IncomingMessage(e._xhr,e._fetchResponse,e._mode),e.emit("response",e._response))},ClientRequest.prototype._write=function(e,t,r){var o=this;o._body.push(e),r()},ClientRequest.prototype.abort=ClientRequest.prototype.destroy=function(){var e=this;e._destroyed=!0,e._response&&(e._response._destroyed=!0),e._xhr&&e._xhr.abort()},ClientRequest.prototype.end=function(e,t,r){var o=this;"function"==typeof e&&(r=e,e=void 0),stream.Writable.prototype.end.call(o,e,t,r)},ClientRequest.prototype.flushHeaders=function(){},ClientRequest.prototype.setTimeout=function(){},ClientRequest.prototype.setNoDelay=function(){},ClientRequest.prototype.setSocketKeepAlive=function(){};var unsafeHeaders=["accept-charset","accept-encoding","access-control-request-headers","access-control-request-method","connection","content-length","cookie","cookie2","date","dnt","expect","host","keep-alive","origin","referer","te","trailer","transfer-encoding","upgrade","user-agent","via"];

}).call(this,require('_process'),typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {},require("buffer").Buffer)

},{"./capability":88,"./response":90,"_process":71,"buffer":25,"inherits":35,"stream":86,"to-arraybuffer":92}],90:[function(require,module,exports){
(function (process,global,Buffer){
var capability=require("./capability"),inherits=require("inherits"),stream=require("stream"),rStates=exports.readyStates={UNSENT:0,OPENED:1,HEADERS_RECEIVED:2,LOADING:3,DONE:4},IncomingMessage=exports.IncomingMessage=function(e,r,s){function a(){u.read().then(function(e){if(!t._destroyed){if(e.done)return void t.push(null);t.push(new Buffer(e.value)),a()}})}var t=this;if(stream.Readable.call(t),t._mode=s,t.headers={},t.rawHeaders=[],t.trailers={},t.rawTrailers=[],t.on("end",function(){process.nextTick(function(){t.emit("close")})}),"fetch"===s){t._fetchResponse=r,t.statusCode=r.status,t.statusMessage=r.statusText;for(var n,o,i=r.headers[Symbol.iterator]();n=(o=i.next()).value,!o.done;)t.headers[n[0].toLowerCase()]=n[1],t.rawHeaders.push(n[0],n[1]);var u=r.body.getReader();a()}else{t._xhr=e,t._pos=0,t.statusCode=e.status,t.statusMessage=e.statusText;var h=e.getAllResponseHeaders().split(/\r?\n/);if(h.forEach(function(e){var r=e.match(/^([^:]+):\s*(.*)/);if(r){var s=r[1].toLowerCase();"set-cookie"===s?(void 0===t.headers[s]&&(t.headers[s]=[]),t.headers[s].push(r[2])):void 0!==t.headers[s]?t.headers[s]+=", "+r[2]:t.headers[s]=r[2],t.rawHeaders.push(r[1],r[2])}}),t._charset="x-user-defined",!capability.overrideMimeType){var d=t.rawHeaders["mime-type"];if(d){var f=d.match(/;\s*charset=([^;])(;|$)/);f&&(t._charset=f[1].toLowerCase())}t._charset||(t._charset="utf-8")}}};inherits(IncomingMessage,stream.Readable),IncomingMessage.prototype._read=function(){},IncomingMessage.prototype._onXHRProgress=function(){var e=this,r=e._xhr,s=null;switch(e._mode){case"text:vbarray":if(r.readyState!==rStates.DONE)break;try{s=new global.VBArray(r.responseBody).toArray()}catch(a){}if(null!==s){e.push(new Buffer(s));break}case"text":try{s=r.responseText}catch(a){e._mode="text:vbarray";break}if(s.length>e._pos){var t=s.substr(e._pos);if("x-user-defined"===e._charset){for(var n=new Buffer(t.length),o=0;o<t.length;o++)n[o]=255&t.charCodeAt(o);e.push(n)}else e.push(t,e._charset);e._pos=s.length}break;case"arraybuffer":if(r.readyState!==rStates.DONE)break;s=r.response,e.push(new Buffer(new Uint8Array(s)));break;case"moz-chunked-arraybuffer":if(s=r.response,r.readyState!==rStates.LOADING||!s)break;e.push(new Buffer(new Uint8Array(s)));break;case"ms-stream":if(s=r.response,r.readyState!==rStates.LOADING)break;var i=new global.MSStreamReader;i.onprogress=function(){i.result.byteLength>e._pos&&(e.push(new Buffer(new Uint8Array(i.result.slice(e._pos)))),e._pos=i.result.byteLength)},i.onload=function(){e.push(null)},i.readAsArrayBuffer(s)}e._xhr.readyState===rStates.DONE&&"ms-stream"!==e._mode&&e.push(null)};

}).call(this,require('_process'),typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {},require("buffer").Buffer)

},{"./capability":88,"_process":71,"buffer":25,"inherits":35,"stream":86}],91:[function(require,module,exports){
function assertEncoding(e){if(e&&!isBufferEncoding(e))throw new Error("Unknown encoding: "+e)}function passThroughWrite(e){return e.toString(this.encoding)}function utf16DetectIncompleteChar(e){this.charReceived=e.length%2,this.charLength=this.charReceived?2:0}function base64DetectIncompleteChar(e){this.charReceived=e.length%3,this.charLength=this.charReceived?3:0}var Buffer=require("buffer").Buffer,isBufferEncoding=Buffer.isEncoding||function(e){switch(e&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}},StringDecoder=exports.StringDecoder=function(e){switch(this.encoding=(e||"utf8").toLowerCase().replace(/[-_]/,""),assertEncoding(e),this.encoding){case"utf8":this.surrogateSize=3;break;case"ucs2":case"utf16le":this.surrogateSize=2,this.detectIncompleteChar=utf16DetectIncompleteChar;break;case"base64":this.surrogateSize=3,this.detectIncompleteChar=base64DetectIncompleteChar;break;default:return void(this.write=passThroughWrite)}this.charBuffer=new Buffer(6),this.charReceived=0,this.charLength=0};StringDecoder.prototype.write=function(e){for(var t="";this.charLength;){var r=e.length>=this.charLength-this.charReceived?this.charLength-this.charReceived:e.length;if(e.copy(this.charBuffer,this.charReceived,0,r),this.charReceived+=r,this.charReceived<this.charLength)return"";e=e.slice(r,e.length),t=this.charBuffer.slice(0,this.charLength).toString(this.encoding);var h=t.charCodeAt(t.length-1);if(!(h>=55296&&56319>=h)){if(this.charReceived=this.charLength=0,0===e.length)return t;break}this.charLength+=this.surrogateSize,t=""}this.detectIncompleteChar(e);var i=e.length;this.charLength&&(e.copy(this.charBuffer,0,e.length-this.charReceived,i),i-=this.charReceived),t+=e.toString(this.encoding,0,i);var i=t.length-1,h=t.charCodeAt(i);if(h>=55296&&56319>=h){var c=this.surrogateSize;return this.charLength+=c,this.charReceived+=c,this.charBuffer.copy(this.charBuffer,c,0,c),e.copy(this.charBuffer,0,0,c),t.substring(0,i)}return t},StringDecoder.prototype.detectIncompleteChar=function(e){for(var t=e.length>=3?3:e.length;t>0;t--){var r=e[e.length-t];if(1==t&&r>>5==6){this.charLength=2;break}if(2>=t&&r>>4==14){this.charLength=3;break}if(3>=t&&r>>3==30){this.charLength=4;break}}this.charReceived=t},StringDecoder.prototype.end=function(e){var t="";if(e&&e.length&&(t=this.write(e)),this.charReceived){var r=this.charReceived,h=this.charBuffer,i=this.encoding;t+=h.slice(0,r).toString(i)}return t};

},{"buffer":25}],92:[function(require,module,exports){
var Buffer=require("buffer").Buffer;module.exports=function(e){if(e instanceof Uint8Array){if(0===e.byteOffset&&e.byteLength===e.buffer.byteLength)return e.buffer;if("function"==typeof e.buffer.slice)return e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength)}if(Buffer.isBuffer(e)){for(var f=new Uint8Array(e.length),r=e.length,t=0;r>t;t++)f[t]=e[t];return f.buffer}throw new Error("Argument must be a Buffer")};

},{"buffer":25}],93:[function(require,module,exports){
"use strict";function Url(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}function urlParse(t,s,e){if(t&&util.isObject(t)&&t instanceof Url)return t;var h=new Url;return h.parse(t,s,e),h}function urlFormat(t){return util.isString(t)&&(t=urlParse(t)),t instanceof Url?t.format():Url.prototype.format.call(t)}function urlResolve(t,s){return urlParse(t,!1,!0).resolve(s)}function urlResolveObject(t,s){return t?urlParse(t,!1,!0).resolveObject(s):s}var punycode=require("punycode"),util=require("./util");exports.parse=urlParse,exports.resolve=urlResolve,exports.resolveObject=urlResolveObject,exports.format=urlFormat,exports.Url=Url;var protocolPattern=/^([a-z0-9.+-]+:)/i,portPattern=/:[0-9]*$/,simplePathPattern=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,delims=["<",">",'"',"`"," ","\r","\n","    "],unwise=["{","}","|","\\","^","`"].concat(delims),autoEscape=["'"].concat(unwise),nonHostChars=["%","/","?",";","#"].concat(autoEscape),hostEndingChars=["/","?","#"],hostnameMaxLen=255,hostnamePartPattern=/^[+a-z0-9A-Z_-]{0,63}$/,hostnamePartStart=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,unsafeProtocol={javascript:!0,"javascript:":!0},hostlessProtocol={javascript:!0,"javascript:":!0},slashedProtocol={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},querystring=require("querystring");Url.prototype.parse=function(t,s,e){if(!util.isString(t))throw new TypeError("Parameter 'url' must be a string, not "+typeof t);var h=t.indexOf("?"),r=-1!==h&&h<t.indexOf("#")?"?":"#",a=t.split(r),o=/\\/g;a[0]=a[0].replace(o,"/"),t=a.join(r);var n=t;if(n=n.trim(),!e&&1===t.split("#").length){var i=simplePathPattern.exec(n);if(i)return this.path=n,this.href=n,this.pathname=i[1],i[2]?(this.search=i[2],s?this.query=querystring.parse(this.search.substr(1)):this.query=this.search.substr(1)):s&&(this.search="",this.query={}),this}var l=protocolPattern.exec(n);if(l){l=l[0];var u=l.toLowerCase();this.protocol=u,n=n.substr(l.length)}if(e||l||n.match(/^\/\/[^@\/]+@[^@\/]+/)){var p="//"===n.substr(0,2);!p||l&&hostlessProtocol[l]||(n=n.substr(2),this.slashes=!0)}if(!hostlessProtocol[l]&&(p||l&&!slashedProtocol[l])){for(var c=-1,f=0;f<hostEndingChars.length;f++){var m=n.indexOf(hostEndingChars[f]);-1!==m&&(-1===c||c>m)&&(c=m)}var v,g;g=-1===c?n.lastIndexOf("@"):n.lastIndexOf("@",c),-1!==g&&(v=n.slice(0,g),n=n.slice(g+1),this.auth=decodeURIComponent(v)),c=-1;for(var f=0;f<nonHostChars.length;f++){var m=n.indexOf(nonHostChars[f]);-1!==m&&(-1===c||c>m)&&(c=m)}-1===c&&(c=n.length),this.host=n.slice(0,c),n=n.slice(c),this.parseHost(),this.hostname=this.hostname||"";var y="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!y)for(var P=this.hostname.split(/\./),f=0,d=P.length;d>f;f++){var q=P[f];if(q&&!q.match(hostnamePartPattern)){for(var b="",O=0,j=q.length;j>O;O++)b+=q.charCodeAt(O)>127?"x":q[O];if(!b.match(hostnamePartPattern)){var x=P.slice(0,f),U=P.slice(f+1),C=q.match(hostnamePartStart);C&&(x.push(C[1]),U.unshift(C[2])),U.length&&(n="/"+U.join(".")+n),this.hostname=x.join(".");break}}}this.hostname.length>hostnameMaxLen?this.hostname="":this.hostname=this.hostname.toLowerCase(),y||(this.hostname=punycode.toASCII(this.hostname));var A=this.port?":"+this.port:"",w=this.hostname||"";this.host=w+A,this.href+=this.host,y&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==n[0]&&(n="/"+n))}if(!unsafeProtocol[u])for(var f=0,d=autoEscape.length;d>f;f++){var E=autoEscape[f];if(-1!==n.indexOf(E)){var I=encodeURIComponent(E);I===E&&(I=escape(E)),n=n.split(E).join(I)}}var R=n.indexOf("#");-1!==R&&(this.hash=n.substr(R),n=n.slice(0,R));var S=n.indexOf("?");if(-1!==S?(this.search=n.substr(S),this.query=n.substr(S+1),s&&(this.query=querystring.parse(this.query)),n=n.slice(0,S)):s&&(this.search="",this.query={}),n&&(this.pathname=n),slashedProtocol[u]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){var A=this.pathname||"",k=this.search||"";this.path=A+k}return this.href=this.format(),this},Url.prototype.format=function(){var t=this.auth||"";t&&(t=encodeURIComponent(t),t=t.replace(/%3A/i,":"),t+="@");var s=this.protocol||"",e=this.pathname||"",h=this.hash||"",r=!1,a="";this.host?r=t+this.host:this.hostname&&(r=t+(-1===this.hostname.indexOf(":")?this.hostname:"["+this.hostname+"]"),this.port&&(r+=":"+this.port)),this.query&&util.isObject(this.query)&&Object.keys(this.query).length&&(a=querystring.stringify(this.query));var o=this.search||a&&"?"+a||"";return s&&":"!==s.substr(-1)&&(s+=":"),this.slashes||(!s||slashedProtocol[s])&&r!==!1?(r="//"+(r||""),e&&"/"!==e.charAt(0)&&(e="/"+e)):r||(r=""),h&&"#"!==h.charAt(0)&&(h="#"+h),o&&"?"!==o.charAt(0)&&(o="?"+o),e=e.replace(/[?#]/g,function(t){return encodeURIComponent(t)}),o=o.replace("#","%23"),s+r+e+o+h},Url.prototype.resolve=function(t){return this.resolveObject(urlParse(t,!1,!0)).format()},Url.prototype.resolveObject=function(t){if(util.isString(t)){var s=new Url;s.parse(t,!1,!0),t=s}for(var e=new Url,h=Object.keys(this),r=0;r<h.length;r++){var a=h[r];e[a]=this[a]}if(e.hash=t.hash,""===t.href)return e.href=e.format(),e;if(t.slashes&&!t.protocol){for(var o=Object.keys(t),n=0;n<o.length;n++){var i=o[n];"protocol"!==i&&(e[i]=t[i])}return slashedProtocol[e.protocol]&&e.hostname&&!e.pathname&&(e.path=e.pathname="/"),e.href=e.format(),e}if(t.protocol&&t.protocol!==e.protocol){if(!slashedProtocol[t.protocol]){for(var l=Object.keys(t),u=0;u<l.length;u++){var p=l[u];e[p]=t[p]}return e.href=e.format(),e}if(e.protocol=t.protocol,t.host||hostlessProtocol[t.protocol])e.pathname=t.pathname;else{for(var c=(t.pathname||"").split("/");c.length&&!(t.host=c.shift()););t.host||(t.host=""),t.hostname||(t.hostname=""),""!==c[0]&&c.unshift(""),c.length<2&&c.unshift(""),e.pathname=c.join("/")}if(e.search=t.search,e.query=t.query,e.host=t.host||"",e.auth=t.auth,e.hostname=t.hostname||t.host,e.port=t.port,e.pathname||e.search){var f=e.pathname||"",m=e.search||"";e.path=f+m}return e.slashes=e.slashes||t.slashes,e.href=e.format(),e}var v=e.pathname&&"/"===e.pathname.charAt(0),g=t.host||t.pathname&&"/"===t.pathname.charAt(0),y=g||v||e.host&&t.pathname,P=y,d=e.pathname&&e.pathname.split("/")||[],c=t.pathname&&t.pathname.split("/")||[],q=e.protocol&&!slashedProtocol[e.protocol];if(q&&(e.hostname="",e.port=null,e.host&&(""===d[0]?d[0]=e.host:d.unshift(e.host)),e.host="",t.protocol&&(t.hostname=null,t.port=null,t.host&&(""===c[0]?c[0]=t.host:c.unshift(t.host)),t.host=null),y=y&&(""===c[0]||""===d[0])),g)e.host=t.host||""===t.host?t.host:e.host,e.hostname=t.hostname||""===t.hostname?t.hostname:e.hostname,e.search=t.search,e.query=t.query,d=c;else if(c.length)d||(d=[]),d.pop(),d=d.concat(c),e.search=t.search,e.query=t.query;else if(!util.isNullOrUndefined(t.search)){if(q){e.hostname=e.host=d.shift();var b=e.host&&e.host.indexOf("@")>0?e.host.split("@"):!1;b&&(e.auth=b.shift(),e.host=e.hostname=b.shift())}return e.search=t.search,e.query=t.query,util.isNull(e.pathname)&&util.isNull(e.search)||(e.path=(e.pathname?e.pathname:"")+(e.search?e.search:"")),e.href=e.format(),e}if(!d.length)return e.pathname=null,e.search?e.path="/"+e.search:e.path=null,e.href=e.format(),e;for(var O=d.slice(-1)[0],j=(e.host||t.host||d.length>1)&&("."===O||".."===O)||""===O,x=0,U=d.length;U>=0;U--)O=d[U],"."===O?d.splice(U,1):".."===O?(d.splice(U,1),x++):x&&(d.splice(U,1),x--);if(!y&&!P)for(;x--;x)d.unshift("..");!y||""===d[0]||d[0]&&"/"===d[0].charAt(0)||d.unshift(""),j&&"/"!==d.join("/").substr(-1)&&d.push("");var C=""===d[0]||d[0]&&"/"===d[0].charAt(0);if(q){e.hostname=e.host=C?"":d.length?d.shift():"";var b=e.host&&e.host.indexOf("@")>0?e.host.split("@"):!1;b&&(e.auth=b.shift(),e.host=e.hostname=b.shift())}return y=y||e.host&&d.length,y&&!C&&d.unshift(""),d.length?e.pathname=d.join("/"):(e.pathname=null,e.path=null),util.isNull(e.pathname)&&util.isNull(e.search)||(e.path=(e.pathname?e.pathname:"")+(e.search?e.search:"")),e.auth=t.auth||e.auth,e.slashes=e.slashes||t.slashes,e.href=e.format(),e},Url.prototype.parseHost=function(){var t=this.host,s=portPattern.exec(t);s&&(s=s[0],":"!==s&&(this.port=s.substr(1)),t=t.substr(0,t.length-s.length)),t&&(this.hostname=t)};

},{"./util":94,"punycode":72,"querystring":75}],94:[function(require,module,exports){
"use strict";module.exports={isString:function(n){return"string"==typeof n},isObject:function(n){return"object"==typeof n&&null!==n},isNull:function(n){return null===n},isNullOrUndefined:function(n){return null==n}};

},{}],95:[function(require,module,exports){
(function (global){
function deprecate(r,e){function o(){if(!t){if(config("throwDeprecation"))throw new Error(e);config("traceDeprecation")?console.trace(e):console.warn(e),t=!0}return r.apply(this,arguments)}if(config("noDeprecation"))return r;var t=!1;return o}function config(r){try{if(!global.localStorage)return!1}catch(e){return!1}var o=global.localStorage[r];return null==o?!1:"true"===String(o).toLowerCase()}module.exports=deprecate;

}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})

},{}],96:[function(require,module,exports){
module.exports=function(o){return o&&"object"==typeof o&&"function"==typeof o.copy&&"function"==typeof o.fill&&"function"==typeof o.readUInt8};

},{}],97:[function(require,module,exports){
(function (process,global){
function inspect(e,r){var t={seen:[],stylize:stylizeNoColor};return arguments.length>=3&&(t.depth=arguments[2]),arguments.length>=4&&(t.colors=arguments[3]),isBoolean(r)?t.showHidden=r:r&&exports._extend(t,r),isUndefined(t.showHidden)&&(t.showHidden=!1),isUndefined(t.depth)&&(t.depth=2),isUndefined(t.colors)&&(t.colors=!1),isUndefined(t.customInspect)&&(t.customInspect=!0),t.colors&&(t.stylize=stylizeWithColor),formatValue(t,e,t.depth)}function stylizeWithColor(e,r){var t=inspect.styles[r];return t?"["+inspect.colors[t][0]+"m"+e+"["+inspect.colors[t][1]+"m":e}function stylizeNoColor(e,r){return e}function arrayToHash(e){var r={};return e.forEach(function(e,t){r[e]=!0}),r}function formatValue(e,r,t){if(e.customInspect&&r&&isFunction(r.inspect)&&r.inspect!==exports.inspect&&(!r.constructor||r.constructor.prototype!==r)){var n=r.inspect(t,e);return isString(n)||(n=formatValue(e,n,t)),n}var i=formatPrimitive(e,r);if(i)return i;var o=Object.keys(r),s=arrayToHash(o);if(e.showHidden&&(o=Object.getOwnPropertyNames(r)),isError(r)&&(o.indexOf("message")>=0||o.indexOf("description")>=0))return formatError(r);if(0===o.length){if(isFunction(r)){var u=r.name?": "+r.name:"";return e.stylize("[Function"+u+"]","special")}if(isRegExp(r))return e.stylize(RegExp.prototype.toString.call(r),"regexp");if(isDate(r))return e.stylize(Date.prototype.toString.call(r),"date");if(isError(r))return formatError(r)}var c="",a=!1,l=["{","}"];if(isArray(r)&&(a=!0,l=["[","]"]),isFunction(r)){var p=r.name?": "+r.name:"";c=" [Function"+p+"]"}if(isRegExp(r)&&(c=" "+RegExp.prototype.toString.call(r)),isDate(r)&&(c=" "+Date.prototype.toUTCString.call(r)),isError(r)&&(c=" "+formatError(r)),0===o.length&&(!a||0==r.length))return l[0]+c+l[1];if(0>t)return isRegExp(r)?e.stylize(RegExp.prototype.toString.call(r),"regexp"):e.stylize("[Object]","special");e.seen.push(r);var f;return f=a?formatArray(e,r,t,s,o):o.map(function(n){return formatProperty(e,r,t,s,n,a)}),e.seen.pop(),reduceToSingleString(f,c,l)}function formatPrimitive(e,r){if(isUndefined(r))return e.stylize("undefined","undefined");if(isString(r)){var t="'"+JSON.stringify(r).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(t,"string")}return isNumber(r)?e.stylize(""+r,"number"):isBoolean(r)?e.stylize(""+r,"boolean"):isNull(r)?e.stylize("null","null"):void 0}function formatError(e){return"["+Error.prototype.toString.call(e)+"]"}function formatArray(e,r,t,n,i){for(var o=[],s=0,u=r.length;u>s;++s)hasOwnProperty(r,String(s))?o.push(formatProperty(e,r,t,n,String(s),!0)):o.push("");return i.forEach(function(i){i.match(/^\d+$/)||o.push(formatProperty(e,r,t,n,i,!0))}),o}function formatProperty(e,r,t,n,i,o){var s,u,c;if(c=Object.getOwnPropertyDescriptor(r,i)||{value:r[i]},c.get?u=c.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):c.set&&(u=e.stylize("[Setter]","special")),hasOwnProperty(n,i)||(s="["+i+"]"),u||(e.seen.indexOf(c.value)<0?(u=isNull(t)?formatValue(e,c.value,null):formatValue(e,c.value,t-1),u.indexOf("\n")>-1&&(u=o?u.split("\n").map(function(e){return"  "+e}).join("\n").substr(2):"\n"+u.split("\n").map(function(e){return"   "+e}).join("\n"))):u=e.stylize("[Circular]","special")),isUndefined(s)){if(o&&i.match(/^\d+$/))return u;s=JSON.stringify(""+i),s.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(s=s.substr(1,s.length-2),s=e.stylize(s,"name")):(s=s.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),s=e.stylize(s,"string"))}return s+": "+u}function reduceToSingleString(e,r,t){var n=0,i=e.reduce(function(e,r){return n++,r.indexOf("\n")>=0&&n++,e+r.replace(/\u001b\[\d\d?m/g,"").length+1},0);return i>60?t[0]+(""===r?"":r+"\n ")+" "+e.join(",\n  ")+" "+t[1]:t[0]+r+" "+e.join(", ")+" "+t[1]}function isArray(e){return Array.isArray(e)}function isBoolean(e){return"boolean"==typeof e}function isNull(e){return null===e}function isNullOrUndefined(e){return null==e}function isNumber(e){return"number"==typeof e}function isString(e){return"string"==typeof e}function isSymbol(e){return"symbol"==typeof e}function isUndefined(e){return void 0===e}function isRegExp(e){return isObject(e)&&"[object RegExp]"===objectToString(e)}function isObject(e){return"object"==typeof e&&null!==e}function isDate(e){return isObject(e)&&"[object Date]"===objectToString(e)}function isError(e){return isObject(e)&&("[object Error]"===objectToString(e)||e instanceof Error)}function isFunction(e){return"function"==typeof e}function isPrimitive(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||"undefined"==typeof e}function objectToString(e){return Object.prototype.toString.call(e)}function pad(e){return 10>e?"0"+e.toString(10):e.toString(10)}function timestamp(){var e=new Date,r=[pad(e.getHours()),pad(e.getMinutes()),pad(e.getSeconds())].join(":");return[e.getDate(),months[e.getMonth()],r].join(" ")}function hasOwnProperty(e,r){return Object.prototype.hasOwnProperty.call(e,r)}var formatRegExp=/%[sdj%]/g;exports.format=function(e){if(!isString(e)){for(var r=[],t=0;t<arguments.length;t++)r.push(inspect(arguments[t]));return r.join(" ")}for(var t=1,n=arguments,i=n.length,o=String(e).replace(formatRegExp,function(e){if("%%"===e)return"%";if(t>=i)return e;switch(e){case"%s":return String(n[t++]);case"%d":return Number(n[t++]);case"%j":try{return JSON.stringify(n[t++])}catch(r){return"[Circular]"}default:return e}}),s=n[t];i>t;s=n[++t])o+=isNull(s)||!isObject(s)?" "+s:" "+inspect(s);return o},exports.deprecate=function(e,r){function t(){if(!n){if(process.throwDeprecation)throw new Error(r);process.traceDeprecation?console.trace(r):console.error(r),n=!0}return e.apply(this,arguments)}if(isUndefined(global.process))return function(){return exports.deprecate(e,r).apply(this,arguments)};if(process.noDeprecation===!0)return e;var n=!1;return t};var debugs={},debugEnviron;exports.debuglog=function(e){if(isUndefined(debugEnviron)&&(debugEnviron=process.env.NODE_DEBUG||""),e=e.toUpperCase(),!debugs[e])if(new RegExp("\\b"+e+"\\b","i").test(debugEnviron)){var r=process.pid;debugs[e]=function(){var t=exports.format.apply(exports,arguments);console.error("%s %d: %s",e,r,t)}}else debugs[e]=function(){};return debugs[e]},exports.inspect=inspect,inspect.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},inspect.styles={special:"cyan",number:"yellow","boolean":"yellow",undefined:"grey","null":"bold",string:"green",date:"magenta",regexp:"red"},exports.isArray=isArray,exports.isBoolean=isBoolean,exports.isNull=isNull,exports.isNullOrUndefined=isNullOrUndefined,exports.isNumber=isNumber,exports.isString=isString,exports.isSymbol=isSymbol,exports.isUndefined=isUndefined,exports.isRegExp=isRegExp,exports.isObject=isObject,exports.isDate=isDate,exports.isError=isError,exports.isFunction=isFunction,exports.isPrimitive=isPrimitive,exports.isBuffer=require("./support/isBuffer");var months=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];exports.log=function(){console.log("%s - %s",timestamp(),exports.format.apply(exports,arguments))},exports.inherits=require("inherits"),exports._extend=function(e,r){if(!r||!isObject(r))return e;for(var t=Object.keys(r),n=t.length;n--;)e[t[n]]=r[t[n]];return e};

}).call(this,require('_process'),typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})

},{"./support/isBuffer":96,"_process":71,"inherits":35}],98:[function(require,module,exports){
function extend(){for(var r={},e=0;e<arguments.length;e++){var t=arguments[e];for(var n in t)hasOwnProperty.call(t,n)&&(r[n]=t[n])}return r}module.exports=extend;var hasOwnProperty=Object.prototype.hasOwnProperty;

},{}]},{},[3])(3)
});
</script>

<script>
// https://github.com/isaacs/json-stringify-safe v5.0.1
function stringify(obj, replacer, spaces, cycleReplacer) {
  return JSON.stringify(obj, serializer(replacer, cycleReplacer), spaces)
}

function serializer(replacer, cycleReplacer) {
  var stack = [], keys = []

  if (cycleReplacer == null) cycleReplacer = function(key, value) {
    if (stack[0] === value) return "[Circular ~]"
    return "[Circular ~." + keys.slice(0, stack.indexOf(value)).join(".") + "]"
  }

  return function(key, value) {
    if (stack.length > 0) {
      var thisPos = stack.indexOf(this)
      ~thisPos ? stack.splice(thisPos + 1) : stack.push(this)
      ~thisPos ? keys.splice(thisPos, Infinity, key) : keys.push(key)
      if (~stack.indexOf(value)) value = cycleReplacer.call(this, key, value)
    }
    else stack.push(value)

    return replacer == null ? value : replacer.call(this, key, value)
  }
}
</script>

<script>
/* Web Font Loader v1.6.24 - (c) Adobe Systems, Google. License: Apache 2.0 */
(function(){function aa(a,b,d){return a.call.apply(a.bind,arguments)}function ba(a,b,d){if(!a)throw Error();if(2<arguments.length){var c=Array.prototype.slice.call(arguments,2);return function(){var d=Array.prototype.slice.call(arguments);Array.prototype.unshift.apply(d,c);return a.apply(b,d)}}return function(){return a.apply(b,arguments)}}function p(a,b,d){p=Function.prototype.bind&&-1!=Function.prototype.bind.toString().indexOf("native code")?aa:ba;return p.apply(null,arguments)}var q=Date.now||function(){return+new Date};function ca(a,b){this.a=a;this.m=b||a;this.c=this.m.document}var da=!!window.FontFace;function t(a,b,d,c){b=a.c.createElement(b);if(d)for(var e in d)d.hasOwnProperty(e)&&("style"==e?b.style.cssText=d[e]:b.setAttribute(e,d[e]));c&&b.appendChild(a.c.createTextNode(c));return b}function u(a,b,d){a=a.c.getElementsByTagName(b)[0];a||(a=document.documentElement);a.insertBefore(d,a.lastChild)}function v(a){a.parentNode&&a.parentNode.removeChild(a)}
function w(a,b,d){b=b||[];d=d||[];for(var c=a.className.split(/\s+/),e=0;e<b.length;e+=1){for(var f=!1,g=0;g<c.length;g+=1)if(b[e]===c[g]){f=!0;break}f||c.push(b[e])}b=[];for(e=0;e<c.length;e+=1){f=!1;for(g=0;g<d.length;g+=1)if(c[e]===d[g]){f=!0;break}f||b.push(c[e])}a.className=b.join(" ").replace(/\s+/g," ").replace(/^\s+|\s+$/,"")}function y(a,b){for(var d=a.className.split(/\s+/),c=0,e=d.length;c<e;c++)if(d[c]==b)return!0;return!1}
function z(a){if("string"===typeof a.f)return a.f;var b=a.m.location.protocol;"about:"==b&&(b=a.a.location.protocol);return"https:"==b?"https:":"http:"}function ea(a){return a.m.location.hostname||a.a.location.hostname}
function A(a,b,d){function c(){k&&e&&f&&(k(g),k=null)}b=t(a,"link",{rel:"stylesheet",href:b,media:"all"});var e=!1,f=!0,g=null,k=d||null;da?(b.onload=function(){e=!0;c()},b.onerror=function(){e=!0;g=Error("Stylesheet failed to load");c()}):setTimeout(function(){e=!0;c()},0);u(a,"head",b)}
function B(a,b,d,c){var e=a.c.getElementsByTagName("head")[0];if(e){var f=t(a,"script",{src:b}),g=!1;f.onload=f.onreadystatechange=function(){g||this.readyState&&"loaded"!=this.readyState&&"complete"!=this.readyState||(g=!0,d&&d(null),f.onload=f.onreadystatechange=null,"HEAD"==f.parentNode.tagName&&e.removeChild(f))};e.appendChild(f);setTimeout(function(){g||(g=!0,d&&d(Error("Script load timeout")))},c||5E3);return f}return null};function C(){this.a=0;this.c=null}function D(a){a.a++;return function(){a.a--;E(a)}}function F(a,b){a.c=b;E(a)}function E(a){0==a.a&&a.c&&(a.c(),a.c=null)};function G(a){this.a=a||"-"}G.prototype.c=function(a){for(var b=[],d=0;d<arguments.length;d++)b.push(arguments[d].replace(/[\W_]+/g,"").toLowerCase());return b.join(this.a)};function H(a,b){this.c=a;this.f=4;this.a="n";var d=(b||"n4").match(/^([nio])([1-9])$/i);d&&(this.a=d[1],this.f=parseInt(d[2],10))}function fa(a){return I(a)+" "+(a.f+"00")+" 300px "+J(a.c)}function J(a){var b=[];a=a.split(/,\s*/);for(var d=0;d<a.length;d++){var c=a[d].replace(/['"]/g,"");-1!=c.indexOf(" ")||/^\d/.test(c)?b.push("'"+c+"'"):b.push(c)}return b.join(",")}function K(a){return a.a+a.f}function I(a){var b="normal";"o"===a.a?b="oblique":"i"===a.a&&(b="italic");return b}
function ga(a){var b=4,d="n",c=null;a&&((c=a.match(/(normal|oblique|italic)/i))&&c[1]&&(d=c[1].substr(0,1).toLowerCase()),(c=a.match(/([1-9]00|normal|bold)/i))&&c[1]&&(/bold/i.test(c[1])?b=7:/[1-9]00/.test(c[1])&&(b=parseInt(c[1].substr(0,1),10))));return d+b};function ha(a,b){this.c=a;this.f=a.m.document.documentElement;this.h=b;this.a=new G("-");this.j=!1!==b.events;this.g=!1!==b.classes}function ia(a){a.g&&w(a.f,[a.a.c("wf","loading")]);L(a,"loading")}function M(a){if(a.g){var b=y(a.f,a.a.c("wf","active")),d=[],c=[a.a.c("wf","loading")];b||d.push(a.a.c("wf","inactive"));w(a.f,d,c)}L(a,"inactive")}function L(a,b,d){if(a.j&&a.h[b])if(d)a.h[b](d.c,K(d));else a.h[b]()};function ja(){this.c={}}function ka(a,b,d){var c=[],e;for(e in b)if(b.hasOwnProperty(e)){var f=a.c[e];f&&c.push(f(b[e],d))}return c};function N(a,b){this.c=a;this.f=b;this.a=t(this.c,"span",{"aria-hidden":"true"},this.f)}function O(a){u(a.c,"body",a.a)}function P(a){return"display:block;position:absolute;top:-9999px;left:-9999px;font-size:300px;width:auto;height:auto;line-height:normal;margin:0;padding:0;font-variant:normal;white-space:nowrap;font-family:"+J(a.c)+";"+("font-style:"+I(a)+";font-weight:"+(a.f+"00")+";")};function Q(a,b,d,c,e,f){this.g=a;this.j=b;this.a=c;this.c=d;this.f=e||3E3;this.h=f||void 0}Q.prototype.start=function(){var a=this.c.m.document,b=this,d=q(),c=new Promise(function(c,e){function k(){q()-d>=b.f?e():a.fonts.load(fa(b.a),b.h).then(function(a){1<=a.length?c():setTimeout(k,25)},function(){e()})}k()}),e=new Promise(function(a,c){setTimeout(c,b.f)});Promise.race([e,c]).then(function(){b.g(b.a)},function(){b.j(b.a)})};function R(a,b,d,c,e,f,g){this.v=a;this.B=b;this.c=d;this.a=c;this.s=g||"BESbswy";this.f={};this.w=e||3E3;this.u=f||null;this.o=this.j=this.h=this.g=null;this.g=new N(this.c,this.s);this.h=new N(this.c,this.s);this.j=new N(this.c,this.s);this.o=new N(this.c,this.s);a=new H(this.a.c+",serif",K(this.a));a=P(a);this.g.a.style.cssText=a;a=new H(this.a.c+",sans-serif",K(this.a));a=P(a);this.h.a.style.cssText=a;a=new H("serif",K(this.a));a=P(a);this.j.a.style.cssText=a;a=new H("sans-serif",K(this.a));a=
P(a);this.o.a.style.cssText=a;O(this.g);O(this.h);O(this.j);O(this.o)}var S={D:"serif",C:"sans-serif"},T=null;function U(){if(null===T){var a=/AppleWebKit\/([0-9]+)(?:\.([0-9]+))/.exec(window.navigator.userAgent);T=!!a&&(536>parseInt(a[1],10)||536===parseInt(a[1],10)&&11>=parseInt(a[2],10))}return T}R.prototype.start=function(){this.f.serif=this.j.a.offsetWidth;this.f["sans-serif"]=this.o.a.offsetWidth;this.A=q();la(this)};
function ma(a,b,d){for(var c in S)if(S.hasOwnProperty(c)&&b===a.f[S[c]]&&d===a.f[S[c]])return!0;return!1}function la(a){var b=a.g.a.offsetWidth,d=a.h.a.offsetWidth,c;(c=b===a.f.serif&&d===a.f["sans-serif"])||(c=U()&&ma(a,b,d));c?q()-a.A>=a.w?U()&&ma(a,b,d)&&(null===a.u||a.u.hasOwnProperty(a.a.c))?V(a,a.v):V(a,a.B):na(a):V(a,a.v)}function na(a){setTimeout(p(function(){la(this)},a),50)}function V(a,b){setTimeout(p(function(){v(this.g.a);v(this.h.a);v(this.j.a);v(this.o.a);b(this.a)},a),0)};function W(a,b,d){this.c=a;this.a=b;this.f=0;this.o=this.j=!1;this.s=d}var X=null;W.prototype.g=function(a){var b=this.a;b.g&&w(b.f,[b.a.c("wf",a.c,K(a).toString(),"active")],[b.a.c("wf",a.c,K(a).toString(),"loading"),b.a.c("wf",a.c,K(a).toString(),"inactive")]);L(b,"fontactive",a);this.o=!0;oa(this)};
W.prototype.h=function(a){var b=this.a;if(b.g){var d=y(b.f,b.a.c("wf",a.c,K(a).toString(),"active")),c=[],e=[b.a.c("wf",a.c,K(a).toString(),"loading")];d||c.push(b.a.c("wf",a.c,K(a).toString(),"inactive"));w(b.f,c,e)}L(b,"fontinactive",a);oa(this)};function oa(a){0==--a.f&&a.j&&(a.o?(a=a.a,a.g&&w(a.f,[a.a.c("wf","active")],[a.a.c("wf","loading"),a.a.c("wf","inactive")]),L(a,"active")):M(a.a))};function pa(a){this.j=a;this.a=new ja;this.h=0;this.f=this.g=!0}pa.prototype.load=function(a){this.c=new ca(this.j,a.context||this.j);this.g=!1!==a.events;this.f=!1!==a.classes;qa(this,new ha(this.c,a),a)};
function ra(a,b,d,c,e){var f=0==--a.h;(a.f||a.g)&&setTimeout(function(){var a=e||null,k=c||null||{};if(0===d.length&&f)M(b.a);else{b.f+=d.length;f&&(b.j=f);var h,m=[];for(h=0;h<d.length;h++){var l=d[h],n=k[l.c],r=b.a,x=l;r.g&&w(r.f,[r.a.c("wf",x.c,K(x).toString(),"loading")]);L(r,"fontloading",x);r=null;null===X&&(X=window.FontFace?(x=/Gecko.*Firefox\/(\d+)/.exec(window.navigator.userAgent))?42<parseInt(x[1],10):!0:!1);X?r=new Q(p(b.g,b),p(b.h,b),b.c,l,b.s,n):r=new R(p(b.g,b),p(b.h,b),b.c,l,b.s,a,
n);m.push(r)}for(h=0;h<m.length;h++)m[h].start()}},0)}function qa(a,b,d){var c=[],e=d.timeout;ia(b);var c=ka(a.a,d,a.c),f=new W(a.c,b,e);a.h=c.length;b=0;for(d=c.length;b<d;b++)c[b].load(function(b,c,d){ra(a,f,b,c,d)})};function sa(a,b){this.c=a;this.a=b}function ta(a,b,d){var c=z(a.c);a=(a.a.api||"fast.fonts.net/jsapi").replace(/^.*http(s?):(\/\/)?/,"");return c+"//"+a+"/"+b+".js"+(d?"?v="+d:"")}
sa.prototype.load=function(a){function b(){if(e["__mti_fntLst"+d]){var c=e["__mti_fntLst"+d](),g=[],k;if(c)for(var h=0;h<c.length;h++){var m=c[h].fontfamily;void 0!=c[h].fontStyle&&void 0!=c[h].fontWeight?(k=c[h].fontStyle+c[h].fontWeight,g.push(new H(m,k))):g.push(new H(m))}a(g)}else setTimeout(function(){b()},50)}var d=this.a.projectId,c=this.a.version;if(d){var e=this.c.m;B(this.c,ta(this,d,c),function(c){c?a([]):b()}).id="__MonotypeAPIScript__"+d}else a([])};function ua(a,b){this.c=a;this.a=b}ua.prototype.load=function(a){var b,d,c=this.a.urls||[],e=this.a.families||[],f=this.a.testStrings||{},g=new C;b=0;for(d=c.length;b<d;b++)A(this.c,c[b],D(g));var k=[];b=0;for(d=e.length;b<d;b++)if(c=e[b].split(":"),c[1])for(var h=c[1].split(","),m=0;m<h.length;m+=1)k.push(new H(c[0],h[m]));else k.push(new H(c[0]));F(g,function(){a(k,f)})};function va(a,b,d){a?this.c=a:this.c=b+wa;this.a=[];this.f=[];this.g=d||""}var wa="//fonts.googleapis.com/css";function xa(a,b){for(var d=b.length,c=0;c<d;c++){var e=b[c].split(":");3==e.length&&a.f.push(e.pop());var f="";2==e.length&&""!=e[1]&&(f=":");a.a.push(e.join(f))}}
function ya(a){if(0==a.a.length)throw Error("No fonts to load!");if(-1!=a.c.indexOf("kit="))return a.c;for(var b=a.a.length,d=[],c=0;c<b;c++)d.push(a.a[c].replace(/ /g,"+"));b=a.c+"?family="+d.join("%7C");0<a.f.length&&(b+="&subset="+a.f.join(","));0<a.g.length&&(b+="&text="+encodeURIComponent(a.g));return b};function za(a){this.f=a;this.a=[];this.c={}}
var Aa={latin:"BESbswy",cyrillic:"\u0439\u044f\u0416",greek:"\u03b1\u03b2\u03a3",khmer:"\u1780\u1781\u1782",Hanuman:"\u1780\u1781\u1782"},Ba={thin:"1",extralight:"2","extra-light":"2",ultralight:"2","ultra-light":"2",light:"3",regular:"4",book:"4",medium:"5","semi-bold":"6",semibold:"6","demi-bold":"6",demibold:"6",bold:"7","extra-bold":"8",extrabold:"8","ultra-bold":"8",ultrabold:"8",black:"9",heavy:"9",l:"3",r:"4",b:"7"},Ca={i:"i",italic:"i",n:"n",normal:"n"},Da=/^(thin|(?:(?:extra|ultra)-?)?light|regular|book|medium|(?:(?:semi|demi|extra|ultra)-?)?bold|black|heavy|l|r|b|[1-9]00)?(n|i|normal|italic)?$/;
function Ea(a){for(var b=a.f.length,d=0;d<b;d++){var c=a.f[d].split(":"),e=c[0].replace(/\+/g," "),f=["n4"];if(2<=c.length){var g;var k=c[1];g=[];if(k)for(var k=k.split(","),h=k.length,m=0;m<h;m++){var l;l=k[m];if(l.match(/^[\w-]+$/)){var n=Da.exec(l.toLowerCase());if(null==n)l="";else{l=n[2];l=null==l||""==l?"n":Ca[l];n=n[1];if(null==n||""==n)n="4";else var r=Ba[n],n=r?r:isNaN(n)?"4":n.substr(0,1);l=[l,n].join("")}}else l="";l&&g.push(l)}0<g.length&&(f=g);3==c.length&&(c=c[2],g=[],c=c?c.split(","):
g,0<c.length&&(c=Aa[c[0]])&&(a.c[e]=c))}a.c[e]||(c=Aa[e])&&(a.c[e]=c);for(c=0;c<f.length;c+=1)a.a.push(new H(e,f[c]))}};function Fa(a,b){this.c=a;this.a=b}var Ga={Arimo:!0,Cousine:!0,Tinos:!0};Fa.prototype.load=function(a){var b=new C,d=this.c,c=new va(this.a.api,z(d),this.a.text),e=this.a.families;xa(c,e);var f=new za(e);Ea(f);A(d,ya(c),D(b));F(b,function(){a(f.a,f.c,Ga)})};function Ha(a,b){this.c=a;this.a=b}Ha.prototype.load=function(a){var b=this.a.id,d=this.c.m;b?B(this.c,(this.a.api||"https://use.typekit.net")+"/"+b+".js",function(b){if(b)a([]);else if(d.Typekit&&d.Typekit.config&&d.Typekit.config.fn){b=d.Typekit.config.fn;for(var e=[],f=0;f<b.length;f+=2)for(var g=b[f],k=b[f+1],h=0;h<k.length;h++)e.push(new H(g,k[h]));try{d.Typekit.load({events:!1,classes:!1,async:!0})}catch(m){}a(e)}},2E3):a([])};function Ia(a,b){this.c=a;this.f=b;this.a=[]}Ia.prototype.load=function(a){var b=this.f.id,d=this.c.m,c=this;b?(d.__webfontfontdeckmodule__||(d.__webfontfontdeckmodule__={}),d.__webfontfontdeckmodule__[b]=function(b,d){for(var g=0,k=d.fonts.length;g<k;++g){var h=d.fonts[g];c.a.push(new H(h.name,ga("font-weight:"+h.weight+";font-style:"+h.style)))}a(c.a)},B(this.c,z(this.c)+(this.f.api||"//f.fontdeck.com/s/css/js/")+ea(this.c)+"/"+b+".js",function(b){b&&a([])})):a([])};var Y=new pa(window);Y.a.c.custom=function(a,b){return new ua(b,a)};Y.a.c.fontdeck=function(a,b){return new Ia(b,a)};Y.a.c.monotype=function(a,b){return new sa(b,a)};Y.a.c.typekit=function(a,b){return new Ha(b,a)};Y.a.c.google=function(a,b){return new Fa(b,a)};var Z={load:p(Y.load,Y)};"function"===typeof define&&define.amd?define(function(){return Z}):"undefined"!==typeof module&&module.exports?module.exports=Z:(window.WebFont=Z,window.WebFontConfig&&Y.load(window.WebFontConfig));}());
</script>

<script>
    var schemaWrapper = {};
    schemaWrapper.definitions = defs;
    defsParser = new $RefParser();
    defsParser.dereference(schemaWrapper).catch(function(err) {
      console.log(err);
    });
  </script>
<script>
  $(document).ready(function () {
    $('.nav-tabs-examples').find('a:first').tab('show');
    $(this).scrollspy({ target: '#scrollingNav', offset: 18 });
  });
  </script>
</body>
</html>