docs: def solve(self,stops,
                method="POST",
                barriers=None,
                polylineBarriers=None,
                polygonBarriers=None,
                travelMode=None,
                attributeParameterValues=None,
                returnDirections=None,
                returnRoutes=True,
                returnStops=False,
                returnBarriers=False,
                returnPolylineBarriers=True,
                returnPolygonBarriers=True,
                outSR=None,
                ignoreInvalidLocations=True,
                outputLines=None,
                findBestSequence=False,
                preserveFirstStop=True,
                preserveLastStop=True,
                useTimeWindows=False,
                startTime=None,
                startTimeIsUTC=False,
                accumulateAttributeNames=None,
                impedanceAttributeName=None,
                restrictionAttributeNames=None,
                restrictUTurns=None,
                useHierarchy=True,
                directionsLanguage=None,
                directionsOutputType=None,
                directionsStyleName=None,
                directionsLengthUnits=None,
                directionsTimeAttributeName=None,
                outputGeometryPrecision=None,
                outputGeometryPrecisionUnits=None,
                returnZ=False
                ):
          """The solve operation is performed on a network layer resource.
          The solve operation is supported on a network layer whose layerType
          is esriNAServerRouteLayer. You can provide arguments to the solve
          route operation as query parameters.
          Inputs:
              stops - The set of stops loaded as network locations during analysis.
                      Stops can be specified using a simple comma / semi-colon
                      based syntax or as a JSON structure. If stops are not
                      specified, preloaded stops from the map document are used in
                      the analysis.
              barriers - The set of barriers loaded as network locations during
                         analysis. Barriers can be specified using a simple comma
                         / semi-colon based syntax or as a JSON structure. If
                         barriers are not specified, preloaded barriers from the
                         map document are used in the analysis. If an empty json
                         object is passed ('{}') preloaded barriers are ignored.
              polylineBarriers - The set of polyline barriers loaded as network
                                 locations during analysis. If polyline barriers
                                 are not specified, preloaded polyline barriers
                                 from the map document are used in the analysis.
                                 If an empty json object is passed ('{}')
                                 preloaded polyline barriers are ignored.
              polygonBarriers - The set of polygon barriers loaded as network
                                locations during analysis. If polygon barriers
                                are not specified, preloaded polygon barriers
                                from the map document are used in the analysis.
                                If an empty json object is passed ('{}') preloaded
                                polygon barriers are ignored.
  
              travelMode - Travel modes provide override values that help you
                           quickly and consistently model a vehicle or mode of
                           transportation. The chosen travel mode must be
                           preconfigured on the network dataset that the routing
                           service references.
              attributeParameterValues - A set of attribute parameter values that
                                         can be parameterized to determine which
                                         network elements can be used by a vehicle.
              returnDirections - If true, directions will be generated and returned
                                 with the analysis results. Default is true.
              returnRoutes - If true, routes will be returned with the analysis
                             results. Default is true.
              returnStops -  If true, stops will be returned with the analysis
                             results. Default is false.
              returnBarriers -  If true, barriers will be returned with the analysis
                                results. Default is false.
              returnPolylineBarriers -  If true, polyline barriers will be returned
                                        with the analysis results. Default is false.
              returnPolygonBarriers - If true, polygon barriers will be returned with
                                      the analysis results. Default is false.
              outSR - The spatial reference of the geometries returned with the
                      analysis results.
              ignoreInvalidLocations - If true, the solver will ignore invalid
                                       locations. Otherwise, it will raise an error.
                                       The default is as defined in the network layer.
              outputLines - The type of output lines to be generated in the result.
                            The default is as defined in the network layer.
              findBestSequence - If true, the solver should re-sequence the route in
                                 the optimal order. The default is as defined in the
                                 network layer.
              preserveFirstStop - If true, the solver should keep the first stop
                                  fixed in the sequence. The default is as defined
                                  in the network layer.
              preserveLastStop - If true, the solver should keep the last stop fixed
                                 in the sequence. The default is as defined in the
                                 network layer.
              useTimeWindows - If true, the solver should consider time windows.
                               The default is as defined in the network layer.
              startTime - The time the route begins. If not specified, the solver
                          will use the default as defined in the network layer.
              startTimeIsUTC - The time zone of the startTime parameter.
              accumulateAttributeNames - The list of network attribute names to be
                                         accumulated with the analysis. The default is
                                         as defined in the network layer. The value
                                         should be specified as a comma separated list
                                         of attribute names. You can also specify a
                                         value of none to indicate that no network
                                         attributes should be accumulated.
              impedanceAttributeName - The network attribute name to be used as the
                                       impedance attribute in analysis. The default is
                                       as defined in the network layer.
              restrictionAttributeNames -The list of network attribute names to be
                                         used as restrictions with the analysis. The
                                         default is as defined in the network layer.
                                         The value should be specified as a comma
                                         separated list of attribute names. You can
                                         also specify a value of none to indicate that
                                         no network attributes should be used as
                                         restrictions.
              restrictUTurns -  Specifies how U-Turns should be restricted in the
                                analysis. The default is as defined in the network
                                layer. Values: esriNFSBAllowBacktrack |
                                esriNFSBAtDeadEndsOnly | esriNFSBNoBacktrack |
                                esriNFSBAtDeadEndsAndIntersections
              useHierarchy -  If true, the hierarchy attribute for the network should
                              be used in analysis. The default is as defined in the
                              network layer.
              directionsLanguage - The language to be used when computing directions.
                                   The default is as defined in the network layer. The
                                   list of supported languages can be found in REST
                                   layer description.
              directionsOutputType -  Defines content, verbosity of returned
                                      directions. The default is esriDOTStandard.
                                      Values: esriDOTComplete | esriDOTCompleteNoEvents
                                      | esriDOTInstructionsOnly | esriDOTStandard |
                                      esriDOTSummaryOnly
              directionsStyleName - The style to be used when returning the directions.
                                    The default is as defined in the network layer. The
                                    list of supported styles can be found in REST
                                    layer description.
              directionsLengthUnits - The length units to use when computing directions.
                                      The default is as defined in the network layer.
                                      Values: esriNAUFeet | esriNAUKilometers |
                                      esriNAUMeters | esriNAUMiles |
                                      esriNAUNauticalMiles | esriNAUYards |
                                      esriNAUUnknown
              directionsTimeAttributeName - The name of network attribute to use for
                                            the drive time when computing directions.
                                            The default is as defined in the network
                                            layer.
              outputGeometryPrecision -  The precision of the output geometry after
                                         generalization. If 0, no generalization of
                                         output geometry is performed. The default is
                                         as defined in the network service
                                         configuration.
              outputGeometryPrecisionUnits - The units of the output geometry
                                             precision. The default value is
                                             esriUnknownUnits. Values: esriUnknownUnits
                                             | esriCentimeters | esriDecimalDegrees |
                                             esriDecimeters | esriFeet | esriInches |
                                             esriKilometers | esriMeters | esriMiles |
                                             esriMillimeters | esriNauticalMiles |
                                             esriPoints | esriYards
              returnZ - If true, Z values will be included in the returned routes and
                         compressed geometry if the network dataset is Z-aware.
                         The default is false.
          """
  
          if not self.layerType == "esriNAServerRouteLayer":
              raise ValueError("The solve operation is supported on a network "
                               "layer of Route type only")
  
          url = self._url + "/solve"
          params = {
                      "f" : "json",
                      "stops": stops
                   }
  
          if not barriers is None:
              params['barriers'] = barriers
          if not polylineBarriers is None:
              params['polylineBarriers'] = polylineBarriers
          if not polygonBarriers is None:
              params['polygonBarriers'] = polygonBarriers
          if not travelMode is None:
              params['travelMode'] = travelMode
          if not attributeParameterValues is None:
              params['attributeParameterValues'] = attributeParameterValues
          if not returnDirections is None:
              params['returnDirections'] = returnDirections
          if not returnRoutes is None:
              params['returnRoutes'] = returnRoutes
          if not returnStops is None:
              params['returnStops'] = returnStops
          if not returnBarriers is None:
              params['returnBarriers'] = returnBarriers
          if not returnPolylineBarriers is None:
              params['returnPolylineBarriers'] = returnPolylineBarriers
          if not returnPolygonBarriers is None:
              params['returnPolygonBarriers'] = returnPolygonBarriers
          if not outSR is None:
              params['outSR'] = outSR
          if not ignoreInvalidLocations is None:
              params['ignoreInvalidLocations'] = ignoreInvalidLocations
          if not outputLines is None:
              params['outputLines'] = outputLines
          if not findBestSequence is None:
              params['findBestSequence'] = findBestSequence
          if not preserveFirstStop is None:
              params['preserveFirstStop'] = preserveFirstStop
          if not preserveLastStop is None:
              params['preserveLastStop'] = preserveLastStop
          if not useTimeWindows is None:
              params['useTimeWindows'] = useTimeWindows
          if not startTime is None:
              params['startTime'] = startTime
          if not startTimeIsUTC is None:
              params['startTimeIsUTC'] = startTimeIsUTC
          if not accumulateAttributeNames is None:
              params['accumulateAttributeNames'] = accumulateAttributeNames
          if not impedanceAttributeName is None:
              params['impedanceAttributeName'] = impedanceAttributeName
          if not restrictionAttributeNames is None:
              params['restrictionAttributeNames'] = restrictionAttributeNames
          if not restrictUTurns is None:
              params['restrictUTurns'] = restrictUTurns
          if not useHierarchy is None:
              params['useHierarchy'] = useHierarchy
          if not directionsLanguage is None:
              params['directionsLanguage'] = directionsLanguage
          if not directionsOutputType is None:
              params['directionsOutputType'] = directionsOutputType
          if not directionsStyleName is None:
              params['directionsStyleName'] = directionsStyleName
          if not directionsLengthUnits is None:
              params['directionsLengthUnits'] = directionsLengthUnits
          if not directionsTimeAttributeName is None:
              params['directionsTimeAttributeName'] = directionsTimeAttributeName
          if not outputGeometryPrecision is None:
              params['outputGeometryPrecision'] = outputGeometryPrecision
          if not outputGeometryPrecisionUnits is None:
              params['outputGeometryPrecisionUnits'] = outputGeometryPrecisionUnits
          if not returnZ is None:
              params['returnZ'] = returnZ
  
          if method.lower() == "post":
              return self._post(url=url,
                                   param_dict=params,
                                   securityHandler=self._securityHandler,
                                   proxy_url=self._proxy_url,
                                   proxy_port=self._proxy_port)
          else:
              return self._get(url=url,
                                  param_dict=params,
                                  securityHandler=self._securityHandler,
                                  proxy_url=self._proxy_url,
                                  proxy_port=self._proxy_port)