import "./import";

define csharp_namespace Example;
define rust_crate example;
define dart_library_name example;

enum TestEnum {
   VAL1,
   VAL2,
   VAL10 = 10,
   VAL11,
   VAL12
}

type Test {
   atom: TestAtom;
   array: TestAtom[];
   enumValue: TestEnum;
   map: {int, TestAtom};
}


type AddValueRequest {
   value1: float;
   value2: float;
}

type AddValueResponse {
   value: float;
}

service TestService {
   @Description("Add two numbers")
   @Param("request", "Parameter containing the two numbers")
   @Returns("")
   AddValuesSingleParam(request: AddValueRequest): AddValueResponse;

   @Description("Add two numbers")
   @Param("value1", "The first value")
   @Param("value2", "The second value")
   AddValuesMultipleParams(value1: float, value2: float): float;

   @Description("Does literaly nothing")
   @Param("param1", "Some number")
   ReturningVoid(param1: float): void;

   @Description("Just sends an Event with a String")
   @Param("param1", "Parameter with some string for event")
   notification OnEvent(param1: string);

   ThrowingError(): void;


   FunctionWithArrayAsParamAndReturn(values1: float[], values2: float[]): float[];

   FunctionWithKeywords(type: float, static: float, event: float): float;
}

type Test2 {
   name: string;
   age:  int;
}

type TestKeywords {
   type: float;
   static: float;
   event: float;
}

service SimpleTestService {
   @Description("asdasdasd")
   GetTest(name: string, age: int): Test2;
   notification TestNot();
}
