package {{apiPackage}};

{{>frag/imports}}
/**
 * API client interface with high-level return types and exceptions. The implementation of this interface invokes the JAX-RS API client.
 * {{{md description}}}
 */
{{>generatedAnnotation}}
public interface {{className name}}Api extends {{apiPackage}}.ApiInvoker {

	{{#each operations}}
	{{>frag/operationVars op=. jaxrs=false}}
	{{>frag/operationDocumentation}}
	{{#if deprecated}}
	@java.lang.Deprecated
	{{/if}}
	{{#if returnNativeType}}{{{returnNativeType}}}{{else}}void{{/if}} {{identifier name}}({{{_parameters}}}){{#each (nonDefaultResponses)}}{{#if @first}} throws{{else}},{{/if}} {{#each (responseContentAndNone)}}{{#unless @first}}, {{/unless}}{{{className (concat ../../name '_' ../code)}}}{{#unless @first}}{{className content.mediaType.mediaType}}{{/unless}}Exception{{/each}}{{/each}};
	{{/each}}

	{{#each operations}}
	{{#each (nonDefaultResponses)}}
	{{#each (responseContentAndNone)}}
	/**
	 * {{{md ../description}}}
	 */
	class {{{className (concat ../../name '_' ../code)}}}{{#unless @first}}{{className content.mediaType.mediaType}}{{/unless}}Exception extends java.lang.Exception {

		private static final long serialVersionUID = 1L;
		
		{{#unless content.nativeType}}
		public {{{className (concat ../../name '_' ../code)}}}{{#unless @first}}{{className content.mediaType.mediaType}}{{/unless}}Exception() {
			
		}
		{{else}}
		private {{{content.nativeType}}} entity;
		
		public {{{className (concat ../../name '_' ../code)}}}{{#unless @first}}{{className content.mediaType.mediaType}}{{/unless}}Exception({{{content.nativeType}}} entity) {
			this.entity = entity;
		}
		
		public {{{content.nativeType}}} getEntity() {
			return this.entity;
		}
		{{/unless}}

	}

	{{/each}}
	{{/each}}
	{{/each}}
}
