Index: openda_bmi/bmi.py =================================================================== diff -u -rfbd077ecd824c16e9e207b542e5ee2f9f9ff92dd -r67ee1270099b7f14962d5cf00571d3c3af3a851c --- openda_bmi/bmi.py (.../bmi.py) (revision fbd077ecd824c16e9e207b542e5ee2f9f9ff92dd) +++ openda_bmi/bmi.py (.../bmi.py) (revision 67ee1270099b7f14962d5cf00571d3c3af3a851c) @@ -1,14 +1,26 @@ #! /usr/bin/env python """ -To create this file the original version of the CSDMS BMI Python Language Binding -from https://github.com/csdms/bmi-python/blob/master/bmi/bmi.py was extended with a number of extra functions -so that it can be used in OpenDA. All extra functions are contained in the class EBmi. +2015-03-06 +Deltares +Arno Kockx -Also added additional comments. Where the original version of the CSDMS BMI Python Language Binding was ambiguous, the -information from http://csdms.colorado.edu/wiki/BMI_Description and common sense were used to fill in most of the gaps. +To create this file the original version of the CSDMS BMI Python Language Binding (file bmi.py) from https://github.com/csdms/bmi-python/blob/master/bmi/bmi.py was extended so that it can be used in OpenDA. + +The following changes were made: +1. All grid information functions have been merged into the Bmi class, so that different variables within the same model can have different grids. +2. Added function get_grid_type to get the grid type for a given variable. +3. Added function save_state to ask the model to save its state to disk. +4. Added comments. Where the original version of the CSDMS BMI Python Language Binding was ambiguous, the information from http://csdms.colorado.edu/wiki/BMI_Description and common sense were used to fill in most of the gaps. """ +""" +2018-2-10 +Netherlands eScience Center +Gijs van den Oord +Modifications to comply with modern csdms BMI. +""" + from abc import ABCMeta, abstractmethod @@ -17,11 +29,10 @@ Enumeration with grid types. """ - UNKNOWN = 0 - UNIFORM = 1 - RECTILINEAR = 2 - STRUCTURED = 3 - UNSTRUCTURED = 4 + UNIFORM = "uniform_rectilinear" + RECTILINEAR = "rectilinear" + STRUCTURED = "structured_quadrilateral" + UNSTRUCTURED = "unstructured" class Bmi(object, metaclass=ABCMeta): @@ -71,6 +82,17 @@ raise NotImplementedError @abstractmethod + def save_state(self, destination_directory): + """ + Ask the model to write its complete internal current state to one or more state files in the given directory. + Afterwards the given directory should only contain the state files and nothing else. + + Input parameters: + File destination_directory: the directory in which the state files should be written. + """ + raise NotImplementedError + + @abstractmethod def finalize(self): """ Finalize the model. @@ -160,11 +182,22 @@ String long_var_name: identifier of a variable in the model. Return value: - ???: ??? + Integer: total number of bytes taken by the return array of get_var(long_var_name) """ raise NotImplementedError @abstractmethod + def get_var_itemsize(self, long_var_name): + """ + Input parameters: + String long_var_name: identifier of a variable in the model. + + Return value: + Integer: size, in bytes, of each item of the variable + """ + raise NotImplementedError + + @abstractmethod def get_start_time(self): """ Return value: @@ -215,8 +248,8 @@ String long_var_name: identifier of a variable in the model. Return value: - Numpy array of values in the data type returned by the function get_var_type: all values of the given variable. - For a 2D grid these values must be in row major order, starting with the bottom row. + Flat numpy array of values in the data type returned by the function get_var_type: all values of the given + variable. """ raise NotImplementedError @@ -225,13 +258,10 @@ """ Input parameters: String long_var_name: identifier of a variable in the model. - List of Lists of integers inds: each nested List contains one index for each dimension of the given variable, - i.e. each nested List indicates one element in the multi-dimensional variable array, - e.g. [[0, 0, 0], [0, 0, 1], [0, 15, 19], [0, 15, 20], [0, 15, 21]] indicates 5 elements in a 3D grid. - For a grid the indices start counting at the grid origin, i.e. the lower left corner for a 2D grid. - + Lists of integers inds: denotes the indices within the flattened list that get_value(long_var_name) returns. Return value: - Numpy array of values in the data type returned by the function get_var_type: one value for each of the indicated elements. + Numpy array of values in the data type returned by the function get_var_type: one value for each of the + indicated elements. """ raise NotImplementedError @@ -240,8 +270,7 @@ """ Input parameters: String long_var_name: identifier of a variable in the model. - Numpy array of values in the data type returned by the function get_var_type src: all values to set for the given variable. - For a 2D grid these values must be in row major order, starting with the bottom row. + Numpy array of values src: all values to set for the given variable. """ raise NotImplementedError @@ -250,11 +279,8 @@ """ Input parameters: String long_var_name: identifier of a variable in the model. - List of Lists of integers inds: each nested List contains one index for each dimension of the given variable, - i.e. each nested List indicates one element in the multi-dimensional variable array, - e.g. [[0, 0], [0, 1], [15, 19], [15, 20], [15, 21]] indicates 5 elements in a 2D grid. - For a grid the indices start counting at the grid origin, i.e. the lower left corner for a 2D grid. - Numpy array of values in the data type returned by the function get_var_type src: one value to set for each of the indicated elements. + Lists of integers inds: denotes the indices within the flattened list that get_value(long_var_name) returns. + Numpy array of values src: one value to set for each of the indicated elements. """ raise NotImplementedError @@ -263,124 +289,158 @@ """ @abstractmethod - def get_grid_type(self, long_var_name): + def get_var_grid(self, long_var_name): """ Input parameters: String long_var_name: identifier of a variable in the model. Return value: - BmiGridType type of the grid geometry of the given variable. + Integer: identifier for the grid on which the variable is defined. """ raise NotImplementedError @abstractmethod - def get_grid_shape(self, long_var_name): + def get_grid_type(self, grid_id): """ + Input parameters: + Integer grid_id: identifier of a grid in the model. + + Return value: + string type of the grid geometry of the given variable. + """ + raise NotImplementedError + + @abstractmethod + def get_grid_rank(self, grid_id): + """ + Input parameters: + Integer grid_id: identifier of a grid in the model. + + Return value: + Integer: number of values returned by get_grid_shape(grid_id) + """ + raise NotImplementedError + + @abstractmethod + def get_grid_shape(self, grid_id): + """ Only return something for variables with a uniform, rectilinear or structured grid. Otherwise raise ValueError. Input parameters: - String long_var_name: identifier of a variable in the model. + Integer grid_id: identifier of a grid in the model. Return value: - List of integers: the sizes of the dimensions of the given variable, e.g. [400, 500] for a 2D grid with 400 rows and 500 columns. - The dimensions are ordered [y, x] or [z, y, x]. + List of integers: the sizes of the dimensions of the given variable, e.g. [500, 400] for a 2D grid with 500x400 + grid cells. """ raise NotImplementedError @abstractmethod - def get_grid_spacing(self, long_var_name): + def get_grid_size(self, grid_id): """ + Input parameters: + Integer grid_id: identifier of a grid in the model. + Integer: The total size (nr of cells) of the grid with identifier grid_id + """ + raise NotImplementedError + + @abstractmethod + def get_grid_spacing(self, grid_id): + """ Only return something for variables with a uniform grid. Otherwise raise ValueError. Input parameters: - String long_var_name: identifier of a variable in the model. + Integer grid_id: identifier of a grid in the model. Return value: - List of doubles: the size of a grid cell for each of the dimensions of the given variable, e.g. [cellHeight, cellWidth] for a 2D grid. - The dimensions are ordered [y, x] or [z, y, x]. + Double: in case of a uniform equidistant grid, returns the distance between two neighboring cell centres. """ raise NotImplementedError @abstractmethod - def get_grid_origin(self, long_var_name): + def get_grid_origin(self, grid_id): """ Only return something for variables with a uniform grid. Otherwise raise ValueError. Input parameters: - String long_var_name: identifier of a variable in the model. + Integer grid_id: identifier of a grid in the model. Return value: - List of doubles: the coordinate of the grid origin for each of the dimensions of the given variable. - For a 2D grid this must be the lower left corner of the grid. - The dimensions are ordered [y, x] or [z, y, x]. + List of doubles: components of the location of the lower-left corner of the grid """ raise NotImplementedError @abstractmethod - def get_grid_x(self, long_var_name): + def get_grid_x(self, grid_id): """ - Only return something for variables with a rectilinear, structured or unstructured grid. Otherwise raise ValueError. + Only return something for variables with a rectilinear, structured or unstructured grid. Otherwise raise + ValueError. Input parameters: String long_var_name: identifier of a variable in the model. Return value: - Numpy array of doubles: x coordinate of grid cell center for each grid cell, in the same order as the values returned by function get_value. + Numpy array of doubles: x coordinate of grid cell center for each grid cell, in the same order as the values + returned by function get_value. For a rectilinear grid: x coordinate of column center for each column. """ raise NotImplementedError @abstractmethod - def get_grid_y(self, long_var_name): + def get_grid_y(self, grid_id): """ - Only return something for variables with a rectilinear, structured or unstructured grid. Otherwise raise ValueError. + Only return something for variables with a rectilinear, structured or unstructured grid. Otherwise raise + ValueError. Input parameters: String long_var_name: identifier of a variable in the model. Return value: - Numpy array of doubles: y coordinate of grid cell center for each grid cell, in the same order as the values returned by function get_value. + Numpy array of doubles: y coordinate of grid cell center for each grid cell, in the same order as the values + returned by function get_value. For a rectilinear grid: y coordinate of row center for each row. """ raise NotImplementedError @abstractmethod - def get_grid_z(self, long_var_name): + def get_grid_z(self, grid_id): """ - Only return something for variables with a rectilinear, structured or unstructured grid. Otherwise raise ValueError. + Only return something for variables with a rectilinear, structured or unstructured grid. Otherwise raise + ValueError. Input parameters: String long_var_name: identifier of a variable in the model. Return value: - Numpy array of doubles: z coordinate of grid cell center for each grid cell, in the same order as the values returned by function get_value. + Numpy array of doubles: z coordinate of grid cell center for each grid cell, in the same order as the values + returned by function get_value. For a rectilinear grid: z coordinate of layer center for each layer. """ raise NotImplementedError @abstractmethod - def get_grid_connectivity(self, long_var_name): + def get_grid_connectivity(self, grid_id): """ Only return something for variables with an unstructured grid. Otherwise raise ValueError. Input parameters: String long_var_name: identifier of a variable in the model. Return value: - ??? + List of integers, defining the cell corners for each cell. """ raise NotImplementedError @abstractmethod - def get_grid_offset(self, long_var_name): + def get_grid_offset(self, grid_id): """ Only return something for variables with an unstructured grid. Otherwise raise ValueError. Input parameters: String long_var_name: identifier of a variable in the model. Return value: - ??? + List of integers, defining the grid offset for each cell. """ raise NotImplementedError Index: openda_bmi/openda/bmi/thrift/BMIService.py =================================================================== diff -u -rfbd077ecd824c16e9e207b542e5ee2f9f9ff92dd -r67ee1270099b7f14962d5cf00571d3c3af3a851c --- openda_bmi/openda/bmi/thrift/BMIService.py (.../BMIService.py) (revision fbd077ecd824c16e9e207b542e5ee2f9f9ff92dd) +++ openda_bmi/openda/bmi/thrift/BMIService.py (.../BMIService.py) (revision 67ee1270099b7f14962d5cf00571d3c3af3a851c) @@ -1,232 +1,260 @@ # -# Autogenerated by Thrift Compiler (0.9.0) +# Autogenerated by Thrift Compiler (0.11.0) # # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING # # options string: py:new_style # -from thrift.Thrift import TType, TMessageType, TException, TApplicationException +from thrift.Thrift import TType, TMessageType, TFrozenDict, TException, TApplicationException +from thrift.protocol.TProtocol import TProtocolException +from thrift.TRecursive import fix_spec + +import sys +import logging from .ttypes import * from thrift.Thrift import TProcessor from thrift.transport import TTransport -from thrift.protocol import TBinaryProtocol, TProtocol +all_structs = [] -try: - from thrift.protocol import fastbinary -except: - fastbinary = None - class Iface(object): def initialize(self, file): """ - Parameters: - - file - """ + Parameters: + - file + """ + pass - def update(self,): + def update(self): pass def update_until(self, time): """ - Parameters: - - time - """ + Parameters: + - time + """ + pass def update_frac(self, frac): """ - Parameters: - - frac - """ + Parameters: + - frac + """ + pass - def finalize_model(self,): + def finalize_model(self): pass - def get_component_name(self,): + def get_component_name(self): pass - def get_input_var_names(self,): + def get_input_var_names(self): pass - def get_output_var_names(self,): + def get_output_var_names(self): pass def get_var_type(self, long_var_name): """ - Parameters: - - long_var_name - """ + Parameters: + - long_var_name + """ + pass def get_var_units(self, long_var_name): """ - Parameters: - - long_var_name - """ + Parameters: + - long_var_name + """ + pass def get_var_rank(self, long_var_name): """ - Parameters: - - long_var_name - """ + Parameters: + - long_var_name + """ + pass def get_var_size(self, long_var_name): """ - Parameters: - - long_var_name - """ + Parameters: + - long_var_name + """ + pass def get_var_nbytes(self, long_var_name): """ - Parameters: - - long_var_name - """ + Parameters: + - long_var_name + """ + pass - def get_start_time(self,): + def get_start_time(self): pass - def get_current_time(self,): + def get_current_time(self): pass - def get_end_time(self,): + def get_end_time(self): pass - def get_time_step(self,): + def get_time_step(self): pass - def get_time_units(self,): + def get_time_units(self): pass def get_value(self, long_var_name): """ - Parameters: - - long_var_name - """ + Parameters: + - long_var_name + """ + pass def get_value_at_indices(self, long_var_name, inds): """ - Parameters: - - long_var_name - - inds - """ + Parameters: + - long_var_name + - inds + """ + pass def set_value(self, long_var_name, src): """ - Parameters: - - long_var_name - - src - """ + Parameters: + - long_var_name + - src + """ + pass def set_value_at_indices(self, long_var_name, inds, src): """ - Parameters: - - long_var_name - - inds - - src - """ + Parameters: + - long_var_name + - inds + - src + """ + pass def get_grid_type(self, long_var_name): """ - Parameters: - - long_var_name - """ + Parameters: + - long_var_name + """ + pass def get_grid_shape(self, long_var_name): """ - Parameters: - - long_var_name - """ + Parameters: + - long_var_name + """ + pass def get_grid_spacing(self, long_var_name): """ - Parameters: - - long_var_name - """ + Parameters: + - long_var_name + """ + pass def get_grid_origin(self, long_var_name): """ - Parameters: - - long_var_name - """ + Parameters: + - long_var_name + """ + pass def get_grid_x(self, long_var_name): """ - Parameters: - - long_var_name - """ + Parameters: + - long_var_name + """ + pass def get_grid_y(self, long_var_name): """ - Parameters: - - long_var_name - """ + Parameters: + - long_var_name + """ + pass def get_grid_z(self, long_var_name): """ - Parameters: - - long_var_name - """ + Parameters: + - long_var_name + """ + pass def get_grid_connectivity(self, long_var_name): """ - Parameters: - - long_var_name - """ + Parameters: + - long_var_name + """ + pass def get_grid_offset(self, long_var_name): """ - Parameters: - - long_var_name - """ + Parameters: + - long_var_name + """ + pass def initialize_config(self, file): """ - Parameters: - - file - """ + Parameters: + - file + """ + pass - def initialize_model(self,): + def initialize_model(self): pass def set_start_time(self, start_time): """ - Parameters: - - start_time - """ + Parameters: + - start_time + """ + pass def set_end_time(self, end_time): """ - Parameters: - - end_time - """ + Parameters: + - end_time + """ + pass - def get_attribute_names(self,): + def get_attribute_names(self): pass def get_attribute_value(self, attribute_name): """ - Parameters: - - attribute_name - """ + Parameters: + - attribute_name + """ + pass def set_attribute_value(self, attribute_name, attribute_value): """ - Parameters: - - attribute_name - - attribute_value - """ + Parameters: + - attribute_name + - attribute_value + """ + pass def save_state(self, destination_directory): """ - Parameters: - - destination_directory - """ + Parameters: + - destination_directory + """ + pass def load_state(self, source_directory): """ - Parameters: - - source_directory - """ + Parameters: + - source_directory + """ + pass class Client(Iface): @@ -238,656 +266,627 @@ def initialize(self, file): """ - Parameters: - - file - """ + Parameters: + - file + """ self.send_initialize(file) self.recv_initialize() def send_initialize(self, file): - self._oprot.writeMessageBegin("initialize", TMessageType.CALL, self._seqid) + self._oprot.writeMessageBegin('initialize', TMessageType.CALL, self._seqid) args = initialize_args() args.file = file args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() - def recv_initialize(self,): - (fname, mtype, rseqid) = self._iprot.readMessageBegin() + def recv_initialize(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() - x.read(self._iprot) - self._iprot.readMessageEnd() + x.read(iprot) + iprot.readMessageEnd() raise x result = initialize_result() - result.read(self._iprot) - self._iprot.readMessageEnd() + result.read(iprot) + iprot.readMessageEnd() if result.error is not None: raise result.error return - def update(self,): + def update(self): self.send_update() self.recv_update() - def send_update(self,): - self._oprot.writeMessageBegin("update", TMessageType.CALL, self._seqid) + def send_update(self): + self._oprot.writeMessageBegin('update', TMessageType.CALL, self._seqid) args = update_args() args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() - def recv_update(self,): - (fname, mtype, rseqid) = self._iprot.readMessageBegin() + def recv_update(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() - x.read(self._iprot) - self._iprot.readMessageEnd() + x.read(iprot) + iprot.readMessageEnd() raise x result = update_result() - result.read(self._iprot) - self._iprot.readMessageEnd() + result.read(iprot) + iprot.readMessageEnd() if result.error is not None: raise result.error return def update_until(self, time): """ - Parameters: - - time - """ + Parameters: + - time + """ self.send_update_until(time) self.recv_update_until() def send_update_until(self, time): - self._oprot.writeMessageBegin("update_until", TMessageType.CALL, self._seqid) + self._oprot.writeMessageBegin('update_until', TMessageType.CALL, self._seqid) args = update_until_args() args.time = time args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() - def recv_update_until(self,): - (fname, mtype, rseqid) = self._iprot.readMessageBegin() + def recv_update_until(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() - x.read(self._iprot) - self._iprot.readMessageEnd() + x.read(iprot) + iprot.readMessageEnd() raise x result = update_until_result() - result.read(self._iprot) - self._iprot.readMessageEnd() + result.read(iprot) + iprot.readMessageEnd() if result.error is not None: raise result.error return def update_frac(self, frac): """ - Parameters: - - frac - """ + Parameters: + - frac + """ self.send_update_frac(frac) self.recv_update_frac() def send_update_frac(self, frac): - self._oprot.writeMessageBegin("update_frac", TMessageType.CALL, self._seqid) + self._oprot.writeMessageBegin('update_frac', TMessageType.CALL, self._seqid) args = update_frac_args() args.frac = frac args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() - def recv_update_frac(self,): - (fname, mtype, rseqid) = self._iprot.readMessageBegin() + def recv_update_frac(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() - x.read(self._iprot) - self._iprot.readMessageEnd() + x.read(iprot) + iprot.readMessageEnd() raise x result = update_frac_result() - result.read(self._iprot) - self._iprot.readMessageEnd() + result.read(iprot) + iprot.readMessageEnd() if result.error is not None: raise result.error return - def finalize_model(self,): + def finalize_model(self): self.send_finalize_model() self.recv_finalize_model() - def send_finalize_model(self,): - self._oprot.writeMessageBegin("finalize_model", TMessageType.CALL, self._seqid) + def send_finalize_model(self): + self._oprot.writeMessageBegin('finalize_model', TMessageType.CALL, self._seqid) args = finalize_model_args() args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() - def recv_finalize_model(self,): - (fname, mtype, rseqid) = self._iprot.readMessageBegin() + def recv_finalize_model(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() - x.read(self._iprot) - self._iprot.readMessageEnd() + x.read(iprot) + iprot.readMessageEnd() raise x result = finalize_model_result() - result.read(self._iprot) - self._iprot.readMessageEnd() + result.read(iprot) + iprot.readMessageEnd() if result.error is not None: raise result.error return - def get_component_name(self,): + def get_component_name(self): self.send_get_component_name() return self.recv_get_component_name() - def send_get_component_name(self,): - self._oprot.writeMessageBegin( - "get_component_name", TMessageType.CALL, self._seqid - ) + def send_get_component_name(self): + self._oprot.writeMessageBegin('get_component_name', TMessageType.CALL, self._seqid) args = get_component_name_args() args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() - def recv_get_component_name(self,): - (fname, mtype, rseqid) = self._iprot.readMessageBegin() + def recv_get_component_name(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() - x.read(self._iprot) - self._iprot.readMessageEnd() + x.read(iprot) + iprot.readMessageEnd() raise x result = get_component_name_result() - result.read(self._iprot) - self._iprot.readMessageEnd() + result.read(iprot) + iprot.readMessageEnd() if result.success is not None: return result.success if result.error is not None: raise result.error - raise TApplicationException( - TApplicationException.MISSING_RESULT, - "get_component_name failed: unknown result", - ) + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_component_name failed: unknown result") - def get_input_var_names(self,): + def get_input_var_names(self): self.send_get_input_var_names() return self.recv_get_input_var_names() - def send_get_input_var_names(self,): - self._oprot.writeMessageBegin( - "get_input_var_names", TMessageType.CALL, self._seqid - ) + def send_get_input_var_names(self): + self._oprot.writeMessageBegin('get_input_var_names', TMessageType.CALL, self._seqid) args = get_input_var_names_args() args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() - def recv_get_input_var_names(self,): - (fname, mtype, rseqid) = self._iprot.readMessageBegin() + def recv_get_input_var_names(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() - x.read(self._iprot) - self._iprot.readMessageEnd() + x.read(iprot) + iprot.readMessageEnd() raise x result = get_input_var_names_result() - result.read(self._iprot) - self._iprot.readMessageEnd() + result.read(iprot) + iprot.readMessageEnd() if result.success is not None: return result.success - raise TApplicationException( - TApplicationException.MISSING_RESULT, - "get_input_var_names failed: unknown result", - ) + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_input_var_names failed: unknown result") - def get_output_var_names(self,): + def get_output_var_names(self): self.send_get_output_var_names() return self.recv_get_output_var_names() - def send_get_output_var_names(self,): - self._oprot.writeMessageBegin( - "get_output_var_names", TMessageType.CALL, self._seqid - ) + def send_get_output_var_names(self): + self._oprot.writeMessageBegin('get_output_var_names', TMessageType.CALL, self._seqid) args = get_output_var_names_args() args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() - def recv_get_output_var_names(self,): - (fname, mtype, rseqid) = self._iprot.readMessageBegin() + def recv_get_output_var_names(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() - x.read(self._iprot) - self._iprot.readMessageEnd() + x.read(iprot) + iprot.readMessageEnd() raise x result = get_output_var_names_result() - result.read(self._iprot) - self._iprot.readMessageEnd() + result.read(iprot) + iprot.readMessageEnd() if result.success is not None: return result.success - raise TApplicationException( - TApplicationException.MISSING_RESULT, - "get_output_var_names failed: unknown result", - ) + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_output_var_names failed: unknown result") def get_var_type(self, long_var_name): """ - Parameters: - - long_var_name - """ + Parameters: + - long_var_name + """ self.send_get_var_type(long_var_name) return self.recv_get_var_type() def send_get_var_type(self, long_var_name): - self._oprot.writeMessageBegin("get_var_type", TMessageType.CALL, self._seqid) + self._oprot.writeMessageBegin('get_var_type', TMessageType.CALL, self._seqid) args = get_var_type_args() args.long_var_name = long_var_name args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() - def recv_get_var_type(self,): - (fname, mtype, rseqid) = self._iprot.readMessageBegin() + def recv_get_var_type(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() - x.read(self._iprot) - self._iprot.readMessageEnd() + x.read(iprot) + iprot.readMessageEnd() raise x result = get_var_type_result() - result.read(self._iprot) - self._iprot.readMessageEnd() + result.read(iprot) + iprot.readMessageEnd() if result.success is not None: return result.success - raise TApplicationException( - TApplicationException.MISSING_RESULT, "get_var_type failed: unknown result" - ) + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_var_type failed: unknown result") def get_var_units(self, long_var_name): """ - Parameters: - - long_var_name - """ + Parameters: + - long_var_name + """ self.send_get_var_units(long_var_name) return self.recv_get_var_units() def send_get_var_units(self, long_var_name): - self._oprot.writeMessageBegin("get_var_units", TMessageType.CALL, self._seqid) + self._oprot.writeMessageBegin('get_var_units', TMessageType.CALL, self._seqid) args = get_var_units_args() args.long_var_name = long_var_name args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() - def recv_get_var_units(self,): - (fname, mtype, rseqid) = self._iprot.readMessageBegin() + def recv_get_var_units(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() - x.read(self._iprot) - self._iprot.readMessageEnd() + x.read(iprot) + iprot.readMessageEnd() raise x result = get_var_units_result() - result.read(self._iprot) - self._iprot.readMessageEnd() + result.read(iprot) + iprot.readMessageEnd() if result.success is not None: return result.success - raise TApplicationException( - TApplicationException.MISSING_RESULT, "get_var_units failed: unknown result" - ) + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_var_units failed: unknown result") def get_var_rank(self, long_var_name): """ - Parameters: - - long_var_name - """ + Parameters: + - long_var_name + """ self.send_get_var_rank(long_var_name) return self.recv_get_var_rank() def send_get_var_rank(self, long_var_name): - self._oprot.writeMessageBegin("get_var_rank", TMessageType.CALL, self._seqid) + self._oprot.writeMessageBegin('get_var_rank', TMessageType.CALL, self._seqid) args = get_var_rank_args() args.long_var_name = long_var_name args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() - def recv_get_var_rank(self,): - (fname, mtype, rseqid) = self._iprot.readMessageBegin() + def recv_get_var_rank(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() - x.read(self._iprot) - self._iprot.readMessageEnd() + x.read(iprot) + iprot.readMessageEnd() raise x result = get_var_rank_result() - result.read(self._iprot) - self._iprot.readMessageEnd() + result.read(iprot) + iprot.readMessageEnd() if result.success is not None: return result.success - raise TApplicationException( - TApplicationException.MISSING_RESULT, "get_var_rank failed: unknown result" - ) + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_var_rank failed: unknown result") def get_var_size(self, long_var_name): """ - Parameters: - - long_var_name - """ + Parameters: + - long_var_name + """ self.send_get_var_size(long_var_name) return self.recv_get_var_size() def send_get_var_size(self, long_var_name): - self._oprot.writeMessageBegin("get_var_size", TMessageType.CALL, self._seqid) + self._oprot.writeMessageBegin('get_var_size', TMessageType.CALL, self._seqid) args = get_var_size_args() args.long_var_name = long_var_name args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() - def recv_get_var_size(self,): - (fname, mtype, rseqid) = self._iprot.readMessageBegin() + def recv_get_var_size(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() - x.read(self._iprot) - self._iprot.readMessageEnd() + x.read(iprot) + iprot.readMessageEnd() raise x result = get_var_size_result() - result.read(self._iprot) - self._iprot.readMessageEnd() + result.read(iprot) + iprot.readMessageEnd() if result.success is not None: return result.success - raise TApplicationException( - TApplicationException.MISSING_RESULT, "get_var_size failed: unknown result" - ) + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_var_size failed: unknown result") def get_var_nbytes(self, long_var_name): """ - Parameters: - - long_var_name - """ + Parameters: + - long_var_name + """ self.send_get_var_nbytes(long_var_name) return self.recv_get_var_nbytes() def send_get_var_nbytes(self, long_var_name): - self._oprot.writeMessageBegin("get_var_nbytes", TMessageType.CALL, self._seqid) + self._oprot.writeMessageBegin('get_var_nbytes', TMessageType.CALL, self._seqid) args = get_var_nbytes_args() args.long_var_name = long_var_name args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() - def recv_get_var_nbytes(self,): - (fname, mtype, rseqid) = self._iprot.readMessageBegin() + def recv_get_var_nbytes(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() - x.read(self._iprot) - self._iprot.readMessageEnd() + x.read(iprot) + iprot.readMessageEnd() raise x result = get_var_nbytes_result() - result.read(self._iprot) - self._iprot.readMessageEnd() + result.read(iprot) + iprot.readMessageEnd() if result.success is not None: return result.success - raise TApplicationException( - TApplicationException.MISSING_RESULT, - "get_var_nbytes failed: unknown result", - ) + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_var_nbytes failed: unknown result") - def get_start_time(self,): + def get_start_time(self): self.send_get_start_time() return self.recv_get_start_time() - def send_get_start_time(self,): - self._oprot.writeMessageBegin("get_start_time", TMessageType.CALL, self._seqid) + def send_get_start_time(self): + self._oprot.writeMessageBegin('get_start_time', TMessageType.CALL, self._seqid) args = get_start_time_args() args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() - def recv_get_start_time(self,): - (fname, mtype, rseqid) = self._iprot.readMessageBegin() + def recv_get_start_time(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() - x.read(self._iprot) - self._iprot.readMessageEnd() + x.read(iprot) + iprot.readMessageEnd() raise x result = get_start_time_result() - result.read(self._iprot) - self._iprot.readMessageEnd() + result.read(iprot) + iprot.readMessageEnd() if result.success is not None: return result.success - raise TApplicationException( - TApplicationException.MISSING_RESULT, - "get_start_time failed: unknown result", - ) + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_start_time failed: unknown result") - def get_current_time(self,): + def get_current_time(self): self.send_get_current_time() return self.recv_get_current_time() - def send_get_current_time(self,): - self._oprot.writeMessageBegin( - "get_current_time", TMessageType.CALL, self._seqid - ) + def send_get_current_time(self): + self._oprot.writeMessageBegin('get_current_time', TMessageType.CALL, self._seqid) args = get_current_time_args() args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() - def recv_get_current_time(self,): - (fname, mtype, rseqid) = self._iprot.readMessageBegin() + def recv_get_current_time(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() - x.read(self._iprot) - self._iprot.readMessageEnd() + x.read(iprot) + iprot.readMessageEnd() raise x result = get_current_time_result() - result.read(self._iprot) - self._iprot.readMessageEnd() + result.read(iprot) + iprot.readMessageEnd() if result.success is not None: return result.success - raise TApplicationException( - TApplicationException.MISSING_RESULT, - "get_current_time failed: unknown result", - ) + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_current_time failed: unknown result") - def get_end_time(self,): + def get_end_time(self): self.send_get_end_time() return self.recv_get_end_time() - def send_get_end_time(self,): - self._oprot.writeMessageBegin("get_end_time", TMessageType.CALL, self._seqid) + def send_get_end_time(self): + self._oprot.writeMessageBegin('get_end_time', TMessageType.CALL, self._seqid) args = get_end_time_args() args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() - def recv_get_end_time(self,): - (fname, mtype, rseqid) = self._iprot.readMessageBegin() + def recv_get_end_time(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() - x.read(self._iprot) - self._iprot.readMessageEnd() + x.read(iprot) + iprot.readMessageEnd() raise x result = get_end_time_result() - result.read(self._iprot) - self._iprot.readMessageEnd() + result.read(iprot) + iprot.readMessageEnd() if result.success is not None: return result.success - raise TApplicationException( - TApplicationException.MISSING_RESULT, "get_end_time failed: unknown result" - ) + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_end_time failed: unknown result") - def get_time_step(self,): + def get_time_step(self): self.send_get_time_step() return self.recv_get_time_step() - def send_get_time_step(self,): - self._oprot.writeMessageBegin("get_time_step", TMessageType.CALL, self._seqid) + def send_get_time_step(self): + self._oprot.writeMessageBegin('get_time_step', TMessageType.CALL, self._seqid) args = get_time_step_args() args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() - def recv_get_time_step(self,): - (fname, mtype, rseqid) = self._iprot.readMessageBegin() + def recv_get_time_step(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() - x.read(self._iprot) - self._iprot.readMessageEnd() + x.read(iprot) + iprot.readMessageEnd() raise x result = get_time_step_result() - result.read(self._iprot) - self._iprot.readMessageEnd() + result.read(iprot) + iprot.readMessageEnd() if result.success is not None: return result.success - raise TApplicationException( - TApplicationException.MISSING_RESULT, "get_time_step failed: unknown result" - ) + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_time_step failed: unknown result") - def get_time_units(self,): + def get_time_units(self): self.send_get_time_units() return self.recv_get_time_units() - def send_get_time_units(self,): - self._oprot.writeMessageBegin("get_time_units", TMessageType.CALL, self._seqid) + def send_get_time_units(self): + self._oprot.writeMessageBegin('get_time_units', TMessageType.CALL, self._seqid) args = get_time_units_args() args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() - def recv_get_time_units(self,): - (fname, mtype, rseqid) = self._iprot.readMessageBegin() + def recv_get_time_units(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() - x.read(self._iprot) - self._iprot.readMessageEnd() + x.read(iprot) + iprot.readMessageEnd() raise x result = get_time_units_result() - result.read(self._iprot) - self._iprot.readMessageEnd() + result.read(iprot) + iprot.readMessageEnd() if result.success is not None: return result.success - raise TApplicationException( - TApplicationException.MISSING_RESULT, - "get_time_units failed: unknown result", - ) + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_time_units failed: unknown result") def get_value(self, long_var_name): """ - Parameters: - - long_var_name - """ + Parameters: + - long_var_name + """ self.send_get_value(long_var_name) return self.recv_get_value() def send_get_value(self, long_var_name): - self._oprot.writeMessageBegin("get_value", TMessageType.CALL, self._seqid) + self._oprot.writeMessageBegin('get_value', TMessageType.CALL, self._seqid) args = get_value_args() args.long_var_name = long_var_name args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() - def recv_get_value(self,): - (fname, mtype, rseqid) = self._iprot.readMessageBegin() + def recv_get_value(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() - x.read(self._iprot) - self._iprot.readMessageEnd() + x.read(iprot) + iprot.readMessageEnd() raise x result = get_value_result() - result.read(self._iprot) - self._iprot.readMessageEnd() + result.read(iprot) + iprot.readMessageEnd() if result.success is not None: return result.success if result.error is not None: raise result.error - raise TApplicationException( - TApplicationException.MISSING_RESULT, "get_value failed: unknown result" - ) + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_value failed: unknown result") def get_value_at_indices(self, long_var_name, inds): """ - Parameters: - - long_var_name - - inds - """ + Parameters: + - long_var_name + - inds + """ self.send_get_value_at_indices(long_var_name, inds) return self.recv_get_value_at_indices() def send_get_value_at_indices(self, long_var_name, inds): - self._oprot.writeMessageBegin( - "get_value_at_indices", TMessageType.CALL, self._seqid - ) + self._oprot.writeMessageBegin('get_value_at_indices', TMessageType.CALL, self._seqid) args = get_value_at_indices_args() args.long_var_name = long_var_name args.inds = inds args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() - def recv_get_value_at_indices(self,): - (fname, mtype, rseqid) = self._iprot.readMessageBegin() + def recv_get_value_at_indices(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() - x.read(self._iprot) - self._iprot.readMessageEnd() + x.read(iprot) + iprot.readMessageEnd() raise x result = get_value_at_indices_result() - result.read(self._iprot) - self._iprot.readMessageEnd() + result.read(iprot) + iprot.readMessageEnd() if result.success is not None: return result.success if result.error is not None: raise result.error - raise TApplicationException( - TApplicationException.MISSING_RESULT, - "get_value_at_indices failed: unknown result", - ) + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_value_at_indices failed: unknown result") def set_value(self, long_var_name, src): """ - Parameters: - - long_var_name - - src - """ + Parameters: + - long_var_name + - src + """ self.send_set_value(long_var_name, src) self.recv_set_value() def send_set_value(self, long_var_name, src): - self._oprot.writeMessageBegin("set_value", TMessageType.CALL, self._seqid) + self._oprot.writeMessageBegin('set_value', TMessageType.CALL, self._seqid) args = set_value_args() args.long_var_name = long_var_name args.src = src args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() - def recv_set_value(self,): - (fname, mtype, rseqid) = self._iprot.readMessageBegin() + def recv_set_value(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() - x.read(self._iprot) - self._iprot.readMessageEnd() + x.read(iprot) + iprot.readMessageEnd() raise x result = set_value_result() - result.read(self._iprot) - self._iprot.readMessageEnd() + result.read(iprot) + iprot.readMessageEnd() if result.error is not None: raise result.error return def set_value_at_indices(self, long_var_name, inds, src): """ - Parameters: - - long_var_name - - inds - - src - """ + Parameters: + - long_var_name + - inds + - src + """ self.send_set_value_at_indices(long_var_name, inds, src) self.recv_set_value_at_indices() def send_set_value_at_indices(self, long_var_name, inds, src): - self._oprot.writeMessageBegin( - "set_value_at_indices", TMessageType.CALL, self._seqid - ) + self._oprot.writeMessageBegin('set_value_at_indices', TMessageType.CALL, self._seqid) args = set_value_at_indices_args() args.long_var_name = long_var_name args.inds = inds @@ -896,595 +895,571 @@ self._oprot.writeMessageEnd() self._oprot.trans.flush() - def recv_set_value_at_indices(self,): - (fname, mtype, rseqid) = self._iprot.readMessageBegin() + def recv_set_value_at_indices(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() - x.read(self._iprot) - self._iprot.readMessageEnd() + x.read(iprot) + iprot.readMessageEnd() raise x result = set_value_at_indices_result() - result.read(self._iprot) - self._iprot.readMessageEnd() + result.read(iprot) + iprot.readMessageEnd() if result.error is not None: raise result.error return def get_grid_type(self, long_var_name): """ - Parameters: - - long_var_name - """ + Parameters: + - long_var_name + """ self.send_get_grid_type(long_var_name) return self.recv_get_grid_type() def send_get_grid_type(self, long_var_name): - self._oprot.writeMessageBegin("get_grid_type", TMessageType.CALL, self._seqid) + self._oprot.writeMessageBegin('get_grid_type', TMessageType.CALL, self._seqid) args = get_grid_type_args() args.long_var_name = long_var_name args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() - def recv_get_grid_type(self,): - (fname, mtype, rseqid) = self._iprot.readMessageBegin() + def recv_get_grid_type(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() - x.read(self._iprot) - self._iprot.readMessageEnd() + x.read(iprot) + iprot.readMessageEnd() raise x result = get_grid_type_result() - result.read(self._iprot) - self._iprot.readMessageEnd() + result.read(iprot) + iprot.readMessageEnd() if result.success is not None: return result.success if result.error is not None: raise result.error - raise TApplicationException( - TApplicationException.MISSING_RESULT, "get_grid_type failed: unknown result" - ) + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_grid_type failed: unknown result") def get_grid_shape(self, long_var_name): """ - Parameters: - - long_var_name - """ + Parameters: + - long_var_name + """ self.send_get_grid_shape(long_var_name) return self.recv_get_grid_shape() def send_get_grid_shape(self, long_var_name): - self._oprot.writeMessageBegin("get_grid_shape", TMessageType.CALL, self._seqid) + self._oprot.writeMessageBegin('get_grid_shape', TMessageType.CALL, self._seqid) args = get_grid_shape_args() args.long_var_name = long_var_name args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() - def recv_get_grid_shape(self,): - (fname, mtype, rseqid) = self._iprot.readMessageBegin() + def recv_get_grid_shape(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() - x.read(self._iprot) - self._iprot.readMessageEnd() + x.read(iprot) + iprot.readMessageEnd() raise x result = get_grid_shape_result() - result.read(self._iprot) - self._iprot.readMessageEnd() + result.read(iprot) + iprot.readMessageEnd() if result.success is not None: return result.success - raise TApplicationException( - TApplicationException.MISSING_RESULT, - "get_grid_shape failed: unknown result", - ) + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_grid_shape failed: unknown result") def get_grid_spacing(self, long_var_name): """ - Parameters: - - long_var_name - """ + Parameters: + - long_var_name + """ self.send_get_grid_spacing(long_var_name) return self.recv_get_grid_spacing() def send_get_grid_spacing(self, long_var_name): - self._oprot.writeMessageBegin( - "get_grid_spacing", TMessageType.CALL, self._seqid - ) + self._oprot.writeMessageBegin('get_grid_spacing', TMessageType.CALL, self._seqid) args = get_grid_spacing_args() args.long_var_name = long_var_name args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() - def recv_get_grid_spacing(self,): - (fname, mtype, rseqid) = self._iprot.readMessageBegin() + def recv_get_grid_spacing(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() - x.read(self._iprot) - self._iprot.readMessageEnd() + x.read(iprot) + iprot.readMessageEnd() raise x result = get_grid_spacing_result() - result.read(self._iprot) - self._iprot.readMessageEnd() + result.read(iprot) + iprot.readMessageEnd() if result.success is not None: return result.success - raise TApplicationException( - TApplicationException.MISSING_RESULT, - "get_grid_spacing failed: unknown result", - ) + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_grid_spacing failed: unknown result") def get_grid_origin(self, long_var_name): """ - Parameters: - - long_var_name - """ + Parameters: + - long_var_name + """ self.send_get_grid_origin(long_var_name) return self.recv_get_grid_origin() def send_get_grid_origin(self, long_var_name): - self._oprot.writeMessageBegin("get_grid_origin", TMessageType.CALL, self._seqid) + self._oprot.writeMessageBegin('get_grid_origin', TMessageType.CALL, self._seqid) args = get_grid_origin_args() args.long_var_name = long_var_name args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() - def recv_get_grid_origin(self,): - (fname, mtype, rseqid) = self._iprot.readMessageBegin() + def recv_get_grid_origin(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() - x.read(self._iprot) - self._iprot.readMessageEnd() + x.read(iprot) + iprot.readMessageEnd() raise x result = get_grid_origin_result() - result.read(self._iprot) - self._iprot.readMessageEnd() + result.read(iprot) + iprot.readMessageEnd() if result.success is not None: return result.success - raise TApplicationException( - TApplicationException.MISSING_RESULT, - "get_grid_origin failed: unknown result", - ) + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_grid_origin failed: unknown result") def get_grid_x(self, long_var_name): """ - Parameters: - - long_var_name - """ + Parameters: + - long_var_name + """ self.send_get_grid_x(long_var_name) return self.recv_get_grid_x() def send_get_grid_x(self, long_var_name): - self._oprot.writeMessageBegin("get_grid_x", TMessageType.CALL, self._seqid) + self._oprot.writeMessageBegin('get_grid_x', TMessageType.CALL, self._seqid) args = get_grid_x_args() args.long_var_name = long_var_name args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() - def recv_get_grid_x(self,): - (fname, mtype, rseqid) = self._iprot.readMessageBegin() + def recv_get_grid_x(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() - x.read(self._iprot) - self._iprot.readMessageEnd() + x.read(iprot) + iprot.readMessageEnd() raise x result = get_grid_x_result() - result.read(self._iprot) - self._iprot.readMessageEnd() + result.read(iprot) + iprot.readMessageEnd() if result.success is not None: return result.success - raise TApplicationException( - TApplicationException.MISSING_RESULT, "get_grid_x failed: unknown result" - ) + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_grid_x failed: unknown result") def get_grid_y(self, long_var_name): """ - Parameters: - - long_var_name - """ + Parameters: + - long_var_name + """ self.send_get_grid_y(long_var_name) return self.recv_get_grid_y() def send_get_grid_y(self, long_var_name): - self._oprot.writeMessageBegin("get_grid_y", TMessageType.CALL, self._seqid) + self._oprot.writeMessageBegin('get_grid_y', TMessageType.CALL, self._seqid) args = get_grid_y_args() args.long_var_name = long_var_name args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() - def recv_get_grid_y(self,): - (fname, mtype, rseqid) = self._iprot.readMessageBegin() + def recv_get_grid_y(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() - x.read(self._iprot) - self._iprot.readMessageEnd() + x.read(iprot) + iprot.readMessageEnd() raise x result = get_grid_y_result() - result.read(self._iprot) - self._iprot.readMessageEnd() + result.read(iprot) + iprot.readMessageEnd() if result.success is not None: return result.success - raise TApplicationException( - TApplicationException.MISSING_RESULT, "get_grid_y failed: unknown result" - ) + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_grid_y failed: unknown result") def get_grid_z(self, long_var_name): """ - Parameters: - - long_var_name - """ + Parameters: + - long_var_name + """ self.send_get_grid_z(long_var_name) return self.recv_get_grid_z() def send_get_grid_z(self, long_var_name): - self._oprot.writeMessageBegin("get_grid_z", TMessageType.CALL, self._seqid) + self._oprot.writeMessageBegin('get_grid_z', TMessageType.CALL, self._seqid) args = get_grid_z_args() args.long_var_name = long_var_name args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() - def recv_get_grid_z(self,): - (fname, mtype, rseqid) = self._iprot.readMessageBegin() + def recv_get_grid_z(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() - x.read(self._iprot) - self._iprot.readMessageEnd() + x.read(iprot) + iprot.readMessageEnd() raise x result = get_grid_z_result() - result.read(self._iprot) - self._iprot.readMessageEnd() + result.read(iprot) + iprot.readMessageEnd() if result.success is not None: return result.success - raise TApplicationException( - TApplicationException.MISSING_RESULT, "get_grid_z failed: unknown result" - ) + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_grid_z failed: unknown result") def get_grid_connectivity(self, long_var_name): """ - Parameters: - - long_var_name - """ + Parameters: + - long_var_name + """ self.send_get_grid_connectivity(long_var_name) return self.recv_get_grid_connectivity() def send_get_grid_connectivity(self, long_var_name): - self._oprot.writeMessageBegin( - "get_grid_connectivity", TMessageType.CALL, self._seqid - ) + self._oprot.writeMessageBegin('get_grid_connectivity', TMessageType.CALL, self._seqid) args = get_grid_connectivity_args() args.long_var_name = long_var_name args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() - def recv_get_grid_connectivity(self,): - (fname, mtype, rseqid) = self._iprot.readMessageBegin() + def recv_get_grid_connectivity(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() - x.read(self._iprot) - self._iprot.readMessageEnd() + x.read(iprot) + iprot.readMessageEnd() raise x result = get_grid_connectivity_result() - result.read(self._iprot) - self._iprot.readMessageEnd() + result.read(iprot) + iprot.readMessageEnd() if result.success is not None: return result.success - raise TApplicationException( - TApplicationException.MISSING_RESULT, - "get_grid_connectivity failed: unknown result", - ) + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_grid_connectivity failed: unknown result") def get_grid_offset(self, long_var_name): """ - Parameters: - - long_var_name - """ + Parameters: + - long_var_name + """ self.send_get_grid_offset(long_var_name) return self.recv_get_grid_offset() def send_get_grid_offset(self, long_var_name): - self._oprot.writeMessageBegin("get_grid_offset", TMessageType.CALL, self._seqid) + self._oprot.writeMessageBegin('get_grid_offset', TMessageType.CALL, self._seqid) args = get_grid_offset_args() args.long_var_name = long_var_name args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() - def recv_get_grid_offset(self,): - (fname, mtype, rseqid) = self._iprot.readMessageBegin() + def recv_get_grid_offset(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() - x.read(self._iprot) - self._iprot.readMessageEnd() + x.read(iprot) + iprot.readMessageEnd() raise x result = get_grid_offset_result() - result.read(self._iprot) - self._iprot.readMessageEnd() + result.read(iprot) + iprot.readMessageEnd() if result.success is not None: return result.success - raise TApplicationException( - TApplicationException.MISSING_RESULT, - "get_grid_offset failed: unknown result", - ) + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_grid_offset failed: unknown result") def initialize_config(self, file): """ - Parameters: - - file - """ + Parameters: + - file + """ self.send_initialize_config(file) self.recv_initialize_config() def send_initialize_config(self, file): - self._oprot.writeMessageBegin( - "initialize_config", TMessageType.CALL, self._seqid - ) + self._oprot.writeMessageBegin('initialize_config', TMessageType.CALL, self._seqid) args = initialize_config_args() args.file = file args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() - def recv_initialize_config(self,): - (fname, mtype, rseqid) = self._iprot.readMessageBegin() + def recv_initialize_config(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() - x.read(self._iprot) - self._iprot.readMessageEnd() + x.read(iprot) + iprot.readMessageEnd() raise x result = initialize_config_result() - result.read(self._iprot) - self._iprot.readMessageEnd() + result.read(iprot) + iprot.readMessageEnd() if result.error is not None: raise result.error return - def initialize_model(self,): + def initialize_model(self): self.send_initialize_model() self.recv_initialize_model() - def send_initialize_model(self,): - self._oprot.writeMessageBegin( - "initialize_model", TMessageType.CALL, self._seqid - ) + def send_initialize_model(self): + self._oprot.writeMessageBegin('initialize_model', TMessageType.CALL, self._seqid) args = initialize_model_args() args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() - def recv_initialize_model(self,): - (fname, mtype, rseqid) = self._iprot.readMessageBegin() + def recv_initialize_model(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() - x.read(self._iprot) - self._iprot.readMessageEnd() + x.read(iprot) + iprot.readMessageEnd() raise x result = initialize_model_result() - result.read(self._iprot) - self._iprot.readMessageEnd() + result.read(iprot) + iprot.readMessageEnd() if result.error is not None: raise result.error return def set_start_time(self, start_time): """ - Parameters: - - start_time - """ + Parameters: + - start_time + """ self.send_set_start_time(start_time) self.recv_set_start_time() def send_set_start_time(self, start_time): - self._oprot.writeMessageBegin("set_start_time", TMessageType.CALL, self._seqid) + self._oprot.writeMessageBegin('set_start_time', TMessageType.CALL, self._seqid) args = set_start_time_args() args.start_time = start_time args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() - def recv_set_start_time(self,): - (fname, mtype, rseqid) = self._iprot.readMessageBegin() + def recv_set_start_time(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() - x.read(self._iprot) - self._iprot.readMessageEnd() + x.read(iprot) + iprot.readMessageEnd() raise x result = set_start_time_result() - result.read(self._iprot) - self._iprot.readMessageEnd() + result.read(iprot) + iprot.readMessageEnd() if result.error is not None: raise result.error return def set_end_time(self, end_time): """ - Parameters: - - end_time - """ + Parameters: + - end_time + """ self.send_set_end_time(end_time) self.recv_set_end_time() def send_set_end_time(self, end_time): - self._oprot.writeMessageBegin("set_end_time", TMessageType.CALL, self._seqid) + self._oprot.writeMessageBegin('set_end_time', TMessageType.CALL, self._seqid) args = set_end_time_args() args.end_time = end_time args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() - def recv_set_end_time(self,): - (fname, mtype, rseqid) = self._iprot.readMessageBegin() + def recv_set_end_time(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() - x.read(self._iprot) - self._iprot.readMessageEnd() + x.read(iprot) + iprot.readMessageEnd() raise x result = set_end_time_result() - result.read(self._iprot) - self._iprot.readMessageEnd() + result.read(iprot) + iprot.readMessageEnd() if result.error is not None: raise result.error return - def get_attribute_names(self,): + def get_attribute_names(self): self.send_get_attribute_names() return self.recv_get_attribute_names() - def send_get_attribute_names(self,): - self._oprot.writeMessageBegin( - "get_attribute_names", TMessageType.CALL, self._seqid - ) + def send_get_attribute_names(self): + self._oprot.writeMessageBegin('get_attribute_names', TMessageType.CALL, self._seqid) args = get_attribute_names_args() args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() - def recv_get_attribute_names(self,): - (fname, mtype, rseqid) = self._iprot.readMessageBegin() + def recv_get_attribute_names(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() - x.read(self._iprot) - self._iprot.readMessageEnd() + x.read(iprot) + iprot.readMessageEnd() raise x result = get_attribute_names_result() - result.read(self._iprot) - self._iprot.readMessageEnd() + result.read(iprot) + iprot.readMessageEnd() if result.success is not None: return result.success - raise TApplicationException( - TApplicationException.MISSING_RESULT, - "get_attribute_names failed: unknown result", - ) + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_attribute_names failed: unknown result") def get_attribute_value(self, attribute_name): """ - Parameters: - - attribute_name - """ + Parameters: + - attribute_name + """ self.send_get_attribute_value(attribute_name) return self.recv_get_attribute_value() def send_get_attribute_value(self, attribute_name): - self._oprot.writeMessageBegin( - "get_attribute_value", TMessageType.CALL, self._seqid - ) + self._oprot.writeMessageBegin('get_attribute_value', TMessageType.CALL, self._seqid) args = get_attribute_value_args() args.attribute_name = attribute_name args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() - def recv_get_attribute_value(self,): - (fname, mtype, rseqid) = self._iprot.readMessageBegin() + def recv_get_attribute_value(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() - x.read(self._iprot) - self._iprot.readMessageEnd() + x.read(iprot) + iprot.readMessageEnd() raise x result = get_attribute_value_result() - result.read(self._iprot) - self._iprot.readMessageEnd() + result.read(iprot) + iprot.readMessageEnd() if result.success is not None: return result.success if result.error is not None: raise result.error - raise TApplicationException( - TApplicationException.MISSING_RESULT, - "get_attribute_value failed: unknown result", - ) + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_attribute_value failed: unknown result") def set_attribute_value(self, attribute_name, attribute_value): """ - Parameters: - - attribute_name - - attribute_value - """ + Parameters: + - attribute_name + - attribute_value + """ self.send_set_attribute_value(attribute_name, attribute_value) self.recv_set_attribute_value() def send_set_attribute_value(self, attribute_name, attribute_value): - self._oprot.writeMessageBegin( - "set_attribute_value", TMessageType.CALL, self._seqid - ) + self._oprot.writeMessageBegin('set_attribute_value', TMessageType.CALL, self._seqid) args = set_attribute_value_args() args.attribute_name = attribute_name args.attribute_value = attribute_value args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() - def recv_set_attribute_value(self,): - (fname, mtype, rseqid) = self._iprot.readMessageBegin() + def recv_set_attribute_value(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() - x.read(self._iprot) - self._iprot.readMessageEnd() + x.read(iprot) + iprot.readMessageEnd() raise x result = set_attribute_value_result() - result.read(self._iprot) - self._iprot.readMessageEnd() + result.read(iprot) + iprot.readMessageEnd() if result.error is not None: raise result.error return def save_state(self, destination_directory): """ - Parameters: - - destination_directory - """ + Parameters: + - destination_directory + """ self.send_save_state(destination_directory) self.recv_save_state() def send_save_state(self, destination_directory): - self._oprot.writeMessageBegin("save_state", TMessageType.CALL, self._seqid) + self._oprot.writeMessageBegin('save_state', TMessageType.CALL, self._seqid) args = save_state_args() args.destination_directory = destination_directory args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() - def recv_save_state(self,): - (fname, mtype, rseqid) = self._iprot.readMessageBegin() + def recv_save_state(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() - x.read(self._iprot) - self._iprot.readMessageEnd() + x.read(iprot) + iprot.readMessageEnd() raise x result = save_state_result() - result.read(self._iprot) - self._iprot.readMessageEnd() + result.read(iprot) + iprot.readMessageEnd() if result.error is not None: raise result.error return def load_state(self, source_directory): """ - Parameters: - - source_directory - """ + Parameters: + - source_directory + """ self.send_load_state(source_directory) self.recv_load_state() def send_load_state(self, source_directory): - self._oprot.writeMessageBegin("load_state", TMessageType.CALL, self._seqid) + self._oprot.writeMessageBegin('load_state', TMessageType.CALL, self._seqid) args = load_state_args() args.source_directory = source_directory args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() - def recv_load_state(self,): - (fname, mtype, rseqid) = self._iprot.readMessageBegin() + def recv_load_state(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() - x.read(self._iprot) - self._iprot.readMessageEnd() + x.read(iprot) + iprot.readMessageEnd() raise x result = load_state_result() - result.read(self._iprot) - self._iprot.readMessageEnd() + result.read(iprot) + iprot.readMessageEnd() if result.error is not None: raise result.error return @@ -1501,9 +1476,7 @@ self._processMap["finalize_model"] = Processor.process_finalize_model self._processMap["get_component_name"] = Processor.process_get_component_name self._processMap["get_input_var_names"] = Processor.process_get_input_var_names - self._processMap[ - "get_output_var_names" - ] = Processor.process_get_output_var_names + self._processMap["get_output_var_names"] = Processor.process_get_output_var_names self._processMap["get_var_type"] = Processor.process_get_var_type self._processMap["get_var_units"] = Processor.process_get_var_units self._processMap["get_var_rank"] = Processor.process_get_var_rank @@ -1515,23 +1488,17 @@ self._processMap["get_time_step"] = Processor.process_get_time_step self._processMap["get_time_units"] = Processor.process_get_time_units self._processMap["get_value"] = Processor.process_get_value - self._processMap[ - "get_value_at_indices" - ] = Processor.process_get_value_at_indices + self._processMap["get_value_at_indices"] = Processor.process_get_value_at_indices self._processMap["set_value"] = Processor.process_set_value - self._processMap[ - "set_value_at_indices" - ] = Processor.process_set_value_at_indices + self._processMap["set_value_at_indices"] = Processor.process_set_value_at_indices self._processMap["get_grid_type"] = Processor.process_get_grid_type self._processMap["get_grid_shape"] = Processor.process_get_grid_shape self._processMap["get_grid_spacing"] = Processor.process_get_grid_spacing self._processMap["get_grid_origin"] = Processor.process_get_grid_origin self._processMap["get_grid_x"] = Processor.process_get_grid_x self._processMap["get_grid_y"] = Processor.process_get_grid_y self._processMap["get_grid_z"] = Processor.process_get_grid_z - self._processMap[ - "get_grid_connectivity" - ] = Processor.process_get_grid_connectivity + self._processMap["get_grid_connectivity"] = Processor.process_get_grid_connectivity self._processMap["get_grid_offset"] = Processor.process_get_grid_offset self._processMap["initialize_config"] = Processor.process_initialize_config self._processMap["initialize_model"] = Processor.process_initialize_model @@ -1548,9 +1515,7 @@ if name not in self._processMap: iprot.skip(TType.STRUCT) iprot.readMessageEnd() - x = TApplicationException( - TApplicationException.UNKNOWN_METHOD, "Unknown function %s" % (name) - ) + x = TApplicationException(TApplicationException.UNKNOWN_METHOD, 'Unknown function %s' % (name)) oprot.writeMessageBegin(name, TMessageType.EXCEPTION, seqid) x.write(oprot) oprot.writeMessageEnd() @@ -1567,9 +1532,21 @@ result = initialize_result() try: self._handler.initialize(args.file) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise except ModelException as error: + msg_type = TMessageType.REPLY result.error = error - oprot.writeMessageBegin("initialize", TMessageType.REPLY, seqid) + except TApplicationException as ex: + logging.exception('TApplication exception in handler') + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception('Unexpected exception in handler') + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("initialize", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() @@ -1581,9 +1558,21 @@ result = update_result() try: self._handler.update() + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise except ModelException as error: + msg_type = TMessageType.REPLY result.error = error - oprot.writeMessageBegin("update", TMessageType.REPLY, seqid) + except TApplicationException as ex: + logging.exception('TApplication exception in handler') + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception('Unexpected exception in handler') + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("update", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() @@ -1595,9 +1584,21 @@ result = update_until_result() try: self._handler.update_until(args.time) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise except ModelException as error: + msg_type = TMessageType.REPLY result.error = error - oprot.writeMessageBegin("update_until", TMessageType.REPLY, seqid) + except TApplicationException as ex: + logging.exception('TApplication exception in handler') + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception('Unexpected exception in handler') + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("update_until", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() @@ -1609,9 +1610,21 @@ result = update_frac_result() try: self._handler.update_frac(args.frac) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise except ModelException as error: + msg_type = TMessageType.REPLY result.error = error - oprot.writeMessageBegin("update_frac", TMessageType.REPLY, seqid) + except TApplicationException as ex: + logging.exception('TApplication exception in handler') + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception('Unexpected exception in handler') + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("update_frac", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() @@ -1623,9 +1636,21 @@ result = finalize_model_result() try: self._handler.finalize_model() + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise except ModelException as error: + msg_type = TMessageType.REPLY result.error = error - oprot.writeMessageBegin("finalize_model", TMessageType.REPLY, seqid) + except TApplicationException as ex: + logging.exception('TApplication exception in handler') + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception('Unexpected exception in handler') + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("finalize_model", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() @@ -1637,9 +1662,21 @@ result = get_component_name_result() try: result.success = self._handler.get_component_name() + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise except ModelException as error: + msg_type = TMessageType.REPLY result.error = error - oprot.writeMessageBegin("get_component_name", TMessageType.REPLY, seqid) + except TApplicationException as ex: + logging.exception('TApplication exception in handler') + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception('Unexpected exception in handler') + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("get_component_name", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() @@ -1649,8 +1686,20 @@ args.read(iprot) iprot.readMessageEnd() result = get_input_var_names_result() - result.success = self._handler.get_input_var_names() - oprot.writeMessageBegin("get_input_var_names", TMessageType.REPLY, seqid) + try: + result.success = self._handler.get_input_var_names() + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except TApplicationException as ex: + logging.exception('TApplication exception in handler') + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception('Unexpected exception in handler') + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("get_input_var_names", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() @@ -1660,8 +1709,20 @@ args.read(iprot) iprot.readMessageEnd() result = get_output_var_names_result() - result.success = self._handler.get_output_var_names() - oprot.writeMessageBegin("get_output_var_names", TMessageType.REPLY, seqid) + try: + result.success = self._handler.get_output_var_names() + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except TApplicationException as ex: + logging.exception('TApplication exception in handler') + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception('Unexpected exception in handler') + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("get_output_var_names", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() @@ -1671,8 +1732,20 @@ args.read(iprot) iprot.readMessageEnd() result = get_var_type_result() - result.success = self._handler.get_var_type(args.long_var_name) - oprot.writeMessageBegin("get_var_type", TMessageType.REPLY, seqid) + try: + result.success = self._handler.get_var_type(args.long_var_name) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except TApplicationException as ex: + logging.exception('TApplication exception in handler') + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception('Unexpected exception in handler') + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("get_var_type", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() @@ -1682,8 +1755,20 @@ args.read(iprot) iprot.readMessageEnd() result = get_var_units_result() - result.success = self._handler.get_var_units(args.long_var_name) - oprot.writeMessageBegin("get_var_units", TMessageType.REPLY, seqid) + try: + result.success = self._handler.get_var_units(args.long_var_name) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except TApplicationException as ex: + logging.exception('TApplication exception in handler') + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception('Unexpected exception in handler') + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("get_var_units", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() @@ -1693,8 +1778,20 @@ args.read(iprot) iprot.readMessageEnd() result = get_var_rank_result() - result.success = self._handler.get_var_rank(args.long_var_name) - oprot.writeMessageBegin("get_var_rank", TMessageType.REPLY, seqid) + try: + result.success = self._handler.get_var_rank(args.long_var_name) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except TApplicationException as ex: + logging.exception('TApplication exception in handler') + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception('Unexpected exception in handler') + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("get_var_rank", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() @@ -1704,8 +1801,20 @@ args.read(iprot) iprot.readMessageEnd() result = get_var_size_result() - result.success = self._handler.get_var_size(args.long_var_name) - oprot.writeMessageBegin("get_var_size", TMessageType.REPLY, seqid) + try: + result.success = self._handler.get_var_size(args.long_var_name) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except TApplicationException as ex: + logging.exception('TApplication exception in handler') + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception('Unexpected exception in handler') + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("get_var_size", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() @@ -1715,8 +1824,20 @@ args.read(iprot) iprot.readMessageEnd() result = get_var_nbytes_result() - result.success = self._handler.get_var_nbytes(args.long_var_name) - oprot.writeMessageBegin("get_var_nbytes", TMessageType.REPLY, seqid) + try: + result.success = self._handler.get_var_nbytes(args.long_var_name) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except TApplicationException as ex: + logging.exception('TApplication exception in handler') + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception('Unexpected exception in handler') + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("get_var_nbytes", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() @@ -1726,8 +1847,20 @@ args.read(iprot) iprot.readMessageEnd() result = get_start_time_result() - result.success = self._handler.get_start_time() - oprot.writeMessageBegin("get_start_time", TMessageType.REPLY, seqid) + try: + result.success = self._handler.get_start_time() + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except TApplicationException as ex: + logging.exception('TApplication exception in handler') + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception('Unexpected exception in handler') + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("get_start_time", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() @@ -1737,8 +1870,20 @@ args.read(iprot) iprot.readMessageEnd() result = get_current_time_result() - result.success = self._handler.get_current_time() - oprot.writeMessageBegin("get_current_time", TMessageType.REPLY, seqid) + try: + result.success = self._handler.get_current_time() + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except TApplicationException as ex: + logging.exception('TApplication exception in handler') + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception('Unexpected exception in handler') + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("get_current_time", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() @@ -1748,8 +1893,20 @@ args.read(iprot) iprot.readMessageEnd() result = get_end_time_result() - result.success = self._handler.get_end_time() - oprot.writeMessageBegin("get_end_time", TMessageType.REPLY, seqid) + try: + result.success = self._handler.get_end_time() + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except TApplicationException as ex: + logging.exception('TApplication exception in handler') + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception('Unexpected exception in handler') + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("get_end_time", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() @@ -1759,8 +1916,20 @@ args.read(iprot) iprot.readMessageEnd() result = get_time_step_result() - result.success = self._handler.get_time_step() - oprot.writeMessageBegin("get_time_step", TMessageType.REPLY, seqid) + try: + result.success = self._handler.get_time_step() + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except TApplicationException as ex: + logging.exception('TApplication exception in handler') + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception('Unexpected exception in handler') + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("get_time_step", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() @@ -1770,8 +1939,20 @@ args.read(iprot) iprot.readMessageEnd() result = get_time_units_result() - result.success = self._handler.get_time_units() - oprot.writeMessageBegin("get_time_units", TMessageType.REPLY, seqid) + try: + result.success = self._handler.get_time_units() + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except TApplicationException as ex: + logging.exception('TApplication exception in handler') + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception('Unexpected exception in handler') + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("get_time_units", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() @@ -1783,9 +1964,21 @@ result = get_value_result() try: result.success = self._handler.get_value(args.long_var_name) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise except ModelException as error: + msg_type = TMessageType.REPLY result.error = error - oprot.writeMessageBegin("get_value", TMessageType.REPLY, seqid) + except TApplicationException as ex: + logging.exception('TApplication exception in handler') + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception('Unexpected exception in handler') + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("get_value", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() @@ -1796,12 +1989,22 @@ iprot.readMessageEnd() result = get_value_at_indices_result() try: - result.success = self._handler.get_value_at_indices( - args.long_var_name, args.inds - ) + result.success = self._handler.get_value_at_indices(args.long_var_name, args.inds) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise except ModelException as error: + msg_type = TMessageType.REPLY result.error = error - oprot.writeMessageBegin("get_value_at_indices", TMessageType.REPLY, seqid) + except TApplicationException as ex: + logging.exception('TApplication exception in handler') + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception('Unexpected exception in handler') + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("get_value_at_indices", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() @@ -1813,9 +2016,21 @@ result = set_value_result() try: self._handler.set_value(args.long_var_name, args.src) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise except ModelException as error: + msg_type = TMessageType.REPLY result.error = error - oprot.writeMessageBegin("set_value", TMessageType.REPLY, seqid) + except TApplicationException as ex: + logging.exception('TApplication exception in handler') + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception('Unexpected exception in handler') + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("set_value", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() @@ -1827,9 +2042,21 @@ result = set_value_at_indices_result() try: self._handler.set_value_at_indices(args.long_var_name, args.inds, args.src) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise except ModelException as error: + msg_type = TMessageType.REPLY result.error = error - oprot.writeMessageBegin("set_value_at_indices", TMessageType.REPLY, seqid) + except TApplicationException as ex: + logging.exception('TApplication exception in handler') + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception('Unexpected exception in handler') + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("set_value_at_indices", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() @@ -1841,9 +2068,21 @@ result = get_grid_type_result() try: result.success = self._handler.get_grid_type(args.long_var_name) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise except ModelException as error: + msg_type = TMessageType.REPLY result.error = error - oprot.writeMessageBegin("get_grid_type", TMessageType.REPLY, seqid) + except TApplicationException as ex: + logging.exception('TApplication exception in handler') + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception('Unexpected exception in handler') + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("get_grid_type", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() @@ -1853,8 +2092,20 @@ args.read(iprot) iprot.readMessageEnd() result = get_grid_shape_result() - result.success = self._handler.get_grid_shape(args.long_var_name) - oprot.writeMessageBegin("get_grid_shape", TMessageType.REPLY, seqid) + try: + result.success = self._handler.get_grid_shape(args.long_var_name) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except TApplicationException as ex: + logging.exception('TApplication exception in handler') + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception('Unexpected exception in handler') + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("get_grid_shape", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() @@ -1864,8 +2115,20 @@ args.read(iprot) iprot.readMessageEnd() result = get_grid_spacing_result() - result.success = self._handler.get_grid_spacing(args.long_var_name) - oprot.writeMessageBegin("get_grid_spacing", TMessageType.REPLY, seqid) + try: + result.success = self._handler.get_grid_spacing(args.long_var_name) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except TApplicationException as ex: + logging.exception('TApplication exception in handler') + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception('Unexpected exception in handler') + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("get_grid_spacing", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() @@ -1875,8 +2138,20 @@ args.read(iprot) iprot.readMessageEnd() result = get_grid_origin_result() - result.success = self._handler.get_grid_origin(args.long_var_name) - oprot.writeMessageBegin("get_grid_origin", TMessageType.REPLY, seqid) + try: + result.success = self._handler.get_grid_origin(args.long_var_name) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except TApplicationException as ex: + logging.exception('TApplication exception in handler') + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception('Unexpected exception in handler') + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("get_grid_origin", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() @@ -1886,8 +2161,20 @@ args.read(iprot) iprot.readMessageEnd() result = get_grid_x_result() - result.success = self._handler.get_grid_x(args.long_var_name) - oprot.writeMessageBegin("get_grid_x", TMessageType.REPLY, seqid) + try: + result.success = self._handler.get_grid_x(args.long_var_name) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except TApplicationException as ex: + logging.exception('TApplication exception in handler') + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception('Unexpected exception in handler') + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("get_grid_x", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() @@ -1897,8 +2184,20 @@ args.read(iprot) iprot.readMessageEnd() result = get_grid_y_result() - result.success = self._handler.get_grid_y(args.long_var_name) - oprot.writeMessageBegin("get_grid_y", TMessageType.REPLY, seqid) + try: + result.success = self._handler.get_grid_y(args.long_var_name) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except TApplicationException as ex: + logging.exception('TApplication exception in handler') + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception('Unexpected exception in handler') + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("get_grid_y", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() @@ -1908,8 +2207,20 @@ args.read(iprot) iprot.readMessageEnd() result = get_grid_z_result() - result.success = self._handler.get_grid_z(args.long_var_name) - oprot.writeMessageBegin("get_grid_z", TMessageType.REPLY, seqid) + try: + result.success = self._handler.get_grid_z(args.long_var_name) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except TApplicationException as ex: + logging.exception('TApplication exception in handler') + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception('Unexpected exception in handler') + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("get_grid_z", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() @@ -1919,8 +2230,20 @@ args.read(iprot) iprot.readMessageEnd() result = get_grid_connectivity_result() - result.success = self._handler.get_grid_connectivity(args.long_var_name) - oprot.writeMessageBegin("get_grid_connectivity", TMessageType.REPLY, seqid) + try: + result.success = self._handler.get_grid_connectivity(args.long_var_name) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except TApplicationException as ex: + logging.exception('TApplication exception in handler') + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception('Unexpected exception in handler') + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("get_grid_connectivity", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() @@ -1930,8 +2253,20 @@ args.read(iprot) iprot.readMessageEnd() result = get_grid_offset_result() - result.success = self._handler.get_grid_offset(args.long_var_name) - oprot.writeMessageBegin("get_grid_offset", TMessageType.REPLY, seqid) + try: + result.success = self._handler.get_grid_offset(args.long_var_name) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except TApplicationException as ex: + logging.exception('TApplication exception in handler') + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception('Unexpected exception in handler') + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("get_grid_offset", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() @@ -1943,9 +2278,21 @@ result = initialize_config_result() try: self._handler.initialize_config(args.file) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise except ModelException as error: + msg_type = TMessageType.REPLY result.error = error - oprot.writeMessageBegin("initialize_config", TMessageType.REPLY, seqid) + except TApplicationException as ex: + logging.exception('TApplication exception in handler') + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception('Unexpected exception in handler') + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("initialize_config", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() @@ -1957,9 +2304,21 @@ result = initialize_model_result() try: self._handler.initialize_model() + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise except ModelException as error: + msg_type = TMessageType.REPLY result.error = error - oprot.writeMessageBegin("initialize_model", TMessageType.REPLY, seqid) + except TApplicationException as ex: + logging.exception('TApplication exception in handler') + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception('Unexpected exception in handler') + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("initialize_model", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() @@ -1971,9 +2330,21 @@ result = set_start_time_result() try: self._handler.set_start_time(args.start_time) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise except ModelException as error: + msg_type = TMessageType.REPLY result.error = error - oprot.writeMessageBegin("set_start_time", TMessageType.REPLY, seqid) + except TApplicationException as ex: + logging.exception('TApplication exception in handler') + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception('Unexpected exception in handler') + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("set_start_time", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() @@ -1985,9 +2356,21 @@ result = set_end_time_result() try: self._handler.set_end_time(args.end_time) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise except ModelException as error: + msg_type = TMessageType.REPLY result.error = error - oprot.writeMessageBegin("set_end_time", TMessageType.REPLY, seqid) + except TApplicationException as ex: + logging.exception('TApplication exception in handler') + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception('Unexpected exception in handler') + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("set_end_time", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() @@ -1997,8 +2380,20 @@ args.read(iprot) iprot.readMessageEnd() result = get_attribute_names_result() - result.success = self._handler.get_attribute_names() - oprot.writeMessageBegin("get_attribute_names", TMessageType.REPLY, seqid) + try: + result.success = self._handler.get_attribute_names() + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except TApplicationException as ex: + logging.exception('TApplication exception in handler') + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception('Unexpected exception in handler') + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("get_attribute_names", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() @@ -2010,9 +2405,21 @@ result = get_attribute_value_result() try: result.success = self._handler.get_attribute_value(args.attribute_name) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise except ModelException as error: + msg_type = TMessageType.REPLY result.error = error - oprot.writeMessageBegin("get_attribute_value", TMessageType.REPLY, seqid) + except TApplicationException as ex: + logging.exception('TApplication exception in handler') + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception('Unexpected exception in handler') + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("get_attribute_value", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() @@ -2024,9 +2431,21 @@ result = set_attribute_value_result() try: self._handler.set_attribute_value(args.attribute_name, args.attribute_value) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise except ModelException as error: + msg_type = TMessageType.REPLY result.error = error - oprot.writeMessageBegin("set_attribute_value", TMessageType.REPLY, seqid) + except TApplicationException as ex: + logging.exception('TApplication exception in handler') + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception('Unexpected exception in handler') + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("set_attribute_value", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() @@ -2038,9 +2457,21 @@ result = save_state_result() try: self._handler.save_state(args.destination_directory) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise except ModelException as error: + msg_type = TMessageType.REPLY result.error = error - oprot.writeMessageBegin("save_state", TMessageType.REPLY, seqid) + except TApplicationException as ex: + logging.exception('TApplication exception in handler') + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception('Unexpected exception in handler') + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("save_state", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() @@ -2052,38 +2483,41 @@ result = load_state_result() try: self._handler.load_state(args.source_directory) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise except ModelException as error: + msg_type = TMessageType.REPLY result.error = error - oprot.writeMessageBegin("load_state", TMessageType.REPLY, seqid) + except TApplicationException as ex: + logging.exception('TApplication exception in handler') + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception('Unexpected exception in handler') + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("load_state", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() - # HELPER FUNCTIONS AND STRUCTURES class initialize_args(object): """ - Attributes: - - file - """ + Attributes: + - file + """ - thrift_spec = (None, (1, TType.STRING, "file", None, None)) # 0 # 1 - def __init__(self, file=None): + def __init__(self, file=None,): self.file = file def read(self, iprot): - if ( - iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - and fastbinary is not None - ): - fastbinary.decode_binary( - self, iprot.trans, (self.__class__, self.thrift_spec) - ) + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: @@ -2092,7 +2526,7 @@ break if fid == 1: if ftype == TType.STRING: - self.file = iprot.readString() + self.file = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: @@ -2101,19 +2535,13 @@ iprot.readStructEnd() def write(self, oprot): - if ( - oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated - and self.thrift_spec is not None - and fastbinary is not None - ): - oprot.trans.write( - fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)) - ) + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("initialize_args") + oprot.writeStructBegin('initialize_args') if self.file is not None: - oprot.writeFieldBegin("file", TType.STRING, 1) - oprot.writeString(self.file) + oprot.writeFieldBegin('file', TType.STRING, 1) + oprot.writeString(self.file.encode('utf-8') if sys.version_info[0] == 2 else self.file) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -2122,46 +2550,35 @@ return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) +all_structs.append(initialize_args) +initialize_args.thrift_spec = ( + None, # 0 + (1, TType.STRING, 'file', 'UTF8', None, ), # 1 +) class initialize_result(object): """ - Attributes: - - error - """ + Attributes: + - error + """ - thrift_spec = ( - None, # 0 - ( - 1, - TType.STRUCT, - "error", - (ModelException, ModelException.thrift_spec), - None, - ), # 1 - ) - def __init__(self, error=None): + def __init__(self, error=None,): self.error = error def read(self, iprot): - if ( - iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - and fastbinary is not None - ): - fastbinary.decode_binary( - self, iprot.trans, (self.__class__, self.thrift_spec) - ) + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: @@ -2180,18 +2597,12 @@ iprot.readStructEnd() def write(self, oprot): - if ( - oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated - and self.thrift_spec is not None - and fastbinary is not None - ): - oprot.trans.write( - fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)) - ) + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("initialize_result") + oprot.writeStructBegin('initialize_result') if self.error is not None: - oprot.writeFieldBegin("error", TType.STRUCT, 1) + oprot.writeFieldBegin('error', TType.STRUCT, 1) self.error.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() @@ -2201,30 +2612,28 @@ return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) +all_structs.append(initialize_result) +initialize_result.thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'error', [ModelException, None], None, ), # 1 +) class update_args(object): - thrift_spec = () def read(self, iprot): - if ( - iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - and fastbinary is not None - ): - fastbinary.decode_binary( - self, iprot.trans, (self.__class__, self.thrift_spec) - ) + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: @@ -2237,63 +2646,44 @@ iprot.readStructEnd() def write(self, oprot): - if ( - oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated - and self.thrift_spec is not None - and fastbinary is not None - ): - oprot.trans.write( - fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)) - ) + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("update_args") + oprot.writeStructBegin('update_args') oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) +all_structs.append(update_args) +update_args.thrift_spec = ( +) class update_result(object): """ - Attributes: - - error - """ + Attributes: + - error + """ - thrift_spec = ( - None, # 0 - ( - 1, - TType.STRUCT, - "error", - (ModelException, ModelException.thrift_spec), - None, - ), # 1 - ) - def __init__(self, error=None): + def __init__(self, error=None,): self.error = error def read(self, iprot): - if ( - iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - and fastbinary is not None - ): - fastbinary.decode_binary( - self, iprot.trans, (self.__class__, self.thrift_spec) - ) + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: @@ -2312,18 +2702,12 @@ iprot.readStructEnd() def write(self, oprot): - if ( - oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated - and self.thrift_spec is not None - and fastbinary is not None - ): - oprot.trans.write( - fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)) - ) + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("update_result") + oprot.writeStructBegin('update_result') if self.error is not None: - oprot.writeFieldBegin("error", TType.STRUCT, 1) + oprot.writeFieldBegin('error', TType.STRUCT, 1) self.error.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() @@ -2333,37 +2717,35 @@ return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) +all_structs.append(update_result) +update_result.thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'error', [ModelException, None], None, ), # 1 +) class update_until_args(object): """ - Attributes: - - time - """ + Attributes: + - time + """ - thrift_spec = (None, (1, TType.DOUBLE, "time", None, None)) # 0 # 1 - def __init__(self, time=None): + def __init__(self, time=None,): self.time = time def read(self, iprot): - if ( - iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - and fastbinary is not None - ): - fastbinary.decode_binary( - self, iprot.trans, (self.__class__, self.thrift_spec) - ) + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: @@ -2381,18 +2763,12 @@ iprot.readStructEnd() def write(self, oprot): - if ( - oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated - and self.thrift_spec is not None - and fastbinary is not None - ): - oprot.trans.write( - fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)) - ) + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("update_until_args") + oprot.writeStructBegin('update_until_args') if self.time is not None: - oprot.writeFieldBegin("time", TType.DOUBLE, 1) + oprot.writeFieldBegin('time', TType.DOUBLE, 1) oprot.writeDouble(self.time) oprot.writeFieldEnd() oprot.writeFieldStop() @@ -2402,46 +2778,35 @@ return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) +all_structs.append(update_until_args) +update_until_args.thrift_spec = ( + None, # 0 + (1, TType.DOUBLE, 'time', None, None, ), # 1 +) class update_until_result(object): """ - Attributes: - - error - """ + Attributes: + - error + """ - thrift_spec = ( - None, # 0 - ( - 1, - TType.STRUCT, - "error", - (ModelException, ModelException.thrift_spec), - None, - ), # 1 - ) - def __init__(self, error=None): + def __init__(self, error=None,): self.error = error def read(self, iprot): - if ( - iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - and fastbinary is not None - ): - fastbinary.decode_binary( - self, iprot.trans, (self.__class__, self.thrift_spec) - ) + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: @@ -2460,18 +2825,12 @@ iprot.readStructEnd() def write(self, oprot): - if ( - oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated - and self.thrift_spec is not None - and fastbinary is not None - ): - oprot.trans.write( - fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)) - ) + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("update_until_result") + oprot.writeStructBegin('update_until_result') if self.error is not None: - oprot.writeFieldBegin("error", TType.STRUCT, 1) + oprot.writeFieldBegin('error', TType.STRUCT, 1) self.error.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() @@ -2481,37 +2840,35 @@ return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) +all_structs.append(update_until_result) +update_until_result.thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'error', [ModelException, None], None, ), # 1 +) class update_frac_args(object): """ - Attributes: - - frac - """ + Attributes: + - frac + """ - thrift_spec = (None, (1, TType.DOUBLE, "frac", None, None)) # 0 # 1 - def __init__(self, frac=None): + def __init__(self, frac=None,): self.frac = frac def read(self, iprot): - if ( - iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - and fastbinary is not None - ): - fastbinary.decode_binary( - self, iprot.trans, (self.__class__, self.thrift_spec) - ) + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: @@ -2529,18 +2886,12 @@ iprot.readStructEnd() def write(self, oprot): - if ( - oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated - and self.thrift_spec is not None - and fastbinary is not None - ): - oprot.trans.write( - fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)) - ) + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("update_frac_args") + oprot.writeStructBegin('update_frac_args') if self.frac is not None: - oprot.writeFieldBegin("frac", TType.DOUBLE, 1) + oprot.writeFieldBegin('frac', TType.DOUBLE, 1) oprot.writeDouble(self.frac) oprot.writeFieldEnd() oprot.writeFieldStop() @@ -2550,46 +2901,35 @@ return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) +all_structs.append(update_frac_args) +update_frac_args.thrift_spec = ( + None, # 0 + (1, TType.DOUBLE, 'frac', None, None, ), # 1 +) class update_frac_result(object): """ - Attributes: - - error - """ + Attributes: + - error + """ - thrift_spec = ( - None, # 0 - ( - 1, - TType.STRUCT, - "error", - (ModelException, ModelException.thrift_spec), - None, - ), # 1 - ) - def __init__(self, error=None): + def __init__(self, error=None,): self.error = error def read(self, iprot): - if ( - iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - and fastbinary is not None - ): - fastbinary.decode_binary( - self, iprot.trans, (self.__class__, self.thrift_spec) - ) + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: @@ -2608,18 +2948,12 @@ iprot.readStructEnd() def write(self, oprot): - if ( - oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated - and self.thrift_spec is not None - and fastbinary is not None - ): - oprot.trans.write( - fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)) - ) + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("update_frac_result") + oprot.writeStructBegin('update_frac_result') if self.error is not None: - oprot.writeFieldBegin("error", TType.STRUCT, 1) + oprot.writeFieldBegin('error', TType.STRUCT, 1) self.error.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() @@ -2629,30 +2963,28 @@ return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) +all_structs.append(update_frac_result) +update_frac_result.thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'error', [ModelException, None], None, ), # 1 +) class finalize_model_args(object): - thrift_spec = () def read(self, iprot): - if ( - iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - and fastbinary is not None - ): - fastbinary.decode_binary( - self, iprot.trans, (self.__class__, self.thrift_spec) - ) + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: @@ -2665,63 +2997,44 @@ iprot.readStructEnd() def write(self, oprot): - if ( - oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated - and self.thrift_spec is not None - and fastbinary is not None - ): - oprot.trans.write( - fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)) - ) + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("finalize_model_args") + oprot.writeStructBegin('finalize_model_args') oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) +all_structs.append(finalize_model_args) +finalize_model_args.thrift_spec = ( +) class finalize_model_result(object): """ - Attributes: - - error - """ + Attributes: + - error + """ - thrift_spec = ( - None, # 0 - ( - 1, - TType.STRUCT, - "error", - (ModelException, ModelException.thrift_spec), - None, - ), # 1 - ) - def __init__(self, error=None): + def __init__(self, error=None,): self.error = error def read(self, iprot): - if ( - iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - and fastbinary is not None - ): - fastbinary.decode_binary( - self, iprot.trans, (self.__class__, self.thrift_spec) - ) + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: @@ -2740,18 +3053,12 @@ iprot.readStructEnd() def write(self, oprot): - if ( - oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated - and self.thrift_spec is not None - and fastbinary is not None - ): - oprot.trans.write( - fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)) - ) + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("finalize_model_result") + oprot.writeStructBegin('finalize_model_result') if self.error is not None: - oprot.writeFieldBegin("error", TType.STRUCT, 1) + oprot.writeFieldBegin('error', TType.STRUCT, 1) self.error.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() @@ -2761,30 +3068,28 @@ return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) +all_structs.append(finalize_model_result) +finalize_model_result.thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'error', [ModelException, None], None, ), # 1 +) class get_component_name_args(object): - thrift_spec = () def read(self, iprot): - if ( - iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - and fastbinary is not None - ): - fastbinary.decode_binary( - self, iprot.trans, (self.__class__, self.thrift_spec) - ) + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: @@ -2797,65 +3102,46 @@ iprot.readStructEnd() def write(self, oprot): - if ( - oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated - and self.thrift_spec is not None - and fastbinary is not None - ): - oprot.trans.write( - fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)) - ) + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("get_component_name_args") + oprot.writeStructBegin('get_component_name_args') oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) +all_structs.append(get_component_name_args) +get_component_name_args.thrift_spec = ( +) class get_component_name_result(object): """ - Attributes: - - success - - error - """ + Attributes: + - success + - error + """ - thrift_spec = ( - (0, TType.STRING, "success", None, None), # 0 - ( - 1, - TType.STRUCT, - "error", - (ModelException, ModelException.thrift_spec), - None, - ), # 1 - ) - def __init__(self, success=None, error=None): + def __init__(self, success=None, error=None,): self.success = success self.error = error def read(self, iprot): - if ( - iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - and fastbinary is not None - ): - fastbinary.decode_binary( - self, iprot.trans, (self.__class__, self.thrift_spec) - ) + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: @@ -2864,7 +3150,7 @@ break if fid == 0: if ftype == TType.STRING: - self.success = iprot.readString() + self.success = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 1: @@ -2879,22 +3165,16 @@ iprot.readStructEnd() def write(self, oprot): - if ( - oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated - and self.thrift_spec is not None - and fastbinary is not None - ): - oprot.trans.write( - fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)) - ) + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("get_component_name_result") + oprot.writeStructBegin('get_component_name_result') if self.success is not None: - oprot.writeFieldBegin("success", TType.STRING, 0) - oprot.writeString(self.success) + oprot.writeFieldBegin('success', TType.STRING, 0) + oprot.writeString(self.success.encode('utf-8') if sys.version_info[0] == 2 else self.success) oprot.writeFieldEnd() if self.error is not None: - oprot.writeFieldBegin("error", TType.STRUCT, 1) + oprot.writeFieldBegin('error', TType.STRUCT, 1) self.error.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() @@ -2904,30 +3184,28 @@ return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) +all_structs.append(get_component_name_result) +get_component_name_result.thrift_spec = ( + (0, TType.STRING, 'success', 'UTF8', None, ), # 0 + (1, TType.STRUCT, 'error', [ModelException, None], None, ), # 1 +) class get_input_var_names_args(object): - thrift_spec = () def read(self, iprot): - if ( - iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - and fastbinary is not None - ): - fastbinary.decode_binary( - self, iprot.trans, (self.__class__, self.thrift_spec) - ) + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: @@ -2940,54 +3218,44 @@ iprot.readStructEnd() def write(self, oprot): - if ( - oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated - and self.thrift_spec is not None - and fastbinary is not None - ): - oprot.trans.write( - fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)) - ) + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("get_input_var_names_args") + oprot.writeStructBegin('get_input_var_names_args') oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) +all_structs.append(get_input_var_names_args) +get_input_var_names_args.thrift_spec = ( +) class get_input_var_names_result(object): """ - Attributes: - - success - """ + Attributes: + - success + """ - thrift_spec = ((0, TType.LIST, "success", (TType.STRING, None), None),) # 0 - def __init__(self, success=None): + def __init__(self, success=None,): self.success = success def read(self, iprot): - if ( - iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - and fastbinary is not None - ): - fastbinary.decode_binary( - self, iprot.trans, (self.__class__, self.thrift_spec) - ) + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: @@ -2999,7 +3267,7 @@ self.success = [] (_etype3, _size0) = iprot.readListBegin() for _i4 in range(_size0): - _elem5 = iprot.readString() + _elem5 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() self.success.append(_elem5) iprot.readListEnd() else: @@ -3010,21 +3278,15 @@ iprot.readStructEnd() def write(self, oprot): - if ( - oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated - and self.thrift_spec is not None - and fastbinary is not None - ): - oprot.trans.write( - fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)) - ) + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("get_input_var_names_result") + oprot.writeStructBegin('get_input_var_names_result') if self.success is not None: - oprot.writeFieldBegin("success", TType.LIST, 0) + oprot.writeFieldBegin('success', TType.LIST, 0) oprot.writeListBegin(TType.STRING, len(self.success)) for iter6 in self.success: - oprot.writeString(iter6) + oprot.writeString(iter6.encode('utf-8') if sys.version_info[0] == 2 else iter6) oprot.writeListEnd() oprot.writeFieldEnd() oprot.writeFieldStop() @@ -3034,30 +3296,27 @@ return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) +all_structs.append(get_input_var_names_result) +get_input_var_names_result.thrift_spec = ( + (0, TType.LIST, 'success', (TType.STRING, 'UTF8', False), None, ), # 0 +) class get_output_var_names_args(object): - thrift_spec = () def read(self, iprot): - if ( - iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - and fastbinary is not None - ): - fastbinary.decode_binary( - self, iprot.trans, (self.__class__, self.thrift_spec) - ) + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: @@ -3070,54 +3329,44 @@ iprot.readStructEnd() def write(self, oprot): - if ( - oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated - and self.thrift_spec is not None - and fastbinary is not None - ): - oprot.trans.write( - fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)) - ) + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("get_output_var_names_args") + oprot.writeStructBegin('get_output_var_names_args') oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) +all_structs.append(get_output_var_names_args) +get_output_var_names_args.thrift_spec = ( +) class get_output_var_names_result(object): """ - Attributes: - - success - """ + Attributes: + - success + """ - thrift_spec = ((0, TType.LIST, "success", (TType.STRING, None), None),) # 0 - def __init__(self, success=None): + def __init__(self, success=None,): self.success = success def read(self, iprot): - if ( - iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - and fastbinary is not None - ): - fastbinary.decode_binary( - self, iprot.trans, (self.__class__, self.thrift_spec) - ) + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: @@ -3129,7 +3378,7 @@ self.success = [] (_etype10, _size7) = iprot.readListBegin() for _i11 in range(_size7): - _elem12 = iprot.readString() + _elem12 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() self.success.append(_elem12) iprot.readListEnd() else: @@ -3140,21 +3389,15 @@ iprot.readStructEnd() def write(self, oprot): - if ( - oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated - and self.thrift_spec is not None - and fastbinary is not None - ): - oprot.trans.write( - fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)) - ) + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("get_output_var_names_result") + oprot.writeStructBegin('get_output_var_names_result') if self.success is not None: - oprot.writeFieldBegin("success", TType.LIST, 0) + oprot.writeFieldBegin('success', TType.LIST, 0) oprot.writeListBegin(TType.STRING, len(self.success)) for iter13 in self.success: - oprot.writeString(iter13) + oprot.writeString(iter13.encode('utf-8') if sys.version_info[0] == 2 else iter13) oprot.writeListEnd() oprot.writeFieldEnd() oprot.writeFieldStop() @@ -3164,37 +3407,34 @@ return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) +all_structs.append(get_output_var_names_result) +get_output_var_names_result.thrift_spec = ( + (0, TType.LIST, 'success', (TType.STRING, 'UTF8', False), None, ), # 0 +) class get_var_type_args(object): """ - Attributes: - - long_var_name - """ + Attributes: + - long_var_name + """ - thrift_spec = (None, (1, TType.STRING, "long_var_name", None, None)) # 0 # 1 - def __init__(self, long_var_name=None): + def __init__(self, long_var_name=None,): self.long_var_name = long_var_name def read(self, iprot): - if ( - iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - and fastbinary is not None - ): - fastbinary.decode_binary( - self, iprot.trans, (self.__class__, self.thrift_spec) - ) + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: @@ -3203,7 +3443,7 @@ break if fid == 1: if ftype == TType.STRING: - self.long_var_name = iprot.readString() + self.long_var_name = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: @@ -3212,19 +3452,13 @@ iprot.readStructEnd() def write(self, oprot): - if ( - oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated - and self.thrift_spec is not None - and fastbinary is not None - ): - oprot.trans.write( - fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)) - ) + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("get_var_type_args") + oprot.writeStructBegin('get_var_type_args') if self.long_var_name is not None: - oprot.writeFieldBegin("long_var_name", TType.STRING, 1) - oprot.writeString(self.long_var_name) + oprot.writeFieldBegin('long_var_name', TType.STRING, 1) + oprot.writeString(self.long_var_name.encode('utf-8') if sys.version_info[0] == 2 else self.long_var_name) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -3233,37 +3467,35 @@ return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) +all_structs.append(get_var_type_args) +get_var_type_args.thrift_spec = ( + None, # 0 + (1, TType.STRING, 'long_var_name', 'UTF8', None, ), # 1 +) class get_var_type_result(object): """ - Attributes: - - success - """ + Attributes: + - success + """ - thrift_spec = ((0, TType.STRING, "success", None, None),) # 0 - def __init__(self, success=None): + def __init__(self, success=None,): self.success = success def read(self, iprot): - if ( - iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - and fastbinary is not None - ): - fastbinary.decode_binary( - self, iprot.trans, (self.__class__, self.thrift_spec) - ) + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: @@ -3272,7 +3504,7 @@ break if fid == 0: if ftype == TType.STRING: - self.success = iprot.readString() + self.success = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: @@ -3281,19 +3513,13 @@ iprot.readStructEnd() def write(self, oprot): - if ( - oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated - and self.thrift_spec is not None - and fastbinary is not None - ): - oprot.trans.write( - fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)) - ) + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("get_var_type_result") + oprot.writeStructBegin('get_var_type_result') if self.success is not None: - oprot.writeFieldBegin("success", TType.STRING, 0) - oprot.writeString(self.success) + oprot.writeFieldBegin('success', TType.STRING, 0) + oprot.writeString(self.success.encode('utf-8') if sys.version_info[0] == 2 else self.success) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -3302,37 +3528,34 @@ return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) +all_structs.append(get_var_type_result) +get_var_type_result.thrift_spec = ( + (0, TType.STRING, 'success', 'UTF8', None, ), # 0 +) class get_var_units_args(object): """ - Attributes: - - long_var_name - """ + Attributes: + - long_var_name + """ - thrift_spec = (None, (1, TType.STRING, "long_var_name", None, None)) # 0 # 1 - def __init__(self, long_var_name=None): + def __init__(self, long_var_name=None,): self.long_var_name = long_var_name def read(self, iprot): - if ( - iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - and fastbinary is not None - ): - fastbinary.decode_binary( - self, iprot.trans, (self.__class__, self.thrift_spec) - ) + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: @@ -3341,7 +3564,7 @@ break if fid == 1: if ftype == TType.STRING: - self.long_var_name = iprot.readString() + self.long_var_name = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: @@ -3350,19 +3573,13 @@ iprot.readStructEnd() def write(self, oprot): - if ( - oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated - and self.thrift_spec is not None - and fastbinary is not None - ): - oprot.trans.write( - fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)) - ) + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("get_var_units_args") + oprot.writeStructBegin('get_var_units_args') if self.long_var_name is not None: - oprot.writeFieldBegin("long_var_name", TType.STRING, 1) - oprot.writeString(self.long_var_name) + oprot.writeFieldBegin('long_var_name', TType.STRING, 1) + oprot.writeString(self.long_var_name.encode('utf-8') if sys.version_info[0] == 2 else self.long_var_name) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -3371,37 +3588,35 @@ return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) +all_structs.append(get_var_units_args) +get_var_units_args.thrift_spec = ( + None, # 0 + (1, TType.STRING, 'long_var_name', 'UTF8', None, ), # 1 +) class get_var_units_result(object): """ - Attributes: - - success - """ + Attributes: + - success + """ - thrift_spec = ((0, TType.STRING, "success", None, None),) # 0 - def __init__(self, success=None): + def __init__(self, success=None,): self.success = success def read(self, iprot): - if ( - iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - and fastbinary is not None - ): - fastbinary.decode_binary( - self, iprot.trans, (self.__class__, self.thrift_spec) - ) + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: @@ -3410,7 +3625,7 @@ break if fid == 0: if ftype == TType.STRING: - self.success = iprot.readString() + self.success = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: @@ -3419,19 +3634,13 @@ iprot.readStructEnd() def write(self, oprot): - if ( - oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated - and self.thrift_spec is not None - and fastbinary is not None - ): - oprot.trans.write( - fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)) - ) + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("get_var_units_result") + oprot.writeStructBegin('get_var_units_result') if self.success is not None: - oprot.writeFieldBegin("success", TType.STRING, 0) - oprot.writeString(self.success) + oprot.writeFieldBegin('success', TType.STRING, 0) + oprot.writeString(self.success.encode('utf-8') if sys.version_info[0] == 2 else self.success) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -3440,37 +3649,34 @@ return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) +all_structs.append(get_var_units_result) +get_var_units_result.thrift_spec = ( + (0, TType.STRING, 'success', 'UTF8', None, ), # 0 +) class get_var_rank_args(object): """ - Attributes: - - long_var_name - """ + Attributes: + - long_var_name + """ - thrift_spec = (None, (1, TType.STRING, "long_var_name", None, None)) # 0 # 1 - def __init__(self, long_var_name=None): + def __init__(self, long_var_name=None,): self.long_var_name = long_var_name def read(self, iprot): - if ( - iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - and fastbinary is not None - ): - fastbinary.decode_binary( - self, iprot.trans, (self.__class__, self.thrift_spec) - ) + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: @@ -3479,7 +3685,7 @@ break if fid == 1: if ftype == TType.STRING: - self.long_var_name = iprot.readString() + self.long_var_name = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: @@ -3488,19 +3694,13 @@ iprot.readStructEnd() def write(self, oprot): - if ( - oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated - and self.thrift_spec is not None - and fastbinary is not None - ): - oprot.trans.write( - fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)) - ) + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("get_var_rank_args") + oprot.writeStructBegin('get_var_rank_args') if self.long_var_name is not None: - oprot.writeFieldBegin("long_var_name", TType.STRING, 1) - oprot.writeString(self.long_var_name) + oprot.writeFieldBegin('long_var_name', TType.STRING, 1) + oprot.writeString(self.long_var_name.encode('utf-8') if sys.version_info[0] == 2 else self.long_var_name) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -3509,37 +3709,35 @@ return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) +all_structs.append(get_var_rank_args) +get_var_rank_args.thrift_spec = ( + None, # 0 + (1, TType.STRING, 'long_var_name', 'UTF8', None, ), # 1 +) class get_var_rank_result(object): """ - Attributes: - - success - """ + Attributes: + - success + """ - thrift_spec = ((0, TType.I32, "success", None, None),) # 0 - def __init__(self, success=None): + def __init__(self, success=None,): self.success = success def read(self, iprot): - if ( - iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - and fastbinary is not None - ): - fastbinary.decode_binary( - self, iprot.trans, (self.__class__, self.thrift_spec) - ) + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: @@ -3557,18 +3755,12 @@ iprot.readStructEnd() def write(self, oprot): - if ( - oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated - and self.thrift_spec is not None - and fastbinary is not None - ): - oprot.trans.write( - fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)) - ) + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("get_var_rank_result") + oprot.writeStructBegin('get_var_rank_result') if self.success is not None: - oprot.writeFieldBegin("success", TType.I32, 0) + oprot.writeFieldBegin('success', TType.I32, 0) oprot.writeI32(self.success) oprot.writeFieldEnd() oprot.writeFieldStop() @@ -3578,37 +3770,34 @@ return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) +all_structs.append(get_var_rank_result) +get_var_rank_result.thrift_spec = ( + (0, TType.I32, 'success', None, None, ), # 0 +) class get_var_size_args(object): """ - Attributes: - - long_var_name - """ + Attributes: + - long_var_name + """ - thrift_spec = (None, (1, TType.STRING, "long_var_name", None, None)) # 0 # 1 - def __init__(self, long_var_name=None): + def __init__(self, long_var_name=None,): self.long_var_name = long_var_name def read(self, iprot): - if ( - iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - and fastbinary is not None - ): - fastbinary.decode_binary( - self, iprot.trans, (self.__class__, self.thrift_spec) - ) + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: @@ -3617,7 +3806,7 @@ break if fid == 1: if ftype == TType.STRING: - self.long_var_name = iprot.readString() + self.long_var_name = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: @@ -3626,19 +3815,13 @@ iprot.readStructEnd() def write(self, oprot): - if ( - oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated - and self.thrift_spec is not None - and fastbinary is not None - ): - oprot.trans.write( - fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)) - ) + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("get_var_size_args") + oprot.writeStructBegin('get_var_size_args') if self.long_var_name is not None: - oprot.writeFieldBegin("long_var_name", TType.STRING, 1) - oprot.writeString(self.long_var_name) + oprot.writeFieldBegin('long_var_name', TType.STRING, 1) + oprot.writeString(self.long_var_name.encode('utf-8') if sys.version_info[0] == 2 else self.long_var_name) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -3647,37 +3830,35 @@ return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) +all_structs.append(get_var_size_args) +get_var_size_args.thrift_spec = ( + None, # 0 + (1, TType.STRING, 'long_var_name', 'UTF8', None, ), # 1 +) class get_var_size_result(object): """ - Attributes: - - success - """ + Attributes: + - success + """ - thrift_spec = ((0, TType.I32, "success", None, None),) # 0 - def __init__(self, success=None): + def __init__(self, success=None,): self.success = success def read(self, iprot): - if ( - iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - and fastbinary is not None - ): - fastbinary.decode_binary( - self, iprot.trans, (self.__class__, self.thrift_spec) - ) + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: @@ -3695,18 +3876,12 @@ iprot.readStructEnd() def write(self, oprot): - if ( - oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated - and self.thrift_spec is not None - and fastbinary is not None - ): - oprot.trans.write( - fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)) - ) + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("get_var_size_result") + oprot.writeStructBegin('get_var_size_result') if self.success is not None: - oprot.writeFieldBegin("success", TType.I32, 0) + oprot.writeFieldBegin('success', TType.I32, 0) oprot.writeI32(self.success) oprot.writeFieldEnd() oprot.writeFieldStop() @@ -3716,37 +3891,34 @@ return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) +all_structs.append(get_var_size_result) +get_var_size_result.thrift_spec = ( + (0, TType.I32, 'success', None, None, ), # 0 +) class get_var_nbytes_args(object): """ - Attributes: - - long_var_name - """ + Attributes: + - long_var_name + """ - thrift_spec = (None, (1, TType.STRING, "long_var_name", None, None)) # 0 # 1 - def __init__(self, long_var_name=None): + def __init__(self, long_var_name=None,): self.long_var_name = long_var_name def read(self, iprot): - if ( - iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - and fastbinary is not None - ): - fastbinary.decode_binary( - self, iprot.trans, (self.__class__, self.thrift_spec) - ) + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: @@ -3755,7 +3927,7 @@ break if fid == 1: if ftype == TType.STRING: - self.long_var_name = iprot.readString() + self.long_var_name = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: @@ -3764,19 +3936,13 @@ iprot.readStructEnd() def write(self, oprot): - if ( - oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated - and self.thrift_spec is not None - and fastbinary is not None - ): - oprot.trans.write( - fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)) - ) + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("get_var_nbytes_args") + oprot.writeStructBegin('get_var_nbytes_args') if self.long_var_name is not None: - oprot.writeFieldBegin("long_var_name", TType.STRING, 1) - oprot.writeString(self.long_var_name) + oprot.writeFieldBegin('long_var_name', TType.STRING, 1) + oprot.writeString(self.long_var_name.encode('utf-8') if sys.version_info[0] == 2 else self.long_var_name) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -3785,37 +3951,35 @@ return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) +all_structs.append(get_var_nbytes_args) +get_var_nbytes_args.thrift_spec = ( + None, # 0 + (1, TType.STRING, 'long_var_name', 'UTF8', None, ), # 1 +) class get_var_nbytes_result(object): """ - Attributes: - - success - """ + Attributes: + - success + """ - thrift_spec = ((0, TType.I32, "success", None, None),) # 0 - def __init__(self, success=None): + def __init__(self, success=None,): self.success = success def read(self, iprot): - if ( - iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - and fastbinary is not None - ): - fastbinary.decode_binary( - self, iprot.trans, (self.__class__, self.thrift_spec) - ) + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: @@ -3833,18 +3997,12 @@ iprot.readStructEnd() def write(self, oprot): - if ( - oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated - and self.thrift_spec is not None - and fastbinary is not None - ): - oprot.trans.write( - fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)) - ) + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("get_var_nbytes_result") + oprot.writeStructBegin('get_var_nbytes_result') if self.success is not None: - oprot.writeFieldBegin("success", TType.I32, 0) + oprot.writeFieldBegin('success', TType.I32, 0) oprot.writeI32(self.success) oprot.writeFieldEnd() oprot.writeFieldStop() @@ -3854,30 +4012,27 @@ return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) +all_structs.append(get_var_nbytes_result) +get_var_nbytes_result.thrift_spec = ( + (0, TType.I32, 'success', None, None, ), # 0 +) class get_start_time_args(object): - thrift_spec = () def read(self, iprot): - if ( - iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - and fastbinary is not None - ): - fastbinary.decode_binary( - self, iprot.trans, (self.__class__, self.thrift_spec) - ) + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: @@ -3890,54 +4045,44 @@ iprot.readStructEnd() def write(self, oprot): - if ( - oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated - and self.thrift_spec is not None - and fastbinary is not None - ): - oprot.trans.write( - fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)) - ) + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("get_start_time_args") + oprot.writeStructBegin('get_start_time_args') oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) +all_structs.append(get_start_time_args) +get_start_time_args.thrift_spec = ( +) class get_start_time_result(object): """ - Attributes: - - success - """ + Attributes: + - success + """ - thrift_spec = ((0, TType.DOUBLE, "success", None, None),) # 0 - def __init__(self, success=None): + def __init__(self, success=None,): self.success = success def read(self, iprot): - if ( - iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - and fastbinary is not None - ): - fastbinary.decode_binary( - self, iprot.trans, (self.__class__, self.thrift_spec) - ) + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: @@ -3955,18 +4100,12 @@ iprot.readStructEnd() def write(self, oprot): - if ( - oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated - and self.thrift_spec is not None - and fastbinary is not None - ): - oprot.trans.write( - fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)) - ) + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("get_start_time_result") + oprot.writeStructBegin('get_start_time_result') if self.success is not None: - oprot.writeFieldBegin("success", TType.DOUBLE, 0) + oprot.writeFieldBegin('success', TType.DOUBLE, 0) oprot.writeDouble(self.success) oprot.writeFieldEnd() oprot.writeFieldStop() @@ -3976,30 +4115,27 @@ return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) +all_structs.append(get_start_time_result) +get_start_time_result.thrift_spec = ( + (0, TType.DOUBLE, 'success', None, None, ), # 0 +) class get_current_time_args(object): - thrift_spec = () def read(self, iprot): - if ( - iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - and fastbinary is not None - ): - fastbinary.decode_binary( - self, iprot.trans, (self.__class__, self.thrift_spec) - ) + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: @@ -4012,54 +4148,44 @@ iprot.readStructEnd() def write(self, oprot): - if ( - oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated - and self.thrift_spec is not None - and fastbinary is not None - ): - oprot.trans.write( - fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)) - ) + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("get_current_time_args") + oprot.writeStructBegin('get_current_time_args') oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) +all_structs.append(get_current_time_args) +get_current_time_args.thrift_spec = ( +) class get_current_time_result(object): """ - Attributes: - - success - """ + Attributes: + - success + """ - thrift_spec = ((0, TType.DOUBLE, "success", None, None),) # 0 - def __init__(self, success=None): + def __init__(self, success=None,): self.success = success def read(self, iprot): - if ( - iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - and fastbinary is not None - ): - fastbinary.decode_binary( - self, iprot.trans, (self.__class__, self.thrift_spec) - ) + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: @@ -4077,18 +4203,12 @@ iprot.readStructEnd() def write(self, oprot): - if ( - oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated - and self.thrift_spec is not None - and fastbinary is not None - ): - oprot.trans.write( - fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)) - ) + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("get_current_time_result") + oprot.writeStructBegin('get_current_time_result') if self.success is not None: - oprot.writeFieldBegin("success", TType.DOUBLE, 0) + oprot.writeFieldBegin('success', TType.DOUBLE, 0) oprot.writeDouble(self.success) oprot.writeFieldEnd() oprot.writeFieldStop() @@ -4098,30 +4218,27 @@ return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) +all_structs.append(get_current_time_result) +get_current_time_result.thrift_spec = ( + (0, TType.DOUBLE, 'success', None, None, ), # 0 +) class get_end_time_args(object): - thrift_spec = () def read(self, iprot): - if ( - iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - and fastbinary is not None - ): - fastbinary.decode_binary( - self, iprot.trans, (self.__class__, self.thrift_spec) - ) + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: @@ -4134,54 +4251,44 @@ iprot.readStructEnd() def write(self, oprot): - if ( - oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated - and self.thrift_spec is not None - and fastbinary is not None - ): - oprot.trans.write( - fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)) - ) + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("get_end_time_args") + oprot.writeStructBegin('get_end_time_args') oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) +all_structs.append(get_end_time_args) +get_end_time_args.thrift_spec = ( +) class get_end_time_result(object): """ - Attributes: - - success - """ + Attributes: + - success + """ - thrift_spec = ((0, TType.DOUBLE, "success", None, None),) # 0 - def __init__(self, success=None): + def __init__(self, success=None,): self.success = success def read(self, iprot): - if ( - iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - and fastbinary is not None - ): - fastbinary.decode_binary( - self, iprot.trans, (self.__class__, self.thrift_spec) - ) + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: @@ -4199,18 +4306,12 @@ iprot.readStructEnd() def write(self, oprot): - if ( - oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated - and self.thrift_spec is not None - and fastbinary is not None - ): - oprot.trans.write( - fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)) - ) + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("get_end_time_result") + oprot.writeStructBegin('get_end_time_result') if self.success is not None: - oprot.writeFieldBegin("success", TType.DOUBLE, 0) + oprot.writeFieldBegin('success', TType.DOUBLE, 0) oprot.writeDouble(self.success) oprot.writeFieldEnd() oprot.writeFieldStop() @@ -4220,30 +4321,27 @@ return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) +all_structs.append(get_end_time_result) +get_end_time_result.thrift_spec = ( + (0, TType.DOUBLE, 'success', None, None, ), # 0 +) class get_time_step_args(object): - thrift_spec = () def read(self, iprot): - if ( - iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - and fastbinary is not None - ): - fastbinary.decode_binary( - self, iprot.trans, (self.__class__, self.thrift_spec) - ) + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: @@ -4256,54 +4354,44 @@ iprot.readStructEnd() def write(self, oprot): - if ( - oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated - and self.thrift_spec is not None - and fastbinary is not None - ): - oprot.trans.write( - fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)) - ) + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("get_time_step_args") + oprot.writeStructBegin('get_time_step_args') oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) +all_structs.append(get_time_step_args) +get_time_step_args.thrift_spec = ( +) class get_time_step_result(object): """ - Attributes: - - success - """ + Attributes: + - success + """ - thrift_spec = ((0, TType.DOUBLE, "success", None, None),) # 0 - def __init__(self, success=None): + def __init__(self, success=None,): self.success = success def read(self, iprot): - if ( - iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - and fastbinary is not None - ): - fastbinary.decode_binary( - self, iprot.trans, (self.__class__, self.thrift_spec) - ) + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: @@ -4321,18 +4409,12 @@ iprot.readStructEnd() def write(self, oprot): - if ( - oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated - and self.thrift_spec is not None - and fastbinary is not None - ): - oprot.trans.write( - fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)) - ) + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("get_time_step_result") + oprot.writeStructBegin('get_time_step_result') if self.success is not None: - oprot.writeFieldBegin("success", TType.DOUBLE, 0) + oprot.writeFieldBegin('success', TType.DOUBLE, 0) oprot.writeDouble(self.success) oprot.writeFieldEnd() oprot.writeFieldStop() @@ -4342,30 +4424,27 @@ return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) +all_structs.append(get_time_step_result) +get_time_step_result.thrift_spec = ( + (0, TType.DOUBLE, 'success', None, None, ), # 0 +) class get_time_units_args(object): - thrift_spec = () def read(self, iprot): - if ( - iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - and fastbinary is not None - ): - fastbinary.decode_binary( - self, iprot.trans, (self.__class__, self.thrift_spec) - ) + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: @@ -4378,54 +4457,44 @@ iprot.readStructEnd() def write(self, oprot): - if ( - oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated - and self.thrift_spec is not None - and fastbinary is not None - ): - oprot.trans.write( - fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)) - ) + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("get_time_units_args") + oprot.writeStructBegin('get_time_units_args') oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) +all_structs.append(get_time_units_args) +get_time_units_args.thrift_spec = ( +) class get_time_units_result(object): """ - Attributes: - - success - """ + Attributes: + - success + """ - thrift_spec = ((0, TType.STRING, "success", None, None),) # 0 - def __init__(self, success=None): + def __init__(self, success=None,): self.success = success def read(self, iprot): - if ( - iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - and fastbinary is not None - ): - fastbinary.decode_binary( - self, iprot.trans, (self.__class__, self.thrift_spec) - ) + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: @@ -4434,7 +4503,7 @@ break if fid == 0: if ftype == TType.STRING: - self.success = iprot.readString() + self.success = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: @@ -4443,19 +4512,13 @@ iprot.readStructEnd() def write(self, oprot): - if ( - oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated - and self.thrift_spec is not None - and fastbinary is not None - ): - oprot.trans.write( - fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)) - ) + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("get_time_units_result") + oprot.writeStructBegin('get_time_units_result') if self.success is not None: - oprot.writeFieldBegin("success", TType.STRING, 0) - oprot.writeString(self.success) + oprot.writeFieldBegin('success', TType.STRING, 0) + oprot.writeString(self.success.encode('utf-8') if sys.version_info[0] == 2 else self.success) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -4464,37 +4527,34 @@ return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) +all_structs.append(get_time_units_result) +get_time_units_result.thrift_spec = ( + (0, TType.STRING, 'success', 'UTF8', None, ), # 0 +) class get_value_args(object): """ - Attributes: - - long_var_name - """ + Attributes: + - long_var_name + """ - thrift_spec = (None, (1, TType.STRING, "long_var_name", None, None)) # 0 # 1 - def __init__(self, long_var_name=None): + def __init__(self, long_var_name=None,): self.long_var_name = long_var_name def read(self, iprot): - if ( - iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - and fastbinary is not None - ): - fastbinary.decode_binary( - self, iprot.trans, (self.__class__, self.thrift_spec) - ) + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: @@ -4503,7 +4563,7 @@ break if fid == 1: if ftype == TType.STRING: - self.long_var_name = iprot.readString() + self.long_var_name = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: @@ -4512,19 +4572,13 @@ iprot.readStructEnd() def write(self, oprot): - if ( - oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated - and self.thrift_spec is not None - and fastbinary is not None - ): - oprot.trans.write( - fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)) - ) + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("get_value_args") + oprot.writeStructBegin('get_value_args') if self.long_var_name is not None: - oprot.writeFieldBegin("long_var_name", TType.STRING, 1) - oprot.writeString(self.long_var_name) + oprot.writeFieldBegin('long_var_name', TType.STRING, 1) + oprot.writeString(self.long_var_name.encode('utf-8') if sys.version_info[0] == 2 else self.long_var_name) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -4533,48 +4587,37 @@ return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) +all_structs.append(get_value_args) +get_value_args.thrift_spec = ( + None, # 0 + (1, TType.STRING, 'long_var_name', 'UTF8', None, ), # 1 +) class get_value_result(object): """ - Attributes: - - success - - error - """ + Attributes: + - success + - error + """ - thrift_spec = ( - (0, TType.STRING, "success", None, None), # 0 - ( - 1, - TType.STRUCT, - "error", - (ModelException, ModelException.thrift_spec), - None, - ), # 1 - ) - def __init__(self, success=None, error=None): + def __init__(self, success=None, error=None,): self.success = success self.error = error def read(self, iprot): - if ( - iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - and fastbinary is not None - ): - fastbinary.decode_binary( - self, iprot.trans, (self.__class__, self.thrift_spec) - ) + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: @@ -4583,7 +4626,7 @@ break if fid == 0: if ftype == TType.STRING: - self.success = iprot.readString() + self.success = iprot.readBinary() else: iprot.skip(ftype) elif fid == 1: @@ -4598,22 +4641,16 @@ iprot.readStructEnd() def write(self, oprot): - if ( - oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated - and self.thrift_spec is not None - and fastbinary is not None - ): - oprot.trans.write( - fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)) - ) + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("get_value_result") + oprot.writeStructBegin('get_value_result') if self.success is not None: - oprot.writeFieldBegin("success", TType.STRING, 0) - oprot.writeString(self.success) + oprot.writeFieldBegin('success', TType.STRING, 0) + oprot.writeBinary(self.success) oprot.writeFieldEnd() if self.error is not None: - oprot.writeFieldBegin("error", TType.STRUCT, 1) + oprot.writeFieldBegin('error', TType.STRUCT, 1) self.error.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() @@ -4623,43 +4660,37 @@ return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) +all_structs.append(get_value_result) +get_value_result.thrift_spec = ( + (0, TType.STRING, 'success', 'BINARY', None, ), # 0 + (1, TType.STRUCT, 'error', [ModelException, None], None, ), # 1 +) class get_value_at_indices_args(object): """ - Attributes: - - long_var_name - - inds - """ + Attributes: + - long_var_name + - inds + """ - thrift_spec = ( - None, # 0 - (1, TType.STRING, "long_var_name", None, None), # 1 - (2, TType.LIST, "inds", (TType.I32, None), None), # 2 - ) - def __init__(self, long_var_name=None, inds=None): + def __init__(self, long_var_name=None, inds=None,): self.long_var_name = long_var_name self.inds = inds def read(self, iprot): - if ( - iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - and fastbinary is not None - ): - fastbinary.decode_binary( - self, iprot.trans, (self.__class__, self.thrift_spec) - ) + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: @@ -4668,7 +4699,7 @@ break if fid == 1: if ftype == TType.STRING: - self.long_var_name = iprot.readString() + self.long_var_name = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 2: @@ -4687,22 +4718,16 @@ iprot.readStructEnd() def write(self, oprot): - if ( - oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated - and self.thrift_spec is not None - and fastbinary is not None - ): - oprot.trans.write( - fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)) - ) + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("get_value_at_indices_args") + oprot.writeStructBegin('get_value_at_indices_args') if self.long_var_name is not None: - oprot.writeFieldBegin("long_var_name", TType.STRING, 1) - oprot.writeString(self.long_var_name) + oprot.writeFieldBegin('long_var_name', TType.STRING, 1) + oprot.writeString(self.long_var_name.encode('utf-8') if sys.version_info[0] == 2 else self.long_var_name) oprot.writeFieldEnd() if self.inds is not None: - oprot.writeFieldBegin("inds", TType.LIST, 2) + oprot.writeFieldBegin('inds', TType.LIST, 2) oprot.writeListBegin(TType.I32, len(self.inds)) for iter20 in self.inds: oprot.writeI32(iter20) @@ -4715,48 +4740,38 @@ return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) +all_structs.append(get_value_at_indices_args) +get_value_at_indices_args.thrift_spec = ( + None, # 0 + (1, TType.STRING, 'long_var_name', 'UTF8', None, ), # 1 + (2, TType.LIST, 'inds', (TType.I32, None, False), None, ), # 2 +) class get_value_at_indices_result(object): """ - Attributes: - - success - - error - """ + Attributes: + - success + - error + """ - thrift_spec = ( - (0, TType.STRING, "success", None, None), # 0 - ( - 1, - TType.STRUCT, - "error", - (ModelException, ModelException.thrift_spec), - None, - ), # 1 - ) - def __init__(self, success=None, error=None): + def __init__(self, success=None, error=None,): self.success = success self.error = error def read(self, iprot): - if ( - iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - and fastbinary is not None - ): - fastbinary.decode_binary( - self, iprot.trans, (self.__class__, self.thrift_spec) - ) + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: @@ -4765,7 +4780,7 @@ break if fid == 0: if ftype == TType.STRING: - self.success = iprot.readString() + self.success = iprot.readBinary() else: iprot.skip(ftype) elif fid == 1: @@ -4780,22 +4795,16 @@ iprot.readStructEnd() def write(self, oprot): - if ( - oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated - and self.thrift_spec is not None - and fastbinary is not None - ): - oprot.trans.write( - fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)) - ) + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("get_value_at_indices_result") + oprot.writeStructBegin('get_value_at_indices_result') if self.success is not None: - oprot.writeFieldBegin("success", TType.STRING, 0) - oprot.writeString(self.success) + oprot.writeFieldBegin('success', TType.STRING, 0) + oprot.writeBinary(self.success) oprot.writeFieldEnd() if self.error is not None: - oprot.writeFieldBegin("error", TType.STRUCT, 1) + oprot.writeFieldBegin('error', TType.STRUCT, 1) self.error.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() @@ -4805,43 +4814,37 @@ return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) +all_structs.append(get_value_at_indices_result) +get_value_at_indices_result.thrift_spec = ( + (0, TType.STRING, 'success', 'BINARY', None, ), # 0 + (1, TType.STRUCT, 'error', [ModelException, None], None, ), # 1 +) class set_value_args(object): """ - Attributes: - - long_var_name - - src - """ + Attributes: + - long_var_name + - src + """ - thrift_spec = ( - None, # 0 - (1, TType.STRING, "long_var_name", None, None), # 1 - (2, TType.STRING, "src", None, None), # 2 - ) - def __init__(self, long_var_name=None, src=None): + def __init__(self, long_var_name=None, src=None,): self.long_var_name = long_var_name self.src = src def read(self, iprot): - if ( - iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - and fastbinary is not None - ): - fastbinary.decode_binary( - self, iprot.trans, (self.__class__, self.thrift_spec) - ) + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: @@ -4850,12 +4853,12 @@ break if fid == 1: if ftype == TType.STRING: - self.long_var_name = iprot.readString() + self.long_var_name = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: - self.src = iprot.readString() + self.src = iprot.readBinary() else: iprot.skip(ftype) else: @@ -4864,23 +4867,17 @@ iprot.readStructEnd() def write(self, oprot): - if ( - oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated - and self.thrift_spec is not None - and fastbinary is not None - ): - oprot.trans.write( - fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)) - ) + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("set_value_args") + oprot.writeStructBegin('set_value_args') if self.long_var_name is not None: - oprot.writeFieldBegin("long_var_name", TType.STRING, 1) - oprot.writeString(self.long_var_name) + oprot.writeFieldBegin('long_var_name', TType.STRING, 1) + oprot.writeString(self.long_var_name.encode('utf-8') if sys.version_info[0] == 2 else self.long_var_name) oprot.writeFieldEnd() if self.src is not None: - oprot.writeFieldBegin("src", TType.STRING, 2) - oprot.writeString(self.src) + oprot.writeFieldBegin('src', TType.STRING, 2) + oprot.writeBinary(self.src) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -4889,46 +4886,36 @@ return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) +all_structs.append(set_value_args) +set_value_args.thrift_spec = ( + None, # 0 + (1, TType.STRING, 'long_var_name', 'UTF8', None, ), # 1 + (2, TType.STRING, 'src', 'BINARY', None, ), # 2 +) class set_value_result(object): """ - Attributes: - - error - """ + Attributes: + - error + """ - thrift_spec = ( - None, # 0 - ( - 1, - TType.STRUCT, - "error", - (ModelException, ModelException.thrift_spec), - None, - ), # 1 - ) - def __init__(self, error=None): + def __init__(self, error=None,): self.error = error def read(self, iprot): - if ( - iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - and fastbinary is not None - ): - fastbinary.decode_binary( - self, iprot.trans, (self.__class__, self.thrift_spec) - ) + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: @@ -4947,18 +4934,12 @@ iprot.readStructEnd() def write(self, oprot): - if ( - oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated - and self.thrift_spec is not None - and fastbinary is not None - ): - oprot.trans.write( - fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)) - ) + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("set_value_result") + oprot.writeStructBegin('set_value_result') if self.error is not None: - oprot.writeFieldBegin("error", TType.STRUCT, 1) + oprot.writeFieldBegin('error', TType.STRUCT, 1) self.error.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() @@ -4968,46 +4949,39 @@ return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) +all_structs.append(set_value_result) +set_value_result.thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'error', [ModelException, None], None, ), # 1 +) class set_value_at_indices_args(object): """ - Attributes: - - long_var_name - - inds - - src - """ + Attributes: + - long_var_name + - inds + - src + """ - thrift_spec = ( - None, # 0 - (1, TType.STRING, "long_var_name", None, None), # 1 - (2, TType.LIST, "inds", (TType.I32, None), None), # 2 - (3, TType.STRING, "src", None, None), # 3 - ) - def __init__(self, long_var_name=None, inds=None, src=None): + def __init__(self, long_var_name=None, inds=None, src=None,): self.long_var_name = long_var_name self.inds = inds self.src = src def read(self, iprot): - if ( - iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - and fastbinary is not None - ): - fastbinary.decode_binary( - self, iprot.trans, (self.__class__, self.thrift_spec) - ) + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: @@ -5016,7 +4990,7 @@ break if fid == 1: if ftype == TType.STRING: - self.long_var_name = iprot.readString() + self.long_var_name = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 2: @@ -5031,7 +5005,7 @@ iprot.skip(ftype) elif fid == 3: if ftype == TType.STRING: - self.src = iprot.readString() + self.src = iprot.readBinary() else: iprot.skip(ftype) else: @@ -5040,30 +5014,24 @@ iprot.readStructEnd() def write(self, oprot): - if ( - oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated - and self.thrift_spec is not None - and fastbinary is not None - ): - oprot.trans.write( - fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)) - ) + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("set_value_at_indices_args") + oprot.writeStructBegin('set_value_at_indices_args') if self.long_var_name is not None: - oprot.writeFieldBegin("long_var_name", TType.STRING, 1) - oprot.writeString(self.long_var_name) + oprot.writeFieldBegin('long_var_name', TType.STRING, 1) + oprot.writeString(self.long_var_name.encode('utf-8') if sys.version_info[0] == 2 else self.long_var_name) oprot.writeFieldEnd() if self.inds is not None: - oprot.writeFieldBegin("inds", TType.LIST, 2) + oprot.writeFieldBegin('inds', TType.LIST, 2) oprot.writeListBegin(TType.I32, len(self.inds)) for iter27 in self.inds: oprot.writeI32(iter27) oprot.writeListEnd() oprot.writeFieldEnd() if self.src is not None: - oprot.writeFieldBegin("src", TType.STRING, 3) - oprot.writeString(self.src) + oprot.writeFieldBegin('src', TType.STRING, 3) + oprot.writeBinary(self.src) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -5072,46 +5040,37 @@ return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) +all_structs.append(set_value_at_indices_args) +set_value_at_indices_args.thrift_spec = ( + None, # 0 + (1, TType.STRING, 'long_var_name', 'UTF8', None, ), # 1 + (2, TType.LIST, 'inds', (TType.I32, None, False), None, ), # 2 + (3, TType.STRING, 'src', 'BINARY', None, ), # 3 +) class set_value_at_indices_result(object): """ - Attributes: - - error - """ + Attributes: + - error + """ - thrift_spec = ( - None, # 0 - ( - 1, - TType.STRUCT, - "error", - (ModelException, ModelException.thrift_spec), - None, - ), # 1 - ) - def __init__(self, error=None): + def __init__(self, error=None,): self.error = error def read(self, iprot): - if ( - iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - and fastbinary is not None - ): - fastbinary.decode_binary( - self, iprot.trans, (self.__class__, self.thrift_spec) - ) + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: @@ -5130,18 +5089,12 @@ iprot.readStructEnd() def write(self, oprot): - if ( - oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated - and self.thrift_spec is not None - and fastbinary is not None - ): - oprot.trans.write( - fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)) - ) + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("set_value_at_indices_result") + oprot.writeStructBegin('set_value_at_indices_result') if self.error is not None: - oprot.writeFieldBegin("error", TType.STRUCT, 1) + oprot.writeFieldBegin('error', TType.STRUCT, 1) self.error.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() @@ -5151,37 +5104,35 @@ return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) +all_structs.append(set_value_at_indices_result) +set_value_at_indices_result.thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'error', [ModelException, None], None, ), # 1 +) class get_grid_type_args(object): """ - Attributes: - - long_var_name - """ + Attributes: + - long_var_name + """ - thrift_spec = (None, (1, TType.STRING, "long_var_name", None, None)) # 0 # 1 - def __init__(self, long_var_name=None): + def __init__(self, long_var_name=None,): self.long_var_name = long_var_name def read(self, iprot): - if ( - iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - and fastbinary is not None - ): - fastbinary.decode_binary( - self, iprot.trans, (self.__class__, self.thrift_spec) - ) + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: @@ -5190,7 +5141,7 @@ break if fid == 1: if ftype == TType.STRING: - self.long_var_name = iprot.readString() + self.long_var_name = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: @@ -5199,19 +5150,13 @@ iprot.readStructEnd() def write(self, oprot): - if ( - oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated - and self.thrift_spec is not None - and fastbinary is not None - ): - oprot.trans.write( - fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)) - ) + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("get_grid_type_args") + oprot.writeStructBegin('get_grid_type_args') if self.long_var_name is not None: - oprot.writeFieldBegin("long_var_name", TType.STRING, 1) - oprot.writeString(self.long_var_name) + oprot.writeFieldBegin('long_var_name', TType.STRING, 1) + oprot.writeString(self.long_var_name.encode('utf-8') if sys.version_info[0] == 2 else self.long_var_name) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -5220,48 +5165,37 @@ return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) +all_structs.append(get_grid_type_args) +get_grid_type_args.thrift_spec = ( + None, # 0 + (1, TType.STRING, 'long_var_name', 'UTF8', None, ), # 1 +) class get_grid_type_result(object): """ - Attributes: - - success - - error - """ + Attributes: + - success + - error + """ - thrift_spec = ( - (0, TType.I32, "success", None, None), # 0 - ( - 1, - TType.STRUCT, - "error", - (ModelException, ModelException.thrift_spec), - None, - ), # 1 - ) - def __init__(self, success=None, error=None): + def __init__(self, success=None, error=None,): self.success = success self.error = error def read(self, iprot): - if ( - iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - and fastbinary is not None - ): - fastbinary.decode_binary( - self, iprot.trans, (self.__class__, self.thrift_spec) - ) + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: @@ -5285,22 +5219,16 @@ iprot.readStructEnd() def write(self, oprot): - if ( - oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated - and self.thrift_spec is not None - and fastbinary is not None - ): - oprot.trans.write( - fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)) - ) + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("get_grid_type_result") + oprot.writeStructBegin('get_grid_type_result') if self.success is not None: - oprot.writeFieldBegin("success", TType.I32, 0) + oprot.writeFieldBegin('success', TType.I32, 0) oprot.writeI32(self.success) oprot.writeFieldEnd() if self.error is not None: - oprot.writeFieldBegin("error", TType.STRUCT, 1) + oprot.writeFieldBegin('error', TType.STRUCT, 1) self.error.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() @@ -5310,37 +5238,35 @@ return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) +all_structs.append(get_grid_type_result) +get_grid_type_result.thrift_spec = ( + (0, TType.I32, 'success', None, None, ), # 0 + (1, TType.STRUCT, 'error', [ModelException, None], None, ), # 1 +) class get_grid_shape_args(object): """ - Attributes: - - long_var_name - """ + Attributes: + - long_var_name + """ - thrift_spec = (None, (1, TType.STRING, "long_var_name", None, None)) # 0 # 1 - def __init__(self, long_var_name=None): + def __init__(self, long_var_name=None,): self.long_var_name = long_var_name def read(self, iprot): - if ( - iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - and fastbinary is not None - ): - fastbinary.decode_binary( - self, iprot.trans, (self.__class__, self.thrift_spec) - ) + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: @@ -5349,7 +5275,7 @@ break if fid == 1: if ftype == TType.STRING: - self.long_var_name = iprot.readString() + self.long_var_name = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: @@ -5358,19 +5284,13 @@ iprot.readStructEnd() def write(self, oprot): - if ( - oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated - and self.thrift_spec is not None - and fastbinary is not None - ): - oprot.trans.write( - fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)) - ) + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("get_grid_shape_args") + oprot.writeStructBegin('get_grid_shape_args') if self.long_var_name is not None: - oprot.writeFieldBegin("long_var_name", TType.STRING, 1) - oprot.writeString(self.long_var_name) + oprot.writeFieldBegin('long_var_name', TType.STRING, 1) + oprot.writeString(self.long_var_name.encode('utf-8') if sys.version_info[0] == 2 else self.long_var_name) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -5379,37 +5299,35 @@ return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) +all_structs.append(get_grid_shape_args) +get_grid_shape_args.thrift_spec = ( + None, # 0 + (1, TType.STRING, 'long_var_name', 'UTF8', None, ), # 1 +) class get_grid_shape_result(object): """ - Attributes: - - success - """ + Attributes: + - success + """ - thrift_spec = ((0, TType.LIST, "success", (TType.I32, None), None),) # 0 - def __init__(self, success=None): + def __init__(self, success=None,): self.success = success def read(self, iprot): - if ( - iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - and fastbinary is not None - ): - fastbinary.decode_binary( - self, iprot.trans, (self.__class__, self.thrift_spec) - ) + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: @@ -5432,18 +5350,12 @@ iprot.readStructEnd() def write(self, oprot): - if ( - oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated - and self.thrift_spec is not None - and fastbinary is not None - ): - oprot.trans.write( - fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)) - ) + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("get_grid_shape_result") + oprot.writeStructBegin('get_grid_shape_result') if self.success is not None: - oprot.writeFieldBegin("success", TType.LIST, 0) + oprot.writeFieldBegin('success', TType.LIST, 0) oprot.writeListBegin(TType.I32, len(self.success)) for iter34 in self.success: oprot.writeI32(iter34) @@ -5456,37 +5368,34 @@ return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) +all_structs.append(get_grid_shape_result) +get_grid_shape_result.thrift_spec = ( + (0, TType.LIST, 'success', (TType.I32, None, False), None, ), # 0 +) class get_grid_spacing_args(object): """ - Attributes: - - long_var_name - """ + Attributes: + - long_var_name + """ - thrift_spec = (None, (1, TType.STRING, "long_var_name", None, None)) # 0 # 1 - def __init__(self, long_var_name=None): + def __init__(self, long_var_name=None,): self.long_var_name = long_var_name def read(self, iprot): - if ( - iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - and fastbinary is not None - ): - fastbinary.decode_binary( - self, iprot.trans, (self.__class__, self.thrift_spec) - ) + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: @@ -5495,7 +5404,7 @@ break if fid == 1: if ftype == TType.STRING: - self.long_var_name = iprot.readString() + self.long_var_name = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: @@ -5504,19 +5413,13 @@ iprot.readStructEnd() def write(self, oprot): - if ( - oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated - and self.thrift_spec is not None - and fastbinary is not None - ): - oprot.trans.write( - fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)) - ) + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("get_grid_spacing_args") + oprot.writeStructBegin('get_grid_spacing_args') if self.long_var_name is not None: - oprot.writeFieldBegin("long_var_name", TType.STRING, 1) - oprot.writeString(self.long_var_name) + oprot.writeFieldBegin('long_var_name', TType.STRING, 1) + oprot.writeString(self.long_var_name.encode('utf-8') if sys.version_info[0] == 2 else self.long_var_name) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -5525,37 +5428,35 @@ return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) +all_structs.append(get_grid_spacing_args) +get_grid_spacing_args.thrift_spec = ( + None, # 0 + (1, TType.STRING, 'long_var_name', 'UTF8', None, ), # 1 +) class get_grid_spacing_result(object): """ - Attributes: - - success - """ + Attributes: + - success + """ - thrift_spec = ((0, TType.LIST, "success", (TType.DOUBLE, None), None),) # 0 - def __init__(self, success=None): + def __init__(self, success=None,): self.success = success def read(self, iprot): - if ( - iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - and fastbinary is not None - ): - fastbinary.decode_binary( - self, iprot.trans, (self.__class__, self.thrift_spec) - ) + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: @@ -5578,18 +5479,12 @@ iprot.readStructEnd() def write(self, oprot): - if ( - oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated - and self.thrift_spec is not None - and fastbinary is not None - ): - oprot.trans.write( - fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)) - ) + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("get_grid_spacing_result") + oprot.writeStructBegin('get_grid_spacing_result') if self.success is not None: - oprot.writeFieldBegin("success", TType.LIST, 0) + oprot.writeFieldBegin('success', TType.LIST, 0) oprot.writeListBegin(TType.DOUBLE, len(self.success)) for iter41 in self.success: oprot.writeDouble(iter41) @@ -5602,37 +5497,34 @@ return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) +all_structs.append(get_grid_spacing_result) +get_grid_spacing_result.thrift_spec = ( + (0, TType.LIST, 'success', (TType.DOUBLE, None, False), None, ), # 0 +) class get_grid_origin_args(object): """ - Attributes: - - long_var_name - """ + Attributes: + - long_var_name + """ - thrift_spec = (None, (1, TType.STRING, "long_var_name", None, None)) # 0 # 1 - def __init__(self, long_var_name=None): + def __init__(self, long_var_name=None,): self.long_var_name = long_var_name def read(self, iprot): - if ( - iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - and fastbinary is not None - ): - fastbinary.decode_binary( - self, iprot.trans, (self.__class__, self.thrift_spec) - ) + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: @@ -5641,7 +5533,7 @@ break if fid == 1: if ftype == TType.STRING: - self.long_var_name = iprot.readString() + self.long_var_name = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: @@ -5650,19 +5542,13 @@ iprot.readStructEnd() def write(self, oprot): - if ( - oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated - and self.thrift_spec is not None - and fastbinary is not None - ): - oprot.trans.write( - fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)) - ) + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("get_grid_origin_args") + oprot.writeStructBegin('get_grid_origin_args') if self.long_var_name is not None: - oprot.writeFieldBegin("long_var_name", TType.STRING, 1) - oprot.writeString(self.long_var_name) + oprot.writeFieldBegin('long_var_name', TType.STRING, 1) + oprot.writeString(self.long_var_name.encode('utf-8') if sys.version_info[0] == 2 else self.long_var_name) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -5671,37 +5557,35 @@ return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) +all_structs.append(get_grid_origin_args) +get_grid_origin_args.thrift_spec = ( + None, # 0 + (1, TType.STRING, 'long_var_name', 'UTF8', None, ), # 1 +) class get_grid_origin_result(object): """ - Attributes: - - success - """ + Attributes: + - success + """ - thrift_spec = ((0, TType.LIST, "success", (TType.DOUBLE, None), None),) # 0 - def __init__(self, success=None): + def __init__(self, success=None,): self.success = success def read(self, iprot): - if ( - iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - and fastbinary is not None - ): - fastbinary.decode_binary( - self, iprot.trans, (self.__class__, self.thrift_spec) - ) + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: @@ -5724,18 +5608,12 @@ iprot.readStructEnd() def write(self, oprot): - if ( - oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated - and self.thrift_spec is not None - and fastbinary is not None - ): - oprot.trans.write( - fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)) - ) + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("get_grid_origin_result") + oprot.writeStructBegin('get_grid_origin_result') if self.success is not None: - oprot.writeFieldBegin("success", TType.LIST, 0) + oprot.writeFieldBegin('success', TType.LIST, 0) oprot.writeListBegin(TType.DOUBLE, len(self.success)) for iter48 in self.success: oprot.writeDouble(iter48) @@ -5748,37 +5626,34 @@ return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) +all_structs.append(get_grid_origin_result) +get_grid_origin_result.thrift_spec = ( + (0, TType.LIST, 'success', (TType.DOUBLE, None, False), None, ), # 0 +) class get_grid_x_args(object): """ - Attributes: - - long_var_name - """ + Attributes: + - long_var_name + """ - thrift_spec = (None, (1, TType.STRING, "long_var_name", None, None)) # 0 # 1 - def __init__(self, long_var_name=None): + def __init__(self, long_var_name=None,): self.long_var_name = long_var_name def read(self, iprot): - if ( - iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - and fastbinary is not None - ): - fastbinary.decode_binary( - self, iprot.trans, (self.__class__, self.thrift_spec) - ) + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: @@ -5787,7 +5662,7 @@ break if fid == 1: if ftype == TType.STRING: - self.long_var_name = iprot.readString() + self.long_var_name = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: @@ -5796,19 +5671,13 @@ iprot.readStructEnd() def write(self, oprot): - if ( - oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated - and self.thrift_spec is not None - and fastbinary is not None - ): - oprot.trans.write( - fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)) - ) + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("get_grid_x_args") + oprot.writeStructBegin('get_grid_x_args') if self.long_var_name is not None: - oprot.writeFieldBegin("long_var_name", TType.STRING, 1) - oprot.writeString(self.long_var_name) + oprot.writeFieldBegin('long_var_name', TType.STRING, 1) + oprot.writeString(self.long_var_name.encode('utf-8') if sys.version_info[0] == 2 else self.long_var_name) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -5817,37 +5686,35 @@ return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) +all_structs.append(get_grid_x_args) +get_grid_x_args.thrift_spec = ( + None, # 0 + (1, TType.STRING, 'long_var_name', 'UTF8', None, ), # 1 +) class get_grid_x_result(object): """ - Attributes: - - success - """ + Attributes: + - success + """ - thrift_spec = ((0, TType.LIST, "success", (TType.DOUBLE, None), None),) # 0 - def __init__(self, success=None): + def __init__(self, success=None,): self.success = success def read(self, iprot): - if ( - iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - and fastbinary is not None - ): - fastbinary.decode_binary( - self, iprot.trans, (self.__class__, self.thrift_spec) - ) + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: @@ -5870,18 +5737,12 @@ iprot.readStructEnd() def write(self, oprot): - if ( - oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated - and self.thrift_spec is not None - and fastbinary is not None - ): - oprot.trans.write( - fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)) - ) + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("get_grid_x_result") + oprot.writeStructBegin('get_grid_x_result') if self.success is not None: - oprot.writeFieldBegin("success", TType.LIST, 0) + oprot.writeFieldBegin('success', TType.LIST, 0) oprot.writeListBegin(TType.DOUBLE, len(self.success)) for iter55 in self.success: oprot.writeDouble(iter55) @@ -5894,37 +5755,34 @@ return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) +all_structs.append(get_grid_x_result) +get_grid_x_result.thrift_spec = ( + (0, TType.LIST, 'success', (TType.DOUBLE, None, False), None, ), # 0 +) class get_grid_y_args(object): """ - Attributes: - - long_var_name - """ + Attributes: + - long_var_name + """ - thrift_spec = (None, (1, TType.STRING, "long_var_name", None, None)) # 0 # 1 - def __init__(self, long_var_name=None): + def __init__(self, long_var_name=None,): self.long_var_name = long_var_name def read(self, iprot): - if ( - iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - and fastbinary is not None - ): - fastbinary.decode_binary( - self, iprot.trans, (self.__class__, self.thrift_spec) - ) + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: @@ -5933,7 +5791,7 @@ break if fid == 1: if ftype == TType.STRING: - self.long_var_name = iprot.readString() + self.long_var_name = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: @@ -5942,19 +5800,13 @@ iprot.readStructEnd() def write(self, oprot): - if ( - oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated - and self.thrift_spec is not None - and fastbinary is not None - ): - oprot.trans.write( - fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)) - ) + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("get_grid_y_args") + oprot.writeStructBegin('get_grid_y_args') if self.long_var_name is not None: - oprot.writeFieldBegin("long_var_name", TType.STRING, 1) - oprot.writeString(self.long_var_name) + oprot.writeFieldBegin('long_var_name', TType.STRING, 1) + oprot.writeString(self.long_var_name.encode('utf-8') if sys.version_info[0] == 2 else self.long_var_name) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -5963,37 +5815,35 @@ return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) +all_structs.append(get_grid_y_args) +get_grid_y_args.thrift_spec = ( + None, # 0 + (1, TType.STRING, 'long_var_name', 'UTF8', None, ), # 1 +) class get_grid_y_result(object): """ - Attributes: - - success - """ + Attributes: + - success + """ - thrift_spec = ((0, TType.LIST, "success", (TType.DOUBLE, None), None),) # 0 - def __init__(self, success=None): + def __init__(self, success=None,): self.success = success def read(self, iprot): - if ( - iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - and fastbinary is not None - ): - fastbinary.decode_binary( - self, iprot.trans, (self.__class__, self.thrift_spec) - ) + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: @@ -6016,18 +5866,12 @@ iprot.readStructEnd() def write(self, oprot): - if ( - oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated - and self.thrift_spec is not None - and fastbinary is not None - ): - oprot.trans.write( - fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)) - ) + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("get_grid_y_result") + oprot.writeStructBegin('get_grid_y_result') if self.success is not None: - oprot.writeFieldBegin("success", TType.LIST, 0) + oprot.writeFieldBegin('success', TType.LIST, 0) oprot.writeListBegin(TType.DOUBLE, len(self.success)) for iter62 in self.success: oprot.writeDouble(iter62) @@ -6040,37 +5884,34 @@ return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) +all_structs.append(get_grid_y_result) +get_grid_y_result.thrift_spec = ( + (0, TType.LIST, 'success', (TType.DOUBLE, None, False), None, ), # 0 +) class get_grid_z_args(object): """ - Attributes: - - long_var_name - """ + Attributes: + - long_var_name + """ - thrift_spec = (None, (1, TType.STRING, "long_var_name", None, None)) # 0 # 1 - def __init__(self, long_var_name=None): + def __init__(self, long_var_name=None,): self.long_var_name = long_var_name def read(self, iprot): - if ( - iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - and fastbinary is not None - ): - fastbinary.decode_binary( - self, iprot.trans, (self.__class__, self.thrift_spec) - ) + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: @@ -6079,7 +5920,7 @@ break if fid == 1: if ftype == TType.STRING: - self.long_var_name = iprot.readString() + self.long_var_name = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: @@ -6088,19 +5929,13 @@ iprot.readStructEnd() def write(self, oprot): - if ( - oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated - and self.thrift_spec is not None - and fastbinary is not None - ): - oprot.trans.write( - fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)) - ) + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("get_grid_z_args") + oprot.writeStructBegin('get_grid_z_args') if self.long_var_name is not None: - oprot.writeFieldBegin("long_var_name", TType.STRING, 1) - oprot.writeString(self.long_var_name) + oprot.writeFieldBegin('long_var_name', TType.STRING, 1) + oprot.writeString(self.long_var_name.encode('utf-8') if sys.version_info[0] == 2 else self.long_var_name) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -6109,37 +5944,35 @@ return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) +all_structs.append(get_grid_z_args) +get_grid_z_args.thrift_spec = ( + None, # 0 + (1, TType.STRING, 'long_var_name', 'UTF8', None, ), # 1 +) class get_grid_z_result(object): """ - Attributes: - - success - """ + Attributes: + - success + """ - thrift_spec = ((0, TType.LIST, "success", (TType.DOUBLE, None), None),) # 0 - def __init__(self, success=None): + def __init__(self, success=None,): self.success = success def read(self, iprot): - if ( - iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - and fastbinary is not None - ): - fastbinary.decode_binary( - self, iprot.trans, (self.__class__, self.thrift_spec) - ) + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: @@ -6162,18 +5995,12 @@ iprot.readStructEnd() def write(self, oprot): - if ( - oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated - and self.thrift_spec is not None - and fastbinary is not None - ): - oprot.trans.write( - fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)) - ) + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("get_grid_z_result") + oprot.writeStructBegin('get_grid_z_result') if self.success is not None: - oprot.writeFieldBegin("success", TType.LIST, 0) + oprot.writeFieldBegin('success', TType.LIST, 0) oprot.writeListBegin(TType.DOUBLE, len(self.success)) for iter69 in self.success: oprot.writeDouble(iter69) @@ -6186,37 +6013,34 @@ return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) +all_structs.append(get_grid_z_result) +get_grid_z_result.thrift_spec = ( + (0, TType.LIST, 'success', (TType.DOUBLE, None, False), None, ), # 0 +) class get_grid_connectivity_args(object): """ - Attributes: - - long_var_name - """ + Attributes: + - long_var_name + """ - thrift_spec = (None, (1, TType.STRING, "long_var_name", None, None)) # 0 # 1 - def __init__(self, long_var_name=None): + def __init__(self, long_var_name=None,): self.long_var_name = long_var_name def read(self, iprot): - if ( - iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - and fastbinary is not None - ): - fastbinary.decode_binary( - self, iprot.trans, (self.__class__, self.thrift_spec) - ) + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: @@ -6225,7 +6049,7 @@ break if fid == 1: if ftype == TType.STRING: - self.long_var_name = iprot.readString() + self.long_var_name = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: @@ -6234,19 +6058,13 @@ iprot.readStructEnd() def write(self, oprot): - if ( - oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated - and self.thrift_spec is not None - and fastbinary is not None - ): - oprot.trans.write( - fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)) - ) + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("get_grid_connectivity_args") + oprot.writeStructBegin('get_grid_connectivity_args') if self.long_var_name is not None: - oprot.writeFieldBegin("long_var_name", TType.STRING, 1) - oprot.writeString(self.long_var_name) + oprot.writeFieldBegin('long_var_name', TType.STRING, 1) + oprot.writeString(self.long_var_name.encode('utf-8') if sys.version_info[0] == 2 else self.long_var_name) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -6255,37 +6073,35 @@ return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) +all_structs.append(get_grid_connectivity_args) +get_grid_connectivity_args.thrift_spec = ( + None, # 0 + (1, TType.STRING, 'long_var_name', 'UTF8', None, ), # 1 +) class get_grid_connectivity_result(object): """ - Attributes: - - success - """ + Attributes: + - success + """ - thrift_spec = ((0, TType.LIST, "success", (TType.I32, None), None),) # 0 - def __init__(self, success=None): + def __init__(self, success=None,): self.success = success def read(self, iprot): - if ( - iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - and fastbinary is not None - ): - fastbinary.decode_binary( - self, iprot.trans, (self.__class__, self.thrift_spec) - ) + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: @@ -6308,18 +6124,12 @@ iprot.readStructEnd() def write(self, oprot): - if ( - oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated - and self.thrift_spec is not None - and fastbinary is not None - ): - oprot.trans.write( - fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)) - ) + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("get_grid_connectivity_result") + oprot.writeStructBegin('get_grid_connectivity_result') if self.success is not None: - oprot.writeFieldBegin("success", TType.LIST, 0) + oprot.writeFieldBegin('success', TType.LIST, 0) oprot.writeListBegin(TType.I32, len(self.success)) for iter76 in self.success: oprot.writeI32(iter76) @@ -6332,37 +6142,34 @@ return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) +all_structs.append(get_grid_connectivity_result) +get_grid_connectivity_result.thrift_spec = ( + (0, TType.LIST, 'success', (TType.I32, None, False), None, ), # 0 +) class get_grid_offset_args(object): """ - Attributes: - - long_var_name - """ + Attributes: + - long_var_name + """ - thrift_spec = (None, (1, TType.STRING, "long_var_name", None, None)) # 0 # 1 - def __init__(self, long_var_name=None): + def __init__(self, long_var_name=None,): self.long_var_name = long_var_name def read(self, iprot): - if ( - iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - and fastbinary is not None - ): - fastbinary.decode_binary( - self, iprot.trans, (self.__class__, self.thrift_spec) - ) + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: @@ -6371,7 +6178,7 @@ break if fid == 1: if ftype == TType.STRING: - self.long_var_name = iprot.readString() + self.long_var_name = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: @@ -6380,19 +6187,13 @@ iprot.readStructEnd() def write(self, oprot): - if ( - oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated - and self.thrift_spec is not None - and fastbinary is not None - ): - oprot.trans.write( - fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)) - ) + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("get_grid_offset_args") + oprot.writeStructBegin('get_grid_offset_args') if self.long_var_name is not None: - oprot.writeFieldBegin("long_var_name", TType.STRING, 1) - oprot.writeString(self.long_var_name) + oprot.writeFieldBegin('long_var_name', TType.STRING, 1) + oprot.writeString(self.long_var_name.encode('utf-8') if sys.version_info[0] == 2 else self.long_var_name) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -6401,37 +6202,35 @@ return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) +all_structs.append(get_grid_offset_args) +get_grid_offset_args.thrift_spec = ( + None, # 0 + (1, TType.STRING, 'long_var_name', 'UTF8', None, ), # 1 +) class get_grid_offset_result(object): """ - Attributes: - - success - """ + Attributes: + - success + """ - thrift_spec = ((0, TType.LIST, "success", (TType.I32, None), None),) # 0 - def __init__(self, success=None): + def __init__(self, success=None,): self.success = success def read(self, iprot): - if ( - iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - and fastbinary is not None - ): - fastbinary.decode_binary( - self, iprot.trans, (self.__class__, self.thrift_spec) - ) + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: @@ -6454,18 +6253,12 @@ iprot.readStructEnd() def write(self, oprot): - if ( - oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated - and self.thrift_spec is not None - and fastbinary is not None - ): - oprot.trans.write( - fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)) - ) + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("get_grid_offset_result") + oprot.writeStructBegin('get_grid_offset_result') if self.success is not None: - oprot.writeFieldBegin("success", TType.LIST, 0) + oprot.writeFieldBegin('success', TType.LIST, 0) oprot.writeListBegin(TType.I32, len(self.success)) for iter83 in self.success: oprot.writeI32(iter83) @@ -6478,37 +6271,34 @@ return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) +all_structs.append(get_grid_offset_result) +get_grid_offset_result.thrift_spec = ( + (0, TType.LIST, 'success', (TType.I32, None, False), None, ), # 0 +) class initialize_config_args(object): """ - Attributes: - - file - """ + Attributes: + - file + """ - thrift_spec = (None, (1, TType.STRING, "file", None, None)) # 0 # 1 - def __init__(self, file=None): + def __init__(self, file=None,): self.file = file def read(self, iprot): - if ( - iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - and fastbinary is not None - ): - fastbinary.decode_binary( - self, iprot.trans, (self.__class__, self.thrift_spec) - ) + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: @@ -6517,7 +6307,7 @@ break if fid == 1: if ftype == TType.STRING: - self.file = iprot.readString() + self.file = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: @@ -6526,19 +6316,13 @@ iprot.readStructEnd() def write(self, oprot): - if ( - oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated - and self.thrift_spec is not None - and fastbinary is not None - ): - oprot.trans.write( - fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)) - ) + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("initialize_config_args") + oprot.writeStructBegin('initialize_config_args') if self.file is not None: - oprot.writeFieldBegin("file", TType.STRING, 1) - oprot.writeString(self.file) + oprot.writeFieldBegin('file', TType.STRING, 1) + oprot.writeString(self.file.encode('utf-8') if sys.version_info[0] == 2 else self.file) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -6547,46 +6331,35 @@ return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) +all_structs.append(initialize_config_args) +initialize_config_args.thrift_spec = ( + None, # 0 + (1, TType.STRING, 'file', 'UTF8', None, ), # 1 +) class initialize_config_result(object): """ - Attributes: - - error - """ + Attributes: + - error + """ - thrift_spec = ( - None, # 0 - ( - 1, - TType.STRUCT, - "error", - (ModelException, ModelException.thrift_spec), - None, - ), # 1 - ) - def __init__(self, error=None): + def __init__(self, error=None,): self.error = error def read(self, iprot): - if ( - iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - and fastbinary is not None - ): - fastbinary.decode_binary( - self, iprot.trans, (self.__class__, self.thrift_spec) - ) + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: @@ -6605,18 +6378,12 @@ iprot.readStructEnd() def write(self, oprot): - if ( - oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated - and self.thrift_spec is not None - and fastbinary is not None - ): - oprot.trans.write( - fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)) - ) + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("initialize_config_result") + oprot.writeStructBegin('initialize_config_result') if self.error is not None: - oprot.writeFieldBegin("error", TType.STRUCT, 1) + oprot.writeFieldBegin('error', TType.STRUCT, 1) self.error.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() @@ -6626,30 +6393,28 @@ return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) +all_structs.append(initialize_config_result) +initialize_config_result.thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'error', [ModelException, None], None, ), # 1 +) class initialize_model_args(object): - thrift_spec = () def read(self, iprot): - if ( - iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - and fastbinary is not None - ): - fastbinary.decode_binary( - self, iprot.trans, (self.__class__, self.thrift_spec) - ) + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: @@ -6662,63 +6427,44 @@ iprot.readStructEnd() def write(self, oprot): - if ( - oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated - and self.thrift_spec is not None - and fastbinary is not None - ): - oprot.trans.write( - fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)) - ) + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("initialize_model_args") + oprot.writeStructBegin('initialize_model_args') oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) +all_structs.append(initialize_model_args) +initialize_model_args.thrift_spec = ( +) class initialize_model_result(object): """ - Attributes: - - error - """ + Attributes: + - error + """ - thrift_spec = ( - None, # 0 - ( - 1, - TType.STRUCT, - "error", - (ModelException, ModelException.thrift_spec), - None, - ), # 1 - ) - def __init__(self, error=None): + def __init__(self, error=None,): self.error = error def read(self, iprot): - if ( - iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - and fastbinary is not None - ): - fastbinary.decode_binary( - self, iprot.trans, (self.__class__, self.thrift_spec) - ) + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: @@ -6737,18 +6483,12 @@ iprot.readStructEnd() def write(self, oprot): - if ( - oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated - and self.thrift_spec is not None - and fastbinary is not None - ): - oprot.trans.write( - fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)) - ) + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("initialize_model_result") + oprot.writeStructBegin('initialize_model_result') if self.error is not None: - oprot.writeFieldBegin("error", TType.STRUCT, 1) + oprot.writeFieldBegin('error', TType.STRUCT, 1) self.error.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() @@ -6758,37 +6498,35 @@ return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) +all_structs.append(initialize_model_result) +initialize_model_result.thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'error', [ModelException, None], None, ), # 1 +) class set_start_time_args(object): """ - Attributes: - - start_time - """ + Attributes: + - start_time + """ - thrift_spec = (None, (1, TType.DOUBLE, "start_time", None, None)) # 0 # 1 - def __init__(self, start_time=None): + def __init__(self, start_time=None,): self.start_time = start_time def read(self, iprot): - if ( - iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - and fastbinary is not None - ): - fastbinary.decode_binary( - self, iprot.trans, (self.__class__, self.thrift_spec) - ) + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: @@ -6806,18 +6544,12 @@ iprot.readStructEnd() def write(self, oprot): - if ( - oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated - and self.thrift_spec is not None - and fastbinary is not None - ): - oprot.trans.write( - fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)) - ) + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("set_start_time_args") + oprot.writeStructBegin('set_start_time_args') if self.start_time is not None: - oprot.writeFieldBegin("start_time", TType.DOUBLE, 1) + oprot.writeFieldBegin('start_time', TType.DOUBLE, 1) oprot.writeDouble(self.start_time) oprot.writeFieldEnd() oprot.writeFieldStop() @@ -6827,46 +6559,35 @@ return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) +all_structs.append(set_start_time_args) +set_start_time_args.thrift_spec = ( + None, # 0 + (1, TType.DOUBLE, 'start_time', None, None, ), # 1 +) class set_start_time_result(object): """ - Attributes: - - error - """ + Attributes: + - error + """ - thrift_spec = ( - None, # 0 - ( - 1, - TType.STRUCT, - "error", - (ModelException, ModelException.thrift_spec), - None, - ), # 1 - ) - def __init__(self, error=None): + def __init__(self, error=None,): self.error = error def read(self, iprot): - if ( - iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - and fastbinary is not None - ): - fastbinary.decode_binary( - self, iprot.trans, (self.__class__, self.thrift_spec) - ) + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: @@ -6885,18 +6606,12 @@ iprot.readStructEnd() def write(self, oprot): - if ( - oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated - and self.thrift_spec is not None - and fastbinary is not None - ): - oprot.trans.write( - fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)) - ) + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("set_start_time_result") + oprot.writeStructBegin('set_start_time_result') if self.error is not None: - oprot.writeFieldBegin("error", TType.STRUCT, 1) + oprot.writeFieldBegin('error', TType.STRUCT, 1) self.error.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() @@ -6906,37 +6621,35 @@ return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) +all_structs.append(set_start_time_result) +set_start_time_result.thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'error', [ModelException, None], None, ), # 1 +) class set_end_time_args(object): """ - Attributes: - - end_time - """ + Attributes: + - end_time + """ - thrift_spec = (None, (1, TType.DOUBLE, "end_time", None, None)) # 0 # 1 - def __init__(self, end_time=None): + def __init__(self, end_time=None,): self.end_time = end_time def read(self, iprot): - if ( - iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - and fastbinary is not None - ): - fastbinary.decode_binary( - self, iprot.trans, (self.__class__, self.thrift_spec) - ) + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: @@ -6954,18 +6667,12 @@ iprot.readStructEnd() def write(self, oprot): - if ( - oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated - and self.thrift_spec is not None - and fastbinary is not None - ): - oprot.trans.write( - fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)) - ) + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("set_end_time_args") + oprot.writeStructBegin('set_end_time_args') if self.end_time is not None: - oprot.writeFieldBegin("end_time", TType.DOUBLE, 1) + oprot.writeFieldBegin('end_time', TType.DOUBLE, 1) oprot.writeDouble(self.end_time) oprot.writeFieldEnd() oprot.writeFieldStop() @@ -6975,46 +6682,35 @@ return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) +all_structs.append(set_end_time_args) +set_end_time_args.thrift_spec = ( + None, # 0 + (1, TType.DOUBLE, 'end_time', None, None, ), # 1 +) class set_end_time_result(object): """ - Attributes: - - error - """ + Attributes: + - error + """ - thrift_spec = ( - None, # 0 - ( - 1, - TType.STRUCT, - "error", - (ModelException, ModelException.thrift_spec), - None, - ), # 1 - ) - def __init__(self, error=None): + def __init__(self, error=None,): self.error = error def read(self, iprot): - if ( - iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - and fastbinary is not None - ): - fastbinary.decode_binary( - self, iprot.trans, (self.__class__, self.thrift_spec) - ) + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: @@ -7033,18 +6729,12 @@ iprot.readStructEnd() def write(self, oprot): - if ( - oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated - and self.thrift_spec is not None - and fastbinary is not None - ): - oprot.trans.write( - fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)) - ) + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("set_end_time_result") + oprot.writeStructBegin('set_end_time_result') if self.error is not None: - oprot.writeFieldBegin("error", TType.STRUCT, 1) + oprot.writeFieldBegin('error', TType.STRUCT, 1) self.error.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() @@ -7054,30 +6744,28 @@ return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) +all_structs.append(set_end_time_result) +set_end_time_result.thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'error', [ModelException, None], None, ), # 1 +) class get_attribute_names_args(object): - thrift_spec = () def read(self, iprot): - if ( - iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - and fastbinary is not None - ): - fastbinary.decode_binary( - self, iprot.trans, (self.__class__, self.thrift_spec) - ) + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: @@ -7090,54 +6778,44 @@ iprot.readStructEnd() def write(self, oprot): - if ( - oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated - and self.thrift_spec is not None - and fastbinary is not None - ): - oprot.trans.write( - fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)) - ) + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("get_attribute_names_args") + oprot.writeStructBegin('get_attribute_names_args') oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) +all_structs.append(get_attribute_names_args) +get_attribute_names_args.thrift_spec = ( +) class get_attribute_names_result(object): """ - Attributes: - - success - """ + Attributes: + - success + """ - thrift_spec = ((0, TType.LIST, "success", (TType.STRING, None), None),) # 0 - def __init__(self, success=None): + def __init__(self, success=None,): self.success = success def read(self, iprot): - if ( - iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - and fastbinary is not None - ): - fastbinary.decode_binary( - self, iprot.trans, (self.__class__, self.thrift_spec) - ) + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: @@ -7149,7 +6827,7 @@ self.success = [] (_etype87, _size84) = iprot.readListBegin() for _i88 in range(_size84): - _elem89 = iprot.readString() + _elem89 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() self.success.append(_elem89) iprot.readListEnd() else: @@ -7160,21 +6838,15 @@ iprot.readStructEnd() def write(self, oprot): - if ( - oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated - and self.thrift_spec is not None - and fastbinary is not None - ): - oprot.trans.write( - fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)) - ) + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("get_attribute_names_result") + oprot.writeStructBegin('get_attribute_names_result') if self.success is not None: - oprot.writeFieldBegin("success", TType.LIST, 0) + oprot.writeFieldBegin('success', TType.LIST, 0) oprot.writeListBegin(TType.STRING, len(self.success)) for iter90 in self.success: - oprot.writeString(iter90) + oprot.writeString(iter90.encode('utf-8') if sys.version_info[0] == 2 else iter90) oprot.writeListEnd() oprot.writeFieldEnd() oprot.writeFieldStop() @@ -7184,37 +6856,34 @@ return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) +all_structs.append(get_attribute_names_result) +get_attribute_names_result.thrift_spec = ( + (0, TType.LIST, 'success', (TType.STRING, 'UTF8', False), None, ), # 0 +) class get_attribute_value_args(object): """ - Attributes: - - attribute_name - """ + Attributes: + - attribute_name + """ - thrift_spec = (None, (1, TType.STRING, "attribute_name", None, None)) # 0 # 1 - def __init__(self, attribute_name=None): + def __init__(self, attribute_name=None,): self.attribute_name = attribute_name def read(self, iprot): - if ( - iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - and fastbinary is not None - ): - fastbinary.decode_binary( - self, iprot.trans, (self.__class__, self.thrift_spec) - ) + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: @@ -7223,7 +6892,7 @@ break if fid == 1: if ftype == TType.STRING: - self.attribute_name = iprot.readString() + self.attribute_name = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: @@ -7232,19 +6901,13 @@ iprot.readStructEnd() def write(self, oprot): - if ( - oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated - and self.thrift_spec is not None - and fastbinary is not None - ): - oprot.trans.write( - fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)) - ) + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("get_attribute_value_args") + oprot.writeStructBegin('get_attribute_value_args') if self.attribute_name is not None: - oprot.writeFieldBegin("attribute_name", TType.STRING, 1) - oprot.writeString(self.attribute_name) + oprot.writeFieldBegin('attribute_name', TType.STRING, 1) + oprot.writeString(self.attribute_name.encode('utf-8') if sys.version_info[0] == 2 else self.attribute_name) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -7253,48 +6916,37 @@ return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) +all_structs.append(get_attribute_value_args) +get_attribute_value_args.thrift_spec = ( + None, # 0 + (1, TType.STRING, 'attribute_name', 'UTF8', None, ), # 1 +) class get_attribute_value_result(object): """ - Attributes: - - success - - error - """ + Attributes: + - success + - error + """ - thrift_spec = ( - (0, TType.STRING, "success", None, None), # 0 - ( - 1, - TType.STRUCT, - "error", - (ModelException, ModelException.thrift_spec), - None, - ), # 1 - ) - def __init__(self, success=None, error=None): + def __init__(self, success=None, error=None,): self.success = success self.error = error def read(self, iprot): - if ( - iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - and fastbinary is not None - ): - fastbinary.decode_binary( - self, iprot.trans, (self.__class__, self.thrift_spec) - ) + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: @@ -7303,7 +6955,7 @@ break if fid == 0: if ftype == TType.STRING: - self.success = iprot.readString() + self.success = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 1: @@ -7318,22 +6970,16 @@ iprot.readStructEnd() def write(self, oprot): - if ( - oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated - and self.thrift_spec is not None - and fastbinary is not None - ): - oprot.trans.write( - fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)) - ) + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("get_attribute_value_result") + oprot.writeStructBegin('get_attribute_value_result') if self.success is not None: - oprot.writeFieldBegin("success", TType.STRING, 0) - oprot.writeString(self.success) + oprot.writeFieldBegin('success', TType.STRING, 0) + oprot.writeString(self.success.encode('utf-8') if sys.version_info[0] == 2 else self.success) oprot.writeFieldEnd() if self.error is not None: - oprot.writeFieldBegin("error", TType.STRUCT, 1) + oprot.writeFieldBegin('error', TType.STRUCT, 1) self.error.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() @@ -7343,43 +6989,37 @@ return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) +all_structs.append(get_attribute_value_result) +get_attribute_value_result.thrift_spec = ( + (0, TType.STRING, 'success', 'UTF8', None, ), # 0 + (1, TType.STRUCT, 'error', [ModelException, None], None, ), # 1 +) class set_attribute_value_args(object): """ - Attributes: - - attribute_name - - attribute_value - """ + Attributes: + - attribute_name + - attribute_value + """ - thrift_spec = ( - None, # 0 - (1, TType.STRING, "attribute_name", None, None), # 1 - (2, TType.STRING, "attribute_value", None, None), # 2 - ) - def __init__(self, attribute_name=None, attribute_value=None): + def __init__(self, attribute_name=None, attribute_value=None,): self.attribute_name = attribute_name self.attribute_value = attribute_value def read(self, iprot): - if ( - iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - and fastbinary is not None - ): - fastbinary.decode_binary( - self, iprot.trans, (self.__class__, self.thrift_spec) - ) + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: @@ -7388,12 +7028,12 @@ break if fid == 1: if ftype == TType.STRING: - self.attribute_name = iprot.readString() + self.attribute_name = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: - self.attribute_value = iprot.readString() + self.attribute_value = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: @@ -7402,23 +7042,17 @@ iprot.readStructEnd() def write(self, oprot): - if ( - oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated - and self.thrift_spec is not None - and fastbinary is not None - ): - oprot.trans.write( - fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)) - ) + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("set_attribute_value_args") + oprot.writeStructBegin('set_attribute_value_args') if self.attribute_name is not None: - oprot.writeFieldBegin("attribute_name", TType.STRING, 1) - oprot.writeString(self.attribute_name) + oprot.writeFieldBegin('attribute_name', TType.STRING, 1) + oprot.writeString(self.attribute_name.encode('utf-8') if sys.version_info[0] == 2 else self.attribute_name) oprot.writeFieldEnd() if self.attribute_value is not None: - oprot.writeFieldBegin("attribute_value", TType.STRING, 2) - oprot.writeString(self.attribute_value) + oprot.writeFieldBegin('attribute_value', TType.STRING, 2) + oprot.writeString(self.attribute_value.encode('utf-8') if sys.version_info[0] == 2 else self.attribute_value) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -7427,46 +7061,36 @@ return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) +all_structs.append(set_attribute_value_args) +set_attribute_value_args.thrift_spec = ( + None, # 0 + (1, TType.STRING, 'attribute_name', 'UTF8', None, ), # 1 + (2, TType.STRING, 'attribute_value', 'UTF8', None, ), # 2 +) class set_attribute_value_result(object): """ - Attributes: - - error - """ + Attributes: + - error + """ - thrift_spec = ( - None, # 0 - ( - 1, - TType.STRUCT, - "error", - (ModelException, ModelException.thrift_spec), - None, - ), # 1 - ) - def __init__(self, error=None): + def __init__(self, error=None,): self.error = error def read(self, iprot): - if ( - iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - and fastbinary is not None - ): - fastbinary.decode_binary( - self, iprot.trans, (self.__class__, self.thrift_spec) - ) + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: @@ -7485,18 +7109,12 @@ iprot.readStructEnd() def write(self, oprot): - if ( - oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated - and self.thrift_spec is not None - and fastbinary is not None - ): - oprot.trans.write( - fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)) - ) + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("set_attribute_value_result") + oprot.writeStructBegin('set_attribute_value_result') if self.error is not None: - oprot.writeFieldBegin("error", TType.STRUCT, 1) + oprot.writeFieldBegin('error', TType.STRUCT, 1) self.error.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() @@ -7506,40 +7124,35 @@ return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) +all_structs.append(set_attribute_value_result) +set_attribute_value_result.thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'error', [ModelException, None], None, ), # 1 +) class save_state_args(object): """ - Attributes: - - destination_directory - """ + Attributes: + - destination_directory + """ - thrift_spec = ( - None, # 0 - (1, TType.STRING, "destination_directory", None, None), # 1 - ) - def __init__(self, destination_directory=None): + def __init__(self, destination_directory=None,): self.destination_directory = destination_directory def read(self, iprot): - if ( - iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - and fastbinary is not None - ): - fastbinary.decode_binary( - self, iprot.trans, (self.__class__, self.thrift_spec) - ) + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: @@ -7548,7 +7161,7 @@ break if fid == 1: if ftype == TType.STRING: - self.destination_directory = iprot.readString() + self.destination_directory = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: @@ -7557,19 +7170,13 @@ iprot.readStructEnd() def write(self, oprot): - if ( - oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated - and self.thrift_spec is not None - and fastbinary is not None - ): - oprot.trans.write( - fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)) - ) + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("save_state_args") + oprot.writeStructBegin('save_state_args') if self.destination_directory is not None: - oprot.writeFieldBegin("destination_directory", TType.STRING, 1) - oprot.writeString(self.destination_directory) + oprot.writeFieldBegin('destination_directory', TType.STRING, 1) + oprot.writeString(self.destination_directory.encode('utf-8') if sys.version_info[0] == 2 else self.destination_directory) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -7578,46 +7185,35 @@ return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) +all_structs.append(save_state_args) +save_state_args.thrift_spec = ( + None, # 0 + (1, TType.STRING, 'destination_directory', 'UTF8', None, ), # 1 +) class save_state_result(object): """ - Attributes: - - error - """ + Attributes: + - error + """ - thrift_spec = ( - None, # 0 - ( - 1, - TType.STRUCT, - "error", - (ModelException, ModelException.thrift_spec), - None, - ), # 1 - ) - def __init__(self, error=None): + def __init__(self, error=None,): self.error = error def read(self, iprot): - if ( - iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - and fastbinary is not None - ): - fastbinary.decode_binary( - self, iprot.trans, (self.__class__, self.thrift_spec) - ) + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: @@ -7636,18 +7232,12 @@ iprot.readStructEnd() def write(self, oprot): - if ( - oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated - and self.thrift_spec is not None - and fastbinary is not None - ): - oprot.trans.write( - fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)) - ) + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("save_state_result") + oprot.writeStructBegin('save_state_result') if self.error is not None: - oprot.writeFieldBegin("error", TType.STRUCT, 1) + oprot.writeFieldBegin('error', TType.STRUCT, 1) self.error.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() @@ -7657,37 +7247,35 @@ return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) +all_structs.append(save_state_result) +save_state_result.thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'error', [ModelException, None], None, ), # 1 +) class load_state_args(object): """ - Attributes: - - source_directory - """ + Attributes: + - source_directory + """ - thrift_spec = (None, (1, TType.STRING, "source_directory", None, None)) # 0 # 1 - def __init__(self, source_directory=None): + def __init__(self, source_directory=None,): self.source_directory = source_directory def read(self, iprot): - if ( - iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - and fastbinary is not None - ): - fastbinary.decode_binary( - self, iprot.trans, (self.__class__, self.thrift_spec) - ) + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: @@ -7696,7 +7284,7 @@ break if fid == 1: if ftype == TType.STRING: - self.source_directory = iprot.readString() + self.source_directory = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: @@ -7705,19 +7293,13 @@ iprot.readStructEnd() def write(self, oprot): - if ( - oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated - and self.thrift_spec is not None - and fastbinary is not None - ): - oprot.trans.write( - fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)) - ) + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("load_state_args") + oprot.writeStructBegin('load_state_args') if self.source_directory is not None: - oprot.writeFieldBegin("source_directory", TType.STRING, 1) - oprot.writeString(self.source_directory) + oprot.writeFieldBegin('source_directory', TType.STRING, 1) + oprot.writeString(self.source_directory.encode('utf-8') if sys.version_info[0] == 2 else self.source_directory) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -7726,46 +7308,35 @@ return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) +all_structs.append(load_state_args) +load_state_args.thrift_spec = ( + None, # 0 + (1, TType.STRING, 'source_directory', 'UTF8', None, ), # 1 +) class load_state_result(object): """ - Attributes: - - error - """ + Attributes: + - error + """ - thrift_spec = ( - None, # 0 - ( - 1, - TType.STRUCT, - "error", - (ModelException, ModelException.thrift_spec), - None, - ), # 1 - ) - def __init__(self, error=None): + def __init__(self, error=None,): self.error = error def read(self, iprot): - if ( - iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - and fastbinary is not None - ): - fastbinary.decode_binary( - self, iprot.trans, (self.__class__, self.thrift_spec) - ) + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: @@ -7784,18 +7355,12 @@ iprot.readStructEnd() def write(self, oprot): - if ( - oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated - and self.thrift_spec is not None - and fastbinary is not None - ): - oprot.trans.write( - fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)) - ) + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("load_state_result") + oprot.writeStructBegin('load_state_result') if self.error is not None: - oprot.writeFieldBegin("error", TType.STRUCT, 1) + oprot.writeFieldBegin('error', TType.STRUCT, 1) self.error.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() @@ -7805,11 +7370,20 @@ return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) +all_structs.append(load_state_result) +load_state_result.thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'error', [ModelException, None], None, ), # 1 +) +fix_spec(all_structs) +del all_structs + Index: openda_bmi/openda/bmi/thrift/__init__.py =================================================================== diff -u -rfbd077ecd824c16e9e207b542e5ee2f9f9ff92dd -r67ee1270099b7f14962d5cf00571d3c3af3a851c --- openda_bmi/openda/bmi/thrift/__init__.py (.../__init__.py) (revision fbd077ecd824c16e9e207b542e5ee2f9f9ff92dd) +++ openda_bmi/openda/bmi/thrift/__init__.py (.../__init__.py) (revision 67ee1270099b7f14962d5cf00571d3c3af3a851c) @@ -1 +1 @@ -__all__ = ["ttypes", "constants", "BMIService"] +__all__ = ['ttypes', 'constants', 'BMIService'] Index: openda_bmi/openda/bmi/thrift/constants.py =================================================================== diff -u -rfbd077ecd824c16e9e207b542e5ee2f9f9ff92dd -r67ee1270099b7f14962d5cf00571d3c3af3a851c --- openda_bmi/openda/bmi/thrift/constants.py (.../constants.py) (revision fbd077ecd824c16e9e207b542e5ee2f9f9ff92dd) +++ openda_bmi/openda/bmi/thrift/constants.py (.../constants.py) (revision 67ee1270099b7f14962d5cf00571d3c3af3a851c) @@ -1,10 +1,14 @@ # -# Autogenerated by Thrift Compiler (0.9.0) +# Autogenerated by Thrift Compiler (0.11.0) # # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING # # options string: py:new_style # -from thrift.Thrift import TType, TMessageType, TException, TApplicationException +from thrift.Thrift import TType, TMessageType, TFrozenDict, TException, TApplicationException +from thrift.protocol.TProtocol import TProtocolException +from thrift.TRecursive import fix_spec + +import sys from .ttypes import * Index: openda_bmi/openda/bmi/thrift/ttypes.py =================================================================== diff -u -rfbd077ecd824c16e9e207b542e5ee2f9f9ff92dd -r67ee1270099b7f14962d5cf00571d3c3af3a851c --- openda_bmi/openda/bmi/thrift/ttypes.py (.../ttypes.py) (revision fbd077ecd824c16e9e207b542e5ee2f9f9ff92dd) +++ openda_bmi/openda/bmi/thrift/ttypes.py (.../ttypes.py) (revision 67ee1270099b7f14962d5cf00571d3c3af3a851c) @@ -1,22 +1,21 @@ # -# Autogenerated by Thrift Compiler (0.9.0) +# Autogenerated by Thrift Compiler (0.11.0) # # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING # # options string: py:new_style # -from thrift.Thrift import TType, TMessageType, TException, TApplicationException +from thrift.Thrift import TType, TMessageType, TFrozenDict, TException, TApplicationException +from thrift.protocol.TProtocol import TProtocolException +from thrift.TRecursive import fix_spec +import sys + from thrift.transport import TTransport -from thrift.protocol import TBinaryProtocol, TProtocol +all_structs = [] -try: - from thrift.protocol import fastbinary -except: - fastbinary = None - class BmiGridType(object): UNKNOWN = 0 UNIFORM = 1 @@ -43,25 +42,17 @@ class ModelException(TException): """ - Attributes: - - message - """ + Attributes: + - message + """ - thrift_spec = (None, (1, TType.STRING, "message", None, None)) # 0 # 1 - def __init__(self, message=None): + def __init__(self, message=None,): self.message = message def read(self, iprot): - if ( - iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - and fastbinary is not None - ): - fastbinary.decode_binary( - self, iprot.trans, (self.__class__, self.thrift_spec) - ) + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: @@ -70,7 +61,7 @@ break if fid == 1: if ftype == TType.STRING: - self.message = iprot.readString() + self.message = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: @@ -79,39 +70,39 @@ iprot.readStructEnd() def write(self, oprot): - if ( - oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated - and self.thrift_spec is not None - and fastbinary is not None - ): - oprot.trans.write( - fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)) - ) + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("ModelException") + oprot.writeStructBegin('ModelException') if self.message is not None: - oprot.writeFieldBegin("message", TType.STRING, 1) - oprot.writeString(self.message) + oprot.writeFieldBegin('message', TType.STRING, 1) + oprot.writeString(self.message.encode('utf-8') if sys.version_info[0] == 2 else self.message) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): if self.message is None: - raise TProtocol.TProtocolException( - message="Required field message is unset!" - ) + raise TProtocolException(message='Required field message is unset!') return def __str__(self): return repr(self) def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) +all_structs.append(ModelException) +ModelException.thrift_spec = ( + None, # 0 + (1, TType.STRING, 'message', 'UTF8', None, ), # 1 +) +fix_spec(all_structs) +del all_structs