Instance depends on the API version:

           * 2018-08-01: :class:`ExpressRouteGatewaysOperations<azure.mgmt.network.v2018_08_01.operations.ExpressRouteGatewaysOperations>`
5924
def express_route_gateways(self):
        
        api_version = self._get_api_version('express_route_gateways')
        if api_version == '2018-08-01':
            from .v2018_08_01.operations import ExpressRouteGatewaysOperations as OperationClass
        else:
            raise NotImplementedError("APIVersion {} is not available".format(api_version))
        return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
360657
def error_class_for(status)
      case status
      when 400 then Esi::ApiBadRequestError
      when 401 then Esi::UnauthorizedError
      when 403 then Esi::ApiForbiddenError
      when 404 then Esi::ApiNotFoundError
      when 502 then Esi::TemporaryServerError
      when 503 then Esi::RateLimitError
      else Esi::ApiUnknownError
      end
    end
912901
def get_instance(self, payload):
        
        return DayInstance(self._version, payload, resource_type=self._solution['resource_type'], )
486416
def get_instance(self, payload):
        
        return MemberInstance(
            self._version,
            payload,
            service_sid=self._solution['service_sid'],
            channel_sid=self._solution['channel_sid'],
        )
223712
def _generate_routes_m(self, namespace):
        """"""
        with self.block_m(
                fmt_routes_class(namespace.name, self.args.auth_type)):
            init_args = fmt_func_args_declaration([(
                'client', 'id<{}>'.format(self.args.transport_client_name))])

            with self.block_func(
                    func='init', args=init_args, return_type='instancetype'):
                self.emit('self = [super init];')
                with self.block_init():
                    self.emit('_client = client;')
            self.emit()
            style_to_request = json.loads(self.args.z__style_to_request)

            for route in namespace.routes:
                if (route.attrs.get('auth') != self.args.auth_type
                        and route.attrs.get('auth') != 'noauth'):
                    continue

                route_type = route.attrs.get('style')
                client_args = json.loads(self.args.client_args)

                if route_type in client_args.keys():
                    for args_data in client_args[route_type]:
                        task_type_key, type_data_dict = tuple(args_data)
                        task_type_name = style_to_request[task_type_key]

                        func_suffix = type_data_dict[0]
                        extra_args = [
                            tuple(type_data[:-1])
                            for type_data in type_data_dict[1]
                        ]

                        if (is_struct_type(route.arg_data_type) and
                                self._struct_has_defaults(route.arg_data_type)):
                            route_args, _ = self._get_default_route_args(
                                namespace, route)
                            self._generate_route_m(route, namespace,
                                                   route_args, extra_args,
                                                   task_type_name, func_suffix)

                        route_args, _ = self._get_route_args(namespace, route)
                        self._generate_route_m(route, namespace, route_args,
                                               extra_args, task_type_name,
                                               func_suffix)
                else:
                    task_type_name = style_to_request[route_type]
                    if (is_struct_type(route.arg_data_type) and
                            self._struct_has_defaults(route.arg_data_type)):
                        route_args, _ = self._get_default_route_args(
                            namespace, route)
                        self._generate_route_m(route, namespace, route_args,
                                               [], task_type_name, '')

                    route_args, _ = self._get_route_args(namespace, route)
                    self._generate_route_m(route, namespace, route_args, [],
                                           task_type_name, '')
957184
private DefaultProxyRoutePlanner createProxyRoutePlanner(HttpSettings settings, HttpAsyncClientBuilder httpClientBuilder) {
        HttpHost proxy = new HttpHost(settings.getProxyUrl().getHost(), settings.getProxyUrl().getPort());
        if (settings.getProxyUser() != null) {
            CredentialsProvider credentialsProvider = new BasicCredentialsProvider();
            String proxyUser = settings.getProxyUser();
            String proxyPassword = settings.getProxyPassword();
            UsernamePasswordCredentials credentials = new UsernamePasswordCredentials(proxyUser, proxyPassword);
            credentialsProvider.setCredentials(new AuthScope(proxy), credentials);
            httpClientBuilder.setDefaultCredentialsProvider(credentialsProvider);
        }
        return new DefaultProxyRoutePlanner(proxy);
    }
1040578
def cli(env, identifier, allocation, port, routing_type, routing_method):
    """"""
    mgr = SoftLayer.LoadBalancerManager(env.client)

    loadbal_id, group_id = loadbal.parse_id(identifier)

    # check if any input is provided
    if not any([allocation, port, routing_type, routing_method]):
        raise exceptions.CLIAbort(
            'At least one property is required to be changed!')

    mgr.edit_service_group(loadbal_id,
                           group_id,
                           allocation=allocation,
                           port=port,
                           routing_type=routing_type,
                           routing_method=routing_method)

    env.fout('Load balancer service group %s is being updated!' % identifier)
1217433
def get_instance(self, payload):
        
        return QueryInstance(self._version, payload, assistant_sid=self._solution['assistant_sid'], )
1328973
def express_route_ports(self):
        
        api_version = self._get_api_version('express_route_ports')
        if api_version == '2018-08-01':
            from .v2018_08_01.operations import ExpressRoutePortsOperations as OperationClass
        else:
            raise NotImplementedError("APIVersion {} is not available".format(api_version))
        return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
441025
function Router() {
    var resources = {};

    // Public methods
    this.addRoute = function(resource) {
        var mPoint = resource.getMountPoint();

        if (typeof(resources[mPoint]) === 'undefined') {
            resources[mPoint] = resource;
        } else {
            resources[mPoint].update(resource);
        }
    };

    this.dispatch = function(locals) {
        var accept = locals.getAcceptedTypes();
        var request = locals.getRequest();
        var dispatched = false;
        var header;
        var mountPoint;
        var resource;

        locals.updateResponse(404);
        // Iterate over the resources
        for (mountPoint in resources) {
            // Did anybody flush already?
            resource = resources[mountPoint];
            // Does your URL definition matches this path?
            if (resource.matchesURL(request.path)) {
                locals.updateResponse(405);
                // Do you handle this method?
                if (resource.allowsMethod(request.method)) {
                    locals.updateResponse(406);
                    // Do you understand this format?
                    if (resource.acceptsType(accept, request.method)) {
                        locals.updateResponse(200);
                        // It's all yours
                        resource.takeOver(locals);
                        // And we set a flag announcing it was dispatched
                        dispatched = true;
                    }
                } else {
                    header = resource.getMethods().join(', ');
                    locals.getResponse().setHeader('Allow', header);
                }
            }
        }

        // Each resource emits a 'Resource:postRequest' event that flushes
        // the response. If no resource was found, that event was not emitted
        // and we need to do it manually.
        if (!dispatched) {
            locals.emit('Resource:completed');
            locals.emit('Resource:preRequest');
            locals.emit('Resource:postRequest');
        }
    };
}
1192745
function(routeName, models, queryParams) {
        var router = this.router;
        return router.isActive.apply(router, arguments);
      }
401583
private RouteImpl createRouteImpl(String path, String acceptType, Route route) {
        if (defaultResponseTransformer != null) {
            return ResponseTransformerRouteImpl.create(path, acceptType, route, defaultResponseTransformer);
        }
        return RouteImpl.create(path, acceptType, route);
    }
662375
def _get_real_instance_if_mismatch(vpc_info, ipaddr, instance, eni):
    
    # Careful! A route may be a black-hole route, which still has instance and
    # ENI information for an instance that doesn't exist anymore. If a host was
    # terminated and a new host got the same IP then this route won't be
    # updated and will keep pointing to a non-existing node. So we find the
    # instance by IP and check that the route really points to this instance.
    inst_id = instance.id if instance else ""
    eni_id  = eni.id if eni else ""
    if ipaddr:
        real_instance, real_eni = \
                        find_instance_and_eni_by_ip(vpc_info, ipaddr)
        if real_instance.id != inst_id  or real_eni.id != eni_id:
            return real_instance
    return None
1189576
private function getOperationRoute(string $resourceClass, string $operationName, string $operationType): Route
    {
        $routeName = $this->getRouteName($this->resourceMetadataFactory->create($resourceClass), $operationName, $operationType);
        if (null !== $routeName) {
            return $this->getRoute($routeName);
        }

        $operationNameKey = sprintf('_api_%s_operation_name', $operationType);

        foreach ($this->router->getRouteCollection()->all() as $routeName => $route) {
            $currentResourceClass = $route->getDefault('_api_resource_class');
            $currentOperationName = $route->getDefault($operationNameKey);

            if ($resourceClass === $currentResourceClass && $operationName === $currentOperationName) {
                return $route;
            }
        }

        throw new RuntimeException(sprintf('No route found for operation "%s" for type "%s".', $operationName, $resourceClass));
    }
603086
def network_profiles(self):
        
        api_version = self._get_api_version('network_profiles')
        if api_version == '2018-08-01':
            from .v2018_08_01.operations import NetworkProfilesOperations as OperationClass
        else:
            raise NotImplementedError("APIVersion {} is not available".format(api_version))
        return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
169682
function getRouteType (route) {
  var match = route.match(/\:(post|page|tag|category)\b/);
  if (match && match.length > 1)
    return match[1];
  return null;
}
125339
function initRouter(mediatorService, storageConfiguration) {
  var router = express.Router();
  var storageEngine = StorageEngine(storageConfiguration);
  router.route('/all').get(function(req, res, next) {
    mediatorService.listFilesMetadata().then(function(fileList) {
      res.json(fileList);
    }).catch(function(err) {
      console.log("Cannot retrieve metadata", err);
      next(err);
    });
  });
  
  router.route('/owner/:owner').get(function(req, res, next) {
    var owner = req.params.owner;
    mediatorService.listFilesMetadata(owner).then(function(fileList) {
      res.json(fileList);
    }).catch(function(err) {
      console.log("Cannot retrieve metadata", err);
      next(err);
    });
  });
  
  router.route('/owner/:owner/upload/base64/:filename').post(function(req, res, next) {
    var uid = uuid.create().toString();
    var fileMeta = {
      owner: req.params.owner,
      name: req.params.filename,
      namespace: req.params.namespace,
      uid: uid,
      id: uid
    };
    var stream = fileService.parseBase64Stream(req);
    fileService.writeStreamToFile(fileMeta, stream).then(function() {
      var location = fileService.filePath(fileMeta.uid);
      return storageEngine.writeFile(fileMeta.namespace, fileMeta.uid, location);
    }).then(function() {
      return mediatorService.createFileMetadata(fileMeta);
    }).then(function() {
      res.json(fileMeta);
    }).catch(function(err) {
      console.log(err);
      next(err);
    });
  });
  
  var binaryUploadInitMiddleware = function(req, res, next) {
    req.fileMeta = {};
    req.fileMeta.id = uuid.create().toString();
    req.fileMeta.uid = req.fileMeta.id;
    next();
  };
  
  router.route('/upload/binary').post(binaryUploadInitMiddleware, fileService.mutlerMiddleware(),
    function(req, res, next) {
      var fileMeta = req.fileMeta;
      req.fileMeta.name = req.body.fileName;
      req.fileMeta.namespace = req.body.namespace;
      req.fileMeta.owner = req.body.ownerId;
      req.fileMeta.mimetype = req.file.mimetype;
      var location = fileService.filePath(fileMeta.uid);
      storageEngine.writeFile(fileMeta.namespace, fileMeta.uid, location).then(function() {
        return mediatorService.createFileMetadata(fileMeta);
      }).then(function() {
        res.json(fileMeta);
      }).catch(function(err) {
        console.log(err);
        next(err);
      });
    });
  
  router.route('/get/:filename').get(function(req, res) {
    var fileName = req.params.filename;
    var namespace = req.params.namespace;
    storageEngine.streamFile(namespace, fileName).then(function(buffer) {
      if (buffer) {
        buffer.pipe(res);
      } else {
        res.sendFile(fileService.filePath(fileName));
      }
    });
  });
  return router;
}