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

thriftee-test-objects.0.4.0.source-code.everything.thrift Maven / Gradle / Ivy

There is a newer version: 0.5.0
Show newest version
/** this is just a test IDL file for trying out things with the XML protocol */

namespace java everything
namespace xml evrything // (targetNamespace = "http://example.com/ns", test = "any")

include "nothing_all_at_once.thrift"

const byte     I8_CONST  = 42
const i64    I64_CONST = 42000000000
const i32    INT_CONST = 42
const string STR_CONST = "test constant string"
const double DBL_CONST = 42.0

/** this is a set const */
const set SET_CONST  = [ 'test1', 'test2', 'test3' ]

/** an enum doc */
enum Spinkle {
  HRRR, /** this is the second member */ PPOL /*(order = "second")*/, REWT
}

/** this is a list const */
const list LIST_CONST = [ 'test3', 'test5', 'test6' ]
const map MAP_CONST  = { 'test7': 'test8', 'test9' : 'test10' }
const map> MAP_MAP_CONST  = { 
  42 : { 'test7': 'test8', 'test9' : 'test10' },
  43 : { 'test7': 'test8', 'test9' : 'test10' }
}
const map ENUM_MAP_CONST = { Spinkle.PPOL : "test" }

typedef i32 dukk
typedef i32 int32
typedef Sprat poig
typedef Spirfle plorp
/**
 * this goes with a typedef.
 * also it has line breaks.
 */
typedef nothing_all_at_once.Blotto hammlegaff //(it.also = 'has.annotations')
typedef set setdef
typedef list listdef
typedef map mapdef
typedef list> biglist

/** some union doc & "stuff" */
union Sprat {
  1: string woobie;
  2: i32 wowzer;
  3: Spinkle wheee;
}

struct Spirfle {
  1: string giffle;
  2: i32 flar;
  3: Spinkle spinkle;
  4: dukk spoot;
  5: poig sprat;
  6: hammlegaff blotto;
}

/**
  This struct has a bunch of different fields
 */
struct Everything {
  1:  required string str = "default" (field.annot = 'true');
  2:  optional i64 int64;
  3:  i32 int32;
  4:  i16 int16;
  5:  byte bite;
  6:  double dbl;
  7:  binary bin;
  8:  Spinkle enu;
  9:  Sprat onion;
  10: list str_list;
  11: list enum_list;
  12: list obj_list;
  13: list> int_list_list;
  14: map str_str_map;
  15: map int_str_map;
  16: map int_obj_map;
  17: Spirfle obj;
  18: set str_set;
  19: set obj_set;
  20: nothing_all_at_once.Blotto smork;
  21: map> enum_list_map;
  22: optional bool really = true;
  23: string empty;
  24: int32 someint;
  25: poig someobj;
  26: hammlegaff someobj2;
  /*
  27: setdef someset;
  28: mapdef somemap;
  29: listdef somelist;
  30: biglist listtype;
  */
} (struct.annot = 'true')

/** trying out an exception */
exception EndOfTheUniverseException {
  1: string msg;
}

/** this service has some documentation */
service Universe extends nothing_all_at_once.Metaverse {
  i32 grok(1: Everything everything) throws (1:EndOfTheUniverseException endOfIt),
  /** this is oneway so should have a void result */
  oneway void sendIt(),
  Everything bang(1: i32 fortyTwo);
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy