content
stringlengths
5
1.05M
Hephaistos.Recenter(ScreenData.QuestLog, 'ItemStartX', 'ItemStartY')
local enemy_meta = sol.main.get_metatable("enemy") function enemy_meta:has_valid_patrol_route() local enemy = self local patrol_route_name = enemy:get_property("patrol_route_name") local valid_route = true if not patrol_route_name then valid_route = false print("enemy location: ", enemy:get_position()) error("Invalid patrol_route_name property for " .. enemy:get_name()) end if not enemy:get_map():has_entities(patrol_route_name) then valid_route = false print("enemy location: ", enemy:get_position()) error("Missing patrol route entities: " .. patrol_route_name) end return valid_route end local function get_closest_partrol_route_node(enemy, patrol_route_name) local closest_entity = nil local distance_to_entity = nil for entity in enemy:get_map():get_entities(patrol_route_name) do --if this is the first entity checked if not distance_to_entity then closest_entity = entity distance_to_entity = enemy:get_distance(entity) else if enemy:get_distance(entity) < distance_to_entity then closest_entity = entity distance_to_entity = enemy:get_distance(entity) end end end return closest_entity end function enemy_meta:move_to_node(node, patrol_route_name) local enemy = self local m = sol.movement.create"target" m:set_speed(20) m:set_target(node) m:start(enemy) sol.timer.start(enemy, 100, function() if enemy:get_distance(node) <= 16 then --Move randomly a little bit to avoid multiple enemies on the same route clustering local previous_angle = m:get_angle() m = sol.movement.create"straight" m:set_angle(previous_angle + math.random(1,2) * math.pi + math.pi/2 + math.random()) m:set_max_distance(math.random(0,16)) m:start(enemy, function() --Go to next node enemy:stop_movement() enemy:find_next_patrol_route_node(node, patrol_route_name) end) function m:on_obstacle_reached() enemy:stop_movement() enemy:find_next_patrol_route_node(node, patrol_route_name) end else if not enemy.agro then return true end end end) end function enemy_meta:find_next_patrol_route_node(current_node, patrol_route_name) local enemy = self local current_node_name = current_node:get_name() local current_node_number = current_node_name:match("_(%d+)") local map = current_node:get_map() local next_node = nil --Find next entity --Note: enemy.patrol_route_increment always starts as 1 local next_node if map:has_entity(patrol_route_name .. "_" .. current_node_number + enemy.patrol_route_increment) then next_node = map:get_entity(patrol_route_name .. "_" .. current_node_number + enemy.patrol_route_increment) enemy:move_to_node(next_node, patrol_route_name) else enemy.patrol_route_increment = enemy.patrol_route_increment * -1 enemy:find_next_patrol_route_node(current_node, patrol_route_name) end end function enemy_meta:start_patrol_route() local enemy = self enemy.patrol_route_increment = 1 local patrol_route_name = enemy:get_property("patrol_route_name") local closest_entity = get_closest_partrol_route_node(enemy, patrol_route_name) local m = sol.movement.create"target" m:set_speed(20) m:set_target(closest_entity) m:start(enemy) sol.timer.start(enemy, 100, function() if enemy:get_distance(closest_entity) <= 16 then --Go to next node enemy:stop_movement() enemy:find_next_patrol_route_node(closest_entity, patrol_route_name) else return true end end) end
local lsp_installer = require("nvim-lsp-installer") -- local lspkind = require("lspkind") -- Mappings. -- See `:help vim.diagnostic.*` for documentation on any of the below functions local opts = { noremap = true, silent = true } -- Use an on_attach function to only map the following keys -- after the language server attaches to the current buffer local on_attach = function(client, bufnr) -- Enable completion triggered by <c-x><c-o> vim.api.nvim_buf_set_option(bufnr, "omnifunc", "v:lua.vim.lsp.omnifunc") -- Mappings. -- See `:help vim.lsp.*` for documentation on any of the below functions vim.api.nvim_buf_set_keymap(bufnr, "n", "gD", "<cmd>lua vim.lsp.buf.declaration()<CR>", opts) vim.api.nvim_buf_set_keymap(bufnr, "n", "gd", "<cmd>lua vim.lsp.buf.definition()<CR>", opts) vim.api.nvim_buf_set_keymap(bufnr, "n", "K", "<cmd>lua vim.lsp.buf.hover()<CR>", opts) vim.api.nvim_buf_set_keymap(bufnr, "n", "gi", "<cmd>lua vim.lsp.buf.implementation()<CR>", opts) -- vim.api.nvim_buf_set_keymap(bufnr, "n", "<C-k>", "<cmd>lua vim.lsp.buf.signature_help()<CR>", opts) vim.api.nvim_buf_set_keymap(bufnr, "n", "<leader>wa", "<cmd>lua vim.lsp.buf.add_workspace_folder()<CR>", opts) vim.api.nvim_buf_set_keymap(bufnr, "n", "<leader>wr", "<cmd>lua vim.lsp.buf.remove_workspace_folder()<CR>", opts) vim.api.nvim_buf_set_keymap( bufnr, "n", "<leader>wl", "<cmd>lua print(vim.inspect(vim.lsp.buf.list_workspace_folders()))<CR>", opts ) vim.api.nvim_buf_set_keymap(bufnr, "n", "<leader>D", "<cmd>lua vim.lsp.buf.type_definition()<CR>", opts) vim.api.nvim_buf_set_keymap(bufnr, "n", "<leader>rn", "<cmd>lua vim.lsp.buf.rename()<CR>", opts) vim.api.nvim_buf_set_keymap(bufnr, "n", "<leader>ca", "<cmd>lua vim.lsp.buf.code_action()<CR>", opts) vim.api.nvim_buf_set_keymap(bufnr, "n", "gr", "<cmd>lua vim.lsp.buf.references()<CR>", opts) vim.api.nvim_buf_set_keymap(bufnr, "n", "<leader>=", "<cmd>lua vim.lsp.buf.formatting()<CR>", opts) end -- Remove this in nvim 0.7 local flags = { debounce_text_changes = 150, } -- Pass configurations settings to the different LSP's local settings = { intelephense = { -- Add wordpress to the list of stubs stubs = { "apache", "bcmath", "bz2", "calendar", "com_dotnet", "Core", "ctype", "curl", "date", "dba", "dom", "enchant", "exif", "FFI", "fileinfo", "filter", "fpm", "ftp", "gd", "gettext", "gmp", "hash", "iconv", "imap", "intl", "json", "ldap", "libxml", "mbstring", "meta", "mysqli", "oci8", "odbc", "openssl", "pcntl", "pcre", "PDO", "pdo_ibm", "pdo_mysql", "pdo_pgsql", "pdo_sqlite", "pgsql", "Phar", "posix", "pspell", "readline", "Reflection", "session", "shmop", "SimpleXML", "snmp", "soap", "sockets", "sodium", "SPL", "sqlite3", "standard", "superglobals", "sysvmsg", "sysvsem", "sysvshm", "tidy", "tokenizer", "xml", "xmlreader", "xmlrpc", "xmlwriter", "xsl", "Zend OPcache", "zip", "zlib", "wordpress", "phpunit" }, diagnostics = { enable = true, }, }, Lua = { diagnostics = { globals = { "vim" }, -- Gets rid of "Global variable not found" error message }, }, json = { schemas = { { description = "NPM configuration file", fileMatch = { "package.json", }, url = "https://json.schemastore.org/package.json", }, }, }, } -- Add borders to the popup you get when you "hover" (<S-k>) local handlers = { ["textDocument/hover"] = vim.lsp.with(vim.lsp.handlers.hover, { border = "rounded" }), ["textDocument/signatureHelp"] = vim.lsp.with(vim.lsp.handlers.signature_help, { border = "rounded" }), } -- Add capabilities local capabilities = vim.lsp.protocol.make_client_capabilities() -- Equivalent (but not equal) to lspconfig.<langserver>.setup{} lsp_installer.on_server_ready(function(server) server:setup({ on_attach = on_attach, flags = flags, settings = settings, handlers = handlers, capabilities = capabilities, }) end) -- De clutter the editor by only showing diagnostic messages when the cursor is over the error vim.diagnostic.config({ virtual_text = true, -- Do not show the text in front of the error float = { border = "rounded", }, })
local nativeTitle = PREFSMAN:GetPreference("ShowNativeLanguage") and 1 or 0 return Def.ActorFrame{ -- A temporary frame for the jacket. Def.Quad { InitCommand=function(self) self:horizalign(right):vertalign(bottom):xy(_screen.w-39,_screen.h-46):zoomto(192,192):diffuse(color("#00000075")) end; OnCommand=function(self) self:diffusealpha(0):sleep(2):smooth(2):diffusealpha(1) end }, Def.Sprite { InitCommand=function(self) self:horizalign(right):vertalign(bottom):xy(_screen.w-49,_screen.h-46-10) end; OnCommand=function(self) local song = GAMESTATE:GetCurrentSong() if song and song:HasJacket() then self:LoadBanner(song:GetJacketPath()) elseif song and song:HasBackground() then self:LoadBanner(song:GetBackgroundPath()) else self:LoadBanner(THEME:GetPathG("Common","fallback jacket")) end self:scaletoclipped(172,172) self:diffusealpha(0):sleep(2):smooth(2):diffusealpha(1) end }, -- Song title. Def.BitmapText { Font = "_Bold", InitCommand=function(self) self:horizalign(right):xy(_screen.w-250,_screen.h-64-150):strokecolor(color("#42292E")):shadowlength(1):maxwidth(SCREEN_WIDTH*0.75) end; Text=nativeTitle == 1 and GAMESTATE:GetCurrentSong():GetDisplayMainTitle() or GAMESTATE:GetCurrentSong():GetTranslitMainTitle(); OnCommand=function(self) self:diffusealpha(0):sleep(2):smooth(2):diffusealpha(1) end }, -- Song artist. Def.BitmapText { Font = "_Bold", InitCommand=function(self) self:horizalign(right):xy(_screen.w-250,_screen.h-40-150):zoom(0.75):strokecolor(color("#42292E")):shadowlength(1):maxwidth(SCREEN_WIDTH*0.75) end; Text=nativeTitle == 1 and GAMESTATE:GetCurrentSong():GetDisplayArtist() or GAMESTATE:GetCurrentSong():GetTranslitArtist(); OnCommand=function(self) self:diffusealpha(0):sleep(2):smooth(2):diffusealpha(1) end }, LoadActor( THEME:GetPathB("_Arcade","decorations") ); }
--- GENERATED CODE - DO NOT MODIFY -- Elastic Load Balancing (elasticloadbalancingv2-2015-12-01) local M = {} M.metadata = { api_version = "2015-12-01", json_version = "", protocol = "query", checksum_format = "", endpoint_prefix = "elasticloadbalancing", service_abbreviation = "Elastic Load Balancing v2", service_full_name = "Elastic Load Balancing", signature_version = "v4", target_prefix = "", timestamp_format = "", global_endpoint = "", uid = "elasticloadbalancingv2-2015-12-01", } local keys = {} local asserts = {} keys.DescribeTargetGroupAttributesInput = { ["TargetGroupArn"] = true, nil } function asserts.AssertDescribeTargetGroupAttributesInput(struct) assert(struct) assert(type(struct) == "table", "Expected DescribeTargetGroupAttributesInput to be of type 'table'") assert(struct["TargetGroupArn"], "Expected key TargetGroupArn to exist in table") if struct["TargetGroupArn"] then asserts.AssertTargetGroupArn(struct["TargetGroupArn"]) end for k,_ in pairs(struct) do assert(keys.DescribeTargetGroupAttributesInput[k], "DescribeTargetGroupAttributesInput contains unknown key " .. tostring(k)) end end --- Create a structure of type DescribeTargetGroupAttributesInput -- -- @param args Table with arguments in key-value form. -- Valid keys: -- * TargetGroupArn [TargetGroupArn] <p>The Amazon Resource Name (ARN) of the target group.</p> -- Required key: TargetGroupArn -- @return DescribeTargetGroupAttributesInput structure as a key-value pair table function M.DescribeTargetGroupAttributesInput(args) assert(args, "You must provide an argument table when creating DescribeTargetGroupAttributesInput") local query_args = { } local uri_args = { } local header_args = { } local all_args = { ["TargetGroupArn"] = args["TargetGroupArn"], } asserts.AssertDescribeTargetGroupAttributesInput(all_args) return { all = all_args, query = query_args, uri = uri_args, headers = header_args, } end keys.TooManyCertificatesException = { nil } function asserts.AssertTooManyCertificatesException(struct) assert(struct) assert(type(struct) == "table", "Expected TooManyCertificatesException to be of type 'table'") for k,_ in pairs(struct) do assert(keys.TooManyCertificatesException[k], "TooManyCertificatesException contains unknown key " .. tostring(k)) end end --- Create a structure of type TooManyCertificatesException -- <p>You've reached the limit on the number of certificates per load balancer.</p> -- @param args Table with arguments in key-value form. -- Valid keys: -- @return TooManyCertificatesException structure as a key-value pair table function M.TooManyCertificatesException(args) assert(args, "You must provide an argument table when creating TooManyCertificatesException") local query_args = { } local uri_args = { } local header_args = { } local all_args = { } asserts.AssertTooManyCertificatesException(all_args) return { all = all_args, query = query_args, uri = uri_args, headers = header_args, } end keys.DuplicateTargetGroupNameException = { nil } function asserts.AssertDuplicateTargetGroupNameException(struct) assert(struct) assert(type(struct) == "table", "Expected DuplicateTargetGroupNameException to be of type 'table'") for k,_ in pairs(struct) do assert(keys.DuplicateTargetGroupNameException[k], "DuplicateTargetGroupNameException contains unknown key " .. tostring(k)) end end --- Create a structure of type DuplicateTargetGroupNameException -- <p>A target group with the specified name already exists.</p> -- @param args Table with arguments in key-value form. -- Valid keys: -- @return DuplicateTargetGroupNameException structure as a key-value pair table function M.DuplicateTargetGroupNameException(args) assert(args, "You must provide an argument table when creating DuplicateTargetGroupNameException") local query_args = { } local uri_args = { } local header_args = { } local all_args = { } asserts.AssertDuplicateTargetGroupNameException(all_args) return { all = all_args, query = query_args, uri = uri_args, headers = header_args, } end keys.InvalidLoadBalancerActionException = { nil } function asserts.AssertInvalidLoadBalancerActionException(struct) assert(struct) assert(type(struct) == "table", "Expected InvalidLoadBalancerActionException to be of type 'table'") for k,_ in pairs(struct) do assert(keys.InvalidLoadBalancerActionException[k], "InvalidLoadBalancerActionException contains unknown key " .. tostring(k)) end end --- Create a structure of type InvalidLoadBalancerActionException -- <p>The requested action is not valid.</p> -- @param args Table with arguments in key-value form. -- Valid keys: -- @return InvalidLoadBalancerActionException structure as a key-value pair table function M.InvalidLoadBalancerActionException(args) assert(args, "You must provide an argument table when creating InvalidLoadBalancerActionException") local query_args = { } local uri_args = { } local header_args = { } local all_args = { } asserts.AssertInvalidLoadBalancerActionException(all_args) return { all = all_args, query = query_args, uri = uri_args, headers = header_args, } end keys.DuplicateTagKeysException = { nil } function asserts.AssertDuplicateTagKeysException(struct) assert(struct) assert(type(struct) == "table", "Expected DuplicateTagKeysException to be of type 'table'") for k,_ in pairs(struct) do assert(keys.DuplicateTagKeysException[k], "DuplicateTagKeysException contains unknown key " .. tostring(k)) end end --- Create a structure of type DuplicateTagKeysException -- <p>A tag key was specified more than once.</p> -- @param args Table with arguments in key-value form. -- Valid keys: -- @return DuplicateTagKeysException structure as a key-value pair table function M.DuplicateTagKeysException(args) assert(args, "You must provide an argument table when creating DuplicateTagKeysException") local query_args = { } local uri_args = { } local header_args = { } local all_args = { } asserts.AssertDuplicateTagKeysException(all_args) return { all = all_args, query = query_args, uri = uri_args, headers = header_args, } end keys.ListenerNotFoundException = { nil } function asserts.AssertListenerNotFoundException(struct) assert(struct) assert(type(struct) == "table", "Expected ListenerNotFoundException to be of type 'table'") for k,_ in pairs(struct) do assert(keys.ListenerNotFoundException[k], "ListenerNotFoundException contains unknown key " .. tostring(k)) end end --- Create a structure of type ListenerNotFoundException -- <p>The specified listener does not exist.</p> -- @param args Table with arguments in key-value form. -- Valid keys: -- @return ListenerNotFoundException structure as a key-value pair table function M.ListenerNotFoundException(args) assert(args, "You must provide an argument table when creating ListenerNotFoundException") local query_args = { } local uri_args = { } local header_args = { } local all_args = { } asserts.AssertListenerNotFoundException(all_args) return { all = all_args, query = query_args, uri = uri_args, headers = header_args, } end keys.DescribeLoadBalancersInput = { ["Marker"] = true, ["LoadBalancerArns"] = true, ["Names"] = true, ["PageSize"] = true, nil } function asserts.AssertDescribeLoadBalancersInput(struct) assert(struct) assert(type(struct) == "table", "Expected DescribeLoadBalancersInput to be of type 'table'") if struct["Marker"] then asserts.AssertMarker(struct["Marker"]) end if struct["LoadBalancerArns"] then asserts.AssertLoadBalancerArns(struct["LoadBalancerArns"]) end if struct["Names"] then asserts.AssertLoadBalancerNames(struct["Names"]) end if struct["PageSize"] then asserts.AssertPageSize(struct["PageSize"]) end for k,_ in pairs(struct) do assert(keys.DescribeLoadBalancersInput[k], "DescribeLoadBalancersInput contains unknown key " .. tostring(k)) end end --- Create a structure of type DescribeLoadBalancersInput -- -- @param args Table with arguments in key-value form. -- Valid keys: -- * Marker [Marker] <p>The marker for the next set of results. (You received this marker from a previous call.)</p> -- * LoadBalancerArns [LoadBalancerArns] <p>The Amazon Resource Names (ARN) of the load balancers. You can specify up to 20 load balancers in a single call.</p> -- * Names [LoadBalancerNames] <p>The names of the load balancers.</p> -- * PageSize [PageSize] <p>The maximum number of results to return with this call.</p> -- @return DescribeLoadBalancersInput structure as a key-value pair table function M.DescribeLoadBalancersInput(args) assert(args, "You must provide an argument table when creating DescribeLoadBalancersInput") local query_args = { } local uri_args = { } local header_args = { } local all_args = { ["Marker"] = args["Marker"], ["LoadBalancerArns"] = args["LoadBalancerArns"], ["Names"] = args["Names"], ["PageSize"] = args["PageSize"], } asserts.AssertDescribeLoadBalancersInput(all_args) return { all = all_args, query = query_args, uri = uri_args, headers = header_args, } end keys.DescribeLoadBalancerAttributesOutput = { ["Attributes"] = true, nil } function asserts.AssertDescribeLoadBalancerAttributesOutput(struct) assert(struct) assert(type(struct) == "table", "Expected DescribeLoadBalancerAttributesOutput to be of type 'table'") if struct["Attributes"] then asserts.AssertLoadBalancerAttributes(struct["Attributes"]) end for k,_ in pairs(struct) do assert(keys.DescribeLoadBalancerAttributesOutput[k], "DescribeLoadBalancerAttributesOutput contains unknown key " .. tostring(k)) end end --- Create a structure of type DescribeLoadBalancerAttributesOutput -- -- @param args Table with arguments in key-value form. -- Valid keys: -- * Attributes [LoadBalancerAttributes] <p>Information about the load balancer attributes.</p> -- @return DescribeLoadBalancerAttributesOutput structure as a key-value pair table function M.DescribeLoadBalancerAttributesOutput(args) assert(args, "You must provide an argument table when creating DescribeLoadBalancerAttributesOutput") local query_args = { } local uri_args = { } local header_args = { } local all_args = { ["Attributes"] = args["Attributes"], } asserts.AssertDescribeLoadBalancerAttributesOutput(all_args) return { all = all_args, query = query_args, uri = uri_args, headers = header_args, } end keys.SubnetNotFoundException = { nil } function asserts.AssertSubnetNotFoundException(struct) assert(struct) assert(type(struct) == "table", "Expected SubnetNotFoundException to be of type 'table'") for k,_ in pairs(struct) do assert(keys.SubnetNotFoundException[k], "SubnetNotFoundException contains unknown key " .. tostring(k)) end end --- Create a structure of type SubnetNotFoundException -- <p>The specified subnet does not exist.</p> -- @param args Table with arguments in key-value form. -- Valid keys: -- @return SubnetNotFoundException structure as a key-value pair table function M.SubnetNotFoundException(args) assert(args, "You must provide an argument table when creating SubnetNotFoundException") local query_args = { } local uri_args = { } local header_args = { } local all_args = { } asserts.AssertSubnetNotFoundException(all_args) return { all = all_args, query = query_args, uri = uri_args, headers = header_args, } end keys.DeregisterTargetsInput = { ["TargetGroupArn"] = true, ["Targets"] = true, nil } function asserts.AssertDeregisterTargetsInput(struct) assert(struct) assert(type(struct) == "table", "Expected DeregisterTargetsInput to be of type 'table'") assert(struct["TargetGroupArn"], "Expected key TargetGroupArn to exist in table") assert(struct["Targets"], "Expected key Targets to exist in table") if struct["TargetGroupArn"] then asserts.AssertTargetGroupArn(struct["TargetGroupArn"]) end if struct["Targets"] then asserts.AssertTargetDescriptions(struct["Targets"]) end for k,_ in pairs(struct) do assert(keys.DeregisterTargetsInput[k], "DeregisterTargetsInput contains unknown key " .. tostring(k)) end end --- Create a structure of type DeregisterTargetsInput -- -- @param args Table with arguments in key-value form. -- Valid keys: -- * TargetGroupArn [TargetGroupArn] <p>The Amazon Resource Name (ARN) of the target group.</p> -- * Targets [TargetDescriptions] <p>The targets. If you specified a port override when you registered a target, you must specify both the target ID and the port when you deregister it.</p> -- Required key: TargetGroupArn -- Required key: Targets -- @return DeregisterTargetsInput structure as a key-value pair table function M.DeregisterTargetsInput(args) assert(args, "You must provide an argument table when creating DeregisterTargetsInput") local query_args = { } local uri_args = { } local header_args = { } local all_args = { ["TargetGroupArn"] = args["TargetGroupArn"], ["Targets"] = args["Targets"], } asserts.AssertDeregisterTargetsInput(all_args) return { all = all_args, query = query_args, uri = uri_args, headers = header_args, } end keys.RulePriorityPair = { ["Priority"] = true, ["RuleArn"] = true, nil } function asserts.AssertRulePriorityPair(struct) assert(struct) assert(type(struct) == "table", "Expected RulePriorityPair to be of type 'table'") if struct["Priority"] then asserts.AssertRulePriority(struct["Priority"]) end if struct["RuleArn"] then asserts.AssertRuleArn(struct["RuleArn"]) end for k,_ in pairs(struct) do assert(keys.RulePriorityPair[k], "RulePriorityPair contains unknown key " .. tostring(k)) end end --- Create a structure of type RulePriorityPair -- <p>Information about the priorities for the rules for a listener.</p> -- @param args Table with arguments in key-value form. -- Valid keys: -- * Priority [RulePriority] <p>The rule priority.</p> -- * RuleArn [RuleArn] <p>The Amazon Resource Name (ARN) of the rule.</p> -- @return RulePriorityPair structure as a key-value pair table function M.RulePriorityPair(args) assert(args, "You must provide an argument table when creating RulePriorityPair") local query_args = { } local uri_args = { } local header_args = { } local all_args = { ["Priority"] = args["Priority"], ["RuleArn"] = args["RuleArn"], } asserts.AssertRulePriorityPair(all_args) return { all = all_args, query = query_args, uri = uri_args, headers = header_args, } end keys.DeleteTargetGroupOutput = { nil } function asserts.AssertDeleteTargetGroupOutput(struct) assert(struct) assert(type(struct) == "table", "Expected DeleteTargetGroupOutput to be of type 'table'") for k,_ in pairs(struct) do assert(keys.DeleteTargetGroupOutput[k], "DeleteTargetGroupOutput contains unknown key " .. tostring(k)) end end --- Create a structure of type DeleteTargetGroupOutput -- -- @param args Table with arguments in key-value form. -- Valid keys: -- @return DeleteTargetGroupOutput structure as a key-value pair table function M.DeleteTargetGroupOutput(args) assert(args, "You must provide an argument table when creating DeleteTargetGroupOutput") local query_args = { } local uri_args = { } local header_args = { } local all_args = { } asserts.AssertDeleteTargetGroupOutput(all_args) return { all = all_args, query = query_args, uri = uri_args, headers = header_args, } end keys.DuplicateLoadBalancerNameException = { nil } function asserts.AssertDuplicateLoadBalancerNameException(struct) assert(struct) assert(type(struct) == "table", "Expected DuplicateLoadBalancerNameException to be of type 'table'") for k,_ in pairs(struct) do assert(keys.DuplicateLoadBalancerNameException[k], "DuplicateLoadBalancerNameException contains unknown key " .. tostring(k)) end end --- Create a structure of type DuplicateLoadBalancerNameException -- <p>A load balancer with the specified name already exists.</p> -- @param args Table with arguments in key-value form. -- Valid keys: -- @return DuplicateLoadBalancerNameException structure as a key-value pair table function M.DuplicateLoadBalancerNameException(args) assert(args, "You must provide an argument table when creating DuplicateLoadBalancerNameException") local query_args = { } local uri_args = { } local header_args = { } local all_args = { } asserts.AssertDuplicateLoadBalancerNameException(all_args) return { all = all_args, query = query_args, uri = uri_args, headers = header_args, } end keys.InvalidConfigurationRequestException = { nil } function asserts.AssertInvalidConfigurationRequestException(struct) assert(struct) assert(type(struct) == "table", "Expected InvalidConfigurationRequestException to be of type 'table'") for k,_ in pairs(struct) do assert(keys.InvalidConfigurationRequestException[k], "InvalidConfigurationRequestException contains unknown key " .. tostring(k)) end end --- Create a structure of type InvalidConfigurationRequestException -- <p>The requested configuration is not valid.</p> -- @param args Table with arguments in key-value form. -- Valid keys: -- @return InvalidConfigurationRequestException structure as a key-value pair table function M.InvalidConfigurationRequestException(args) assert(args, "You must provide an argument table when creating InvalidConfigurationRequestException") local query_args = { } local uri_args = { } local header_args = { } local all_args = { } asserts.AssertInvalidConfigurationRequestException(all_args) return { all = all_args, query = query_args, uri = uri_args, headers = header_args, } end keys.ModifyTargetGroupAttributesInput = { ["Attributes"] = true, ["TargetGroupArn"] = true, nil } function asserts.AssertModifyTargetGroupAttributesInput(struct) assert(struct) assert(type(struct) == "table", "Expected ModifyTargetGroupAttributesInput to be of type 'table'") assert(struct["TargetGroupArn"], "Expected key TargetGroupArn to exist in table") assert(struct["Attributes"], "Expected key Attributes to exist in table") if struct["Attributes"] then asserts.AssertTargetGroupAttributes(struct["Attributes"]) end if struct["TargetGroupArn"] then asserts.AssertTargetGroupArn(struct["TargetGroupArn"]) end for k,_ in pairs(struct) do assert(keys.ModifyTargetGroupAttributesInput[k], "ModifyTargetGroupAttributesInput contains unknown key " .. tostring(k)) end end --- Create a structure of type ModifyTargetGroupAttributesInput -- -- @param args Table with arguments in key-value form. -- Valid keys: -- * Attributes [TargetGroupAttributes] <p>The attributes.</p> -- * TargetGroupArn [TargetGroupArn] <p>The Amazon Resource Name (ARN) of the target group.</p> -- Required key: TargetGroupArn -- Required key: Attributes -- @return ModifyTargetGroupAttributesInput structure as a key-value pair table function M.ModifyTargetGroupAttributesInput(args) assert(args, "You must provide an argument table when creating ModifyTargetGroupAttributesInput") local query_args = { } local uri_args = { } local header_args = { } local all_args = { ["Attributes"] = args["Attributes"], ["TargetGroupArn"] = args["TargetGroupArn"], } asserts.AssertModifyTargetGroupAttributesInput(all_args) return { all = all_args, query = query_args, uri = uri_args, headers = header_args, } end keys.Cipher = { ["Priority"] = true, ["Name"] = true, nil } function asserts.AssertCipher(struct) assert(struct) assert(type(struct) == "table", "Expected Cipher to be of type 'table'") if struct["Priority"] then asserts.AssertCipherPriority(struct["Priority"]) end if struct["Name"] then asserts.AssertCipherName(struct["Name"]) end for k,_ in pairs(struct) do assert(keys.Cipher[k], "Cipher contains unknown key " .. tostring(k)) end end --- Create a structure of type Cipher -- <p>Information about a cipher used in a policy.</p> -- @param args Table with arguments in key-value form. -- Valid keys: -- * Priority [CipherPriority] <p>The priority of the cipher.</p> -- * Name [CipherName] <p>The name of the cipher.</p> -- @return Cipher structure as a key-value pair table function M.Cipher(args) assert(args, "You must provide an argument table when creating Cipher") local query_args = { } local uri_args = { } local header_args = { } local all_args = { ["Priority"] = args["Priority"], ["Name"] = args["Name"], } asserts.AssertCipher(all_args) return { all = all_args, query = query_args, uri = uri_args, headers = header_args, } end keys.RuleCondition = { ["Field"] = true, ["Values"] = true, nil } function asserts.AssertRuleCondition(struct) assert(struct) assert(type(struct) == "table", "Expected RuleCondition to be of type 'table'") if struct["Field"] then asserts.AssertConditionFieldName(struct["Field"]) end if struct["Values"] then asserts.AssertListOfString(struct["Values"]) end for k,_ in pairs(struct) do assert(keys.RuleCondition[k], "RuleCondition contains unknown key " .. tostring(k)) end end --- Create a structure of type RuleCondition -- <p>Information about a condition for a rule.</p> -- @param args Table with arguments in key-value form. -- Valid keys: -- * Field [ConditionFieldName] <p>The name of the field. The possible values are <code>host-header</code> and <code>path-pattern</code>.</p> -- * Values [ListOfString] <p>The condition value.</p> <p>If the field name is <code>host-header</code>, you can specify a single host name (for example, my.example.com). A host name is case insensitive, can be up to 128 characters in length, and can contain any of the following characters. You can include up to three wildcard characters.</p> <ul> <li> <p>A-Z, a-z, 0-9</p> </li> <li> <p>- .</p> </li> <li> <p>* (matches 0 or more characters)</p> </li> <li> <p>? (matches exactly 1 character)</p> </li> </ul> <p>If the field name is <code>path-pattern</code>, you can specify a single path pattern (for example, /img/*). A path pattern is case-sensitive, can be up to 128 characters in length, and can contain any of the following characters. You can include up to three wildcard characters.</p> <ul> <li> <p>A-Z, a-z, 0-9</p> </li> <li> <p>_ - . $ / ~ " ' @ : +</p> </li> <li> <p>&amp; (using &amp;amp;)</p> </li> <li> <p>* (matches 0 or more characters)</p> </li> <li> <p>? (matches exactly 1 character)</p> </li> </ul> -- @return RuleCondition structure as a key-value pair table function M.RuleCondition(args) assert(args, "You must provide an argument table when creating RuleCondition") local query_args = { } local uri_args = { } local header_args = { } local all_args = { ["Field"] = args["Field"], ["Values"] = args["Values"], } asserts.AssertRuleCondition(all_args) return { all = all_args, query = query_args, uri = uri_args, headers = header_args, } end keys.DescribeSSLPoliciesOutput = { ["NextMarker"] = true, ["SslPolicies"] = true, nil } function asserts.AssertDescribeSSLPoliciesOutput(struct) assert(struct) assert(type(struct) == "table", "Expected DescribeSSLPoliciesOutput to be of type 'table'") if struct["NextMarker"] then asserts.AssertMarker(struct["NextMarker"]) end if struct["SslPolicies"] then asserts.AssertSslPolicies(struct["SslPolicies"]) end for k,_ in pairs(struct) do assert(keys.DescribeSSLPoliciesOutput[k], "DescribeSSLPoliciesOutput contains unknown key " .. tostring(k)) end end --- Create a structure of type DescribeSSLPoliciesOutput -- -- @param args Table with arguments in key-value form. -- Valid keys: -- * NextMarker [Marker] <p>The marker to use when requesting the next set of results. If there are no additional results, the string is empty.</p> -- * SslPolicies [SslPolicies] <p>Information about the policies.</p> -- @return DescribeSSLPoliciesOutput structure as a key-value pair table function M.DescribeSSLPoliciesOutput(args) assert(args, "You must provide an argument table when creating DescribeSSLPoliciesOutput") local query_args = { } local uri_args = { } local header_args = { } local all_args = { ["NextMarker"] = args["NextMarker"], ["SslPolicies"] = args["SslPolicies"], } asserts.AssertDescribeSSLPoliciesOutput(all_args) return { all = all_args, query = query_args, uri = uri_args, headers = header_args, } end keys.AddListenerCertificatesOutput = { ["Certificates"] = true, nil } function asserts.AssertAddListenerCertificatesOutput(struct) assert(struct) assert(type(struct) == "table", "Expected AddListenerCertificatesOutput to be of type 'table'") if struct["Certificates"] then asserts.AssertCertificateList(struct["Certificates"]) end for k,_ in pairs(struct) do assert(keys.AddListenerCertificatesOutput[k], "AddListenerCertificatesOutput contains unknown key " .. tostring(k)) end end --- Create a structure of type AddListenerCertificatesOutput -- -- @param args Table with arguments in key-value form. -- Valid keys: -- * Certificates [CertificateList] <p>Information about the certificates.</p> -- @return AddListenerCertificatesOutput structure as a key-value pair table function M.AddListenerCertificatesOutput(args) assert(args, "You must provide an argument table when creating AddListenerCertificatesOutput") local query_args = { } local uri_args = { } local header_args = { } local all_args = { ["Certificates"] = args["Certificates"], } asserts.AssertAddListenerCertificatesOutput(all_args) return { all = all_args, query = query_args, uri = uri_args, headers = header_args, } end keys.DescribeTagsInput = { ["ResourceArns"] = true, nil } function asserts.AssertDescribeTagsInput(struct) assert(struct) assert(type(struct) == "table", "Expected DescribeTagsInput to be of type 'table'") assert(struct["ResourceArns"], "Expected key ResourceArns to exist in table") if struct["ResourceArns"] then asserts.AssertResourceArns(struct["ResourceArns"]) end for k,_ in pairs(struct) do assert(keys.DescribeTagsInput[k], "DescribeTagsInput contains unknown key " .. tostring(k)) end end --- Create a structure of type DescribeTagsInput -- -- @param args Table with arguments in key-value form. -- Valid keys: -- * ResourceArns [ResourceArns] <p>The Amazon Resource Names (ARN) of the resources.</p> -- Required key: ResourceArns -- @return DescribeTagsInput structure as a key-value pair table function M.DescribeTagsInput(args) assert(args, "You must provide an argument table when creating DescribeTagsInput") local query_args = { } local uri_args = { } local header_args = { } local all_args = { ["ResourceArns"] = args["ResourceArns"], } asserts.AssertDescribeTagsInput(all_args) return { all = all_args, query = query_args, uri = uri_args, headers = header_args, } end keys.SetSecurityGroupsOutput = { ["SecurityGroupIds"] = true, nil } function asserts.AssertSetSecurityGroupsOutput(struct) assert(struct) assert(type(struct) == "table", "Expected SetSecurityGroupsOutput to be of type 'table'") if struct["SecurityGroupIds"] then asserts.AssertSecurityGroups(struct["SecurityGroupIds"]) end for k,_ in pairs(struct) do assert(keys.SetSecurityGroupsOutput[k], "SetSecurityGroupsOutput contains unknown key " .. tostring(k)) end end --- Create a structure of type SetSecurityGroupsOutput -- -- @param args Table with arguments in key-value form. -- Valid keys: -- * SecurityGroupIds [SecurityGroups] <p>The IDs of the security groups associated with the load balancer.</p> -- @return SetSecurityGroupsOutput structure as a key-value pair table function M.SetSecurityGroupsOutput(args) assert(args, "You must provide an argument table when creating SetSecurityGroupsOutput") local query_args = { } local uri_args = { } local header_args = { } local all_args = { ["SecurityGroupIds"] = args["SecurityGroupIds"], } asserts.AssertSetSecurityGroupsOutput(all_args) return { all = all_args, query = query_args, uri = uri_args, headers = header_args, } end keys.DescribeAccountLimitsInput = { ["Marker"] = true, ["PageSize"] = true, nil } function asserts.AssertDescribeAccountLimitsInput(struct) assert(struct) assert(type(struct) == "table", "Expected DescribeAccountLimitsInput to be of type 'table'") if struct["Marker"] then asserts.AssertMarker(struct["Marker"]) end if struct["PageSize"] then asserts.AssertPageSize(struct["PageSize"]) end for k,_ in pairs(struct) do assert(keys.DescribeAccountLimitsInput[k], "DescribeAccountLimitsInput contains unknown key " .. tostring(k)) end end --- Create a structure of type DescribeAccountLimitsInput -- -- @param args Table with arguments in key-value form. -- Valid keys: -- * Marker [Marker] <p>The marker for the next set of results. (You received this marker from a previous call.)</p> -- * PageSize [PageSize] <p>The maximum number of results to return with this call.</p> -- @return DescribeAccountLimitsInput structure as a key-value pair table function M.DescribeAccountLimitsInput(args) assert(args, "You must provide an argument table when creating DescribeAccountLimitsInput") local query_args = { } local uri_args = { } local header_args = { } local all_args = { ["Marker"] = args["Marker"], ["PageSize"] = args["PageSize"], } asserts.AssertDescribeAccountLimitsInput(all_args) return { all = all_args, query = query_args, uri = uri_args, headers = header_args, } end keys.Limit = { ["Max"] = true, ["Name"] = true, nil } function asserts.AssertLimit(struct) assert(struct) assert(type(struct) == "table", "Expected Limit to be of type 'table'") if struct["Max"] then asserts.AssertMax(struct["Max"]) end if struct["Name"] then asserts.AssertName(struct["Name"]) end for k,_ in pairs(struct) do assert(keys.Limit[k], "Limit contains unknown key " .. tostring(k)) end end --- Create a structure of type Limit -- <p>Information about an Elastic Load Balancing resource limit for your AWS account.</p> -- @param args Table with arguments in key-value form. -- Valid keys: -- * Max [Max] <p>The maximum value of the limit.</p> -- * Name [Name] <p>The name of the limit. The possible values are:</p> <ul> <li> <p>application-load-balancers</p> </li> <li> <p>listeners-per-application-load-balancer</p> </li> <li> <p>listeners-per-network-load-balancer</p> </li> <li> <p>network-load-balancers</p> </li> <li> <p>rules-per-application-load-balancer</p> </li> <li> <p>target-groups</p> </li> <li> <p>targets-per-application-load-balancer</p> </li> <li> <p>targets-per-availability-zone-per-network-load-balancer</p> </li> <li> <p>targets-per-network-load-balancer</p> </li> </ul> -- @return Limit structure as a key-value pair table function M.Limit(args) assert(args, "You must provide an argument table when creating Limit") local query_args = { } local uri_args = { } local header_args = { } local all_args = { ["Max"] = args["Max"], ["Name"] = args["Name"], } asserts.AssertLimit(all_args) return { all = all_args, query = query_args, uri = uri_args, headers = header_args, } end keys.DeleteRuleInput = { ["RuleArn"] = true, nil } function asserts.AssertDeleteRuleInput(struct) assert(struct) assert(type(struct) == "table", "Expected DeleteRuleInput to be of type 'table'") assert(struct["RuleArn"], "Expected key RuleArn to exist in table") if struct["RuleArn"] then asserts.AssertRuleArn(struct["RuleArn"]) end for k,_ in pairs(struct) do assert(keys.DeleteRuleInput[k], "DeleteRuleInput contains unknown key " .. tostring(k)) end end --- Create a structure of type DeleteRuleInput -- -- @param args Table with arguments in key-value form. -- Valid keys: -- * RuleArn [RuleArn] <p>The Amazon Resource Name (ARN) of the rule.</p> -- Required key: RuleArn -- @return DeleteRuleInput structure as a key-value pair table function M.DeleteRuleInput(args) assert(args, "You must provide an argument table when creating DeleteRuleInput") local query_args = { } local uri_args = { } local header_args = { } local all_args = { ["RuleArn"] = args["RuleArn"], } asserts.AssertDeleteRuleInput(all_args) return { all = all_args, query = query_args, uri = uri_args, headers = header_args, } end keys.TargetGroup = { ["HealthCheckPath"] = true, ["HealthCheckIntervalSeconds"] = true, ["VpcId"] = true, ["Protocol"] = true, ["HealthCheckTimeoutSeconds"] = true, ["TargetType"] = true, ["HealthCheckProtocol"] = true, ["LoadBalancerArns"] = true, ["UnhealthyThresholdCount"] = true, ["HealthyThresholdCount"] = true, ["TargetGroupArn"] = true, ["Matcher"] = true, ["HealthCheckPort"] = true, ["Port"] = true, ["TargetGroupName"] = true, nil } function asserts.AssertTargetGroup(struct) assert(struct) assert(type(struct) == "table", "Expected TargetGroup to be of type 'table'") if struct["HealthCheckPath"] then asserts.AssertPath(struct["HealthCheckPath"]) end if struct["HealthCheckIntervalSeconds"] then asserts.AssertHealthCheckIntervalSeconds(struct["HealthCheckIntervalSeconds"]) end if struct["VpcId"] then asserts.AssertVpcId(struct["VpcId"]) end if struct["Protocol"] then asserts.AssertProtocolEnum(struct["Protocol"]) end if struct["HealthCheckTimeoutSeconds"] then asserts.AssertHealthCheckTimeoutSeconds(struct["HealthCheckTimeoutSeconds"]) end if struct["TargetType"] then asserts.AssertTargetTypeEnum(struct["TargetType"]) end if struct["HealthCheckProtocol"] then asserts.AssertProtocolEnum(struct["HealthCheckProtocol"]) end if struct["LoadBalancerArns"] then asserts.AssertLoadBalancerArns(struct["LoadBalancerArns"]) end if struct["UnhealthyThresholdCount"] then asserts.AssertHealthCheckThresholdCount(struct["UnhealthyThresholdCount"]) end if struct["HealthyThresholdCount"] then asserts.AssertHealthCheckThresholdCount(struct["HealthyThresholdCount"]) end if struct["TargetGroupArn"] then asserts.AssertTargetGroupArn(struct["TargetGroupArn"]) end if struct["Matcher"] then asserts.AssertMatcher(struct["Matcher"]) end if struct["HealthCheckPort"] then asserts.AssertHealthCheckPort(struct["HealthCheckPort"]) end if struct["Port"] then asserts.AssertPort(struct["Port"]) end if struct["TargetGroupName"] then asserts.AssertTargetGroupName(struct["TargetGroupName"]) end for k,_ in pairs(struct) do assert(keys.TargetGroup[k], "TargetGroup contains unknown key " .. tostring(k)) end end --- Create a structure of type TargetGroup -- <p>Information about a target group.</p> -- @param args Table with arguments in key-value form. -- Valid keys: -- * HealthCheckPath [Path] <p>The destination for the health check request.</p> -- * HealthCheckIntervalSeconds [HealthCheckIntervalSeconds] <p>The approximate amount of time, in seconds, between health checks of an individual target.</p> -- * VpcId [VpcId] <p>The ID of the VPC for the targets.</p> -- * Protocol [ProtocolEnum] <p>The protocol to use for routing traffic to the targets.</p> -- * HealthCheckTimeoutSeconds [HealthCheckTimeoutSeconds] <p>The amount of time, in seconds, during which no response means a failed health check.</p> -- * TargetType [TargetTypeEnum] <p>The type of target that you must specify when registering targets with this target group. The possible values are <code>instance</code> (targets are specified by instance ID) or <code>ip</code> (targets are specified by IP address).</p> -- * HealthCheckProtocol [ProtocolEnum] <p>The protocol to use to connect with the target.</p> -- * LoadBalancerArns [LoadBalancerArns] <p>The Amazon Resource Names (ARN) of the load balancers that route traffic to this target group.</p> -- * UnhealthyThresholdCount [HealthCheckThresholdCount] <p>The number of consecutive health check failures required before considering the target unhealthy.</p> -- * HealthyThresholdCount [HealthCheckThresholdCount] <p>The number of consecutive health checks successes required before considering an unhealthy target healthy.</p> -- * TargetGroupArn [TargetGroupArn] <p>The Amazon Resource Name (ARN) of the target group.</p> -- * Matcher [Matcher] <p>The HTTP codes to use when checking for a successful response from a target.</p> -- * HealthCheckPort [HealthCheckPort] <p>The port to use to connect with the target.</p> -- * Port [Port] <p>The port on which the targets are listening.</p> -- * TargetGroupName [TargetGroupName] <p>The name of the target group.</p> -- @return TargetGroup structure as a key-value pair table function M.TargetGroup(args) assert(args, "You must provide an argument table when creating TargetGroup") local query_args = { } local uri_args = { } local header_args = { } local all_args = { ["HealthCheckPath"] = args["HealthCheckPath"], ["HealthCheckIntervalSeconds"] = args["HealthCheckIntervalSeconds"], ["VpcId"] = args["VpcId"], ["Protocol"] = args["Protocol"], ["HealthCheckTimeoutSeconds"] = args["HealthCheckTimeoutSeconds"], ["TargetType"] = args["TargetType"], ["HealthCheckProtocol"] = args["HealthCheckProtocol"], ["LoadBalancerArns"] = args["LoadBalancerArns"], ["UnhealthyThresholdCount"] = args["UnhealthyThresholdCount"], ["HealthyThresholdCount"] = args["HealthyThresholdCount"], ["TargetGroupArn"] = args["TargetGroupArn"], ["Matcher"] = args["Matcher"], ["HealthCheckPort"] = args["HealthCheckPort"], ["Port"] = args["Port"], ["TargetGroupName"] = args["TargetGroupName"], } asserts.AssertTargetGroup(all_args) return { all = all_args, query = query_args, uri = uri_args, headers = header_args, } end keys.SslPolicy = { ["SslProtocols"] = true, ["Ciphers"] = true, ["Name"] = true, nil } function asserts.AssertSslPolicy(struct) assert(struct) assert(type(struct) == "table", "Expected SslPolicy to be of type 'table'") if struct["SslProtocols"] then asserts.AssertSslProtocols(struct["SslProtocols"]) end if struct["Ciphers"] then asserts.AssertCiphers(struct["Ciphers"]) end if struct["Name"] then asserts.AssertSslPolicyName(struct["Name"]) end for k,_ in pairs(struct) do assert(keys.SslPolicy[k], "SslPolicy contains unknown key " .. tostring(k)) end end --- Create a structure of type SslPolicy -- <p>Information about a policy used for SSL negotiation.</p> -- @param args Table with arguments in key-value form. -- Valid keys: -- * SslProtocols [SslProtocols] <p>The protocols.</p> -- * Ciphers [Ciphers] <p>The ciphers.</p> -- * Name [SslPolicyName] <p>The name of the policy.</p> -- @return SslPolicy structure as a key-value pair table function M.SslPolicy(args) assert(args, "You must provide an argument table when creating SslPolicy") local query_args = { } local uri_args = { } local header_args = { } local all_args = { ["SslProtocols"] = args["SslProtocols"], ["Ciphers"] = args["Ciphers"], ["Name"] = args["Name"], } asserts.AssertSslPolicy(all_args) return { all = all_args, query = query_args, uri = uri_args, headers = header_args, } end keys.DescribeListenerCertificatesOutput = { ["Certificates"] = true, ["NextMarker"] = true, nil } function asserts.AssertDescribeListenerCertificatesOutput(struct) assert(struct) assert(type(struct) == "table", "Expected DescribeListenerCertificatesOutput to be of type 'table'") if struct["Certificates"] then asserts.AssertCertificateList(struct["Certificates"]) end if struct["NextMarker"] then asserts.AssertMarker(struct["NextMarker"]) end for k,_ in pairs(struct) do assert(keys.DescribeListenerCertificatesOutput[k], "DescribeListenerCertificatesOutput contains unknown key " .. tostring(k)) end end --- Create a structure of type DescribeListenerCertificatesOutput -- -- @param args Table with arguments in key-value form. -- Valid keys: -- * Certificates [CertificateList] <p>Information about the certificates.</p> -- * NextMarker [Marker] <p>The marker to use when requesting the next set of results. If there are no additional results, the string is empty.</p> -- @return DescribeListenerCertificatesOutput structure as a key-value pair table function M.DescribeListenerCertificatesOutput(args) assert(args, "You must provide an argument table when creating DescribeListenerCertificatesOutput") local query_args = { } local uri_args = { } local header_args = { } local all_args = { ["Certificates"] = args["Certificates"], ["NextMarker"] = args["NextMarker"], } asserts.AssertDescribeListenerCertificatesOutput(all_args) return { all = all_args, query = query_args, uri = uri_args, headers = header_args, } end keys.InvalidSubnetException = { nil } function asserts.AssertInvalidSubnetException(struct) assert(struct) assert(type(struct) == "table", "Expected InvalidSubnetException to be of type 'table'") for k,_ in pairs(struct) do assert(keys.InvalidSubnetException[k], "InvalidSubnetException contains unknown key " .. tostring(k)) end end --- Create a structure of type InvalidSubnetException -- <p>The specified subnet is out of available addresses.</p> -- @param args Table with arguments in key-value form. -- Valid keys: -- @return InvalidSubnetException structure as a key-value pair table function M.InvalidSubnetException(args) assert(args, "You must provide an argument table when creating InvalidSubnetException") local query_args = { } local uri_args = { } local header_args = { } local all_args = { } asserts.AssertInvalidSubnetException(all_args) return { all = all_args, query = query_args, uri = uri_args, headers = header_args, } end keys.TagDescription = { ["ResourceArn"] = true, ["Tags"] = true, nil } function asserts.AssertTagDescription(struct) assert(struct) assert(type(struct) == "table", "Expected TagDescription to be of type 'table'") if struct["ResourceArn"] then asserts.AssertResourceArn(struct["ResourceArn"]) end if struct["Tags"] then asserts.AssertTagList(struct["Tags"]) end for k,_ in pairs(struct) do assert(keys.TagDescription[k], "TagDescription contains unknown key " .. tostring(k)) end end --- Create a structure of type TagDescription -- <p>The tags associated with a resource.</p> -- @param args Table with arguments in key-value form. -- Valid keys: -- * ResourceArn [ResourceArn] <p>The Amazon Resource Name (ARN) of the resource.</p> -- * Tags [TagList] <p>Information about the tags.</p> -- @return TagDescription structure as a key-value pair table function M.TagDescription(args) assert(args, "You must provide an argument table when creating TagDescription") local query_args = { } local uri_args = { } local header_args = { } local all_args = { ["ResourceArn"] = args["ResourceArn"], ["Tags"] = args["Tags"], } asserts.AssertTagDescription(all_args) return { all = all_args, query = query_args, uri = uri_args, headers = header_args, } end keys.Tag = { ["Value"] = true, ["Key"] = true, nil } function asserts.AssertTag(struct) assert(struct) assert(type(struct) == "table", "Expected Tag to be of type 'table'") assert(struct["Key"], "Expected key Key to exist in table") if struct["Value"] then asserts.AssertTagValue(struct["Value"]) end if struct["Key"] then asserts.AssertTagKey(struct["Key"]) end for k,_ in pairs(struct) do assert(keys.Tag[k], "Tag contains unknown key " .. tostring(k)) end end --- Create a structure of type Tag -- <p>Information about a tag.</p> -- @param args Table with arguments in key-value form. -- Valid keys: -- * Value [TagValue] <p>The value of the tag.</p> -- * Key [TagKey] <p>The key of the tag.</p> -- Required key: Key -- @return Tag structure as a key-value pair table function M.Tag(args) assert(args, "You must provide an argument table when creating Tag") local query_args = { } local uri_args = { } local header_args = { } local all_args = { ["Value"] = args["Value"], ["Key"] = args["Key"], } asserts.AssertTag(all_args) return { all = all_args, query = query_args, uri = uri_args, headers = header_args, } end keys.DescribeTargetGroupAttributesOutput = { ["Attributes"] = true, nil } function asserts.AssertDescribeTargetGroupAttributesOutput(struct) assert(struct) assert(type(struct) == "table", "Expected DescribeTargetGroupAttributesOutput to be of type 'table'") if struct["Attributes"] then asserts.AssertTargetGroupAttributes(struct["Attributes"]) end for k,_ in pairs(struct) do assert(keys.DescribeTargetGroupAttributesOutput[k], "DescribeTargetGroupAttributesOutput contains unknown key " .. tostring(k)) end end --- Create a structure of type DescribeTargetGroupAttributesOutput -- -- @param args Table with arguments in key-value form. -- Valid keys: -- * Attributes [TargetGroupAttributes] <p>Information about the target group attributes</p> -- @return DescribeTargetGroupAttributesOutput structure as a key-value pair table function M.DescribeTargetGroupAttributesOutput(args) assert(args, "You must provide an argument table when creating DescribeTargetGroupAttributesOutput") local query_args = { } local uri_args = { } local header_args = { } local all_args = { ["Attributes"] = args["Attributes"], } asserts.AssertDescribeTargetGroupAttributesOutput(all_args) return { all = all_args, query = query_args, uri = uri_args, headers = header_args, } end keys.CertificateNotFoundException = { nil } function asserts.AssertCertificateNotFoundException(struct) assert(struct) assert(type(struct) == "table", "Expected CertificateNotFoundException to be of type 'table'") for k,_ in pairs(struct) do assert(keys.CertificateNotFoundException[k], "CertificateNotFoundException contains unknown key " .. tostring(k)) end end --- Create a structure of type CertificateNotFoundException -- <p>The specified certificate does not exist.</p> -- @param args Table with arguments in key-value form. -- Valid keys: -- @return CertificateNotFoundException structure as a key-value pair table function M.CertificateNotFoundException(args) assert(args, "You must provide an argument table when creating CertificateNotFoundException") local query_args = { } local uri_args = { } local header_args = { } local all_args = { } asserts.AssertCertificateNotFoundException(all_args) return { all = all_args, query = query_args, uri = uri_args, headers = header_args, } end keys.CreateLoadBalancerInput = { ["IpAddressType"] = true, ["Subnets"] = true, ["Name"] = true, ["Tags"] = true, ["SubnetMappings"] = true, ["SecurityGroups"] = true, ["Scheme"] = true, ["Type"] = true, nil } function asserts.AssertCreateLoadBalancerInput(struct) assert(struct) assert(type(struct) == "table", "Expected CreateLoadBalancerInput to be of type 'table'") assert(struct["Name"], "Expected key Name to exist in table") if struct["IpAddressType"] then asserts.AssertIpAddressType(struct["IpAddressType"]) end if struct["Subnets"] then asserts.AssertSubnets(struct["Subnets"]) end if struct["Name"] then asserts.AssertLoadBalancerName(struct["Name"]) end if struct["Tags"] then asserts.AssertTagList(struct["Tags"]) end if struct["SubnetMappings"] then asserts.AssertSubnetMappings(struct["SubnetMappings"]) end if struct["SecurityGroups"] then asserts.AssertSecurityGroups(struct["SecurityGroups"]) end if struct["Scheme"] then asserts.AssertLoadBalancerSchemeEnum(struct["Scheme"]) end if struct["Type"] then asserts.AssertLoadBalancerTypeEnum(struct["Type"]) end for k,_ in pairs(struct) do assert(keys.CreateLoadBalancerInput[k], "CreateLoadBalancerInput contains unknown key " .. tostring(k)) end end --- Create a structure of type CreateLoadBalancerInput -- -- @param args Table with arguments in key-value form. -- Valid keys: -- * IpAddressType [IpAddressType] <p>[Application Load Balancers] The type of IP addresses used by the subnets for your load balancer. The possible values are <code>ipv4</code> (for IPv4 addresses) and <code>dualstack</code> (for IPv4 and IPv6 addresses). Internal load balancers must use <code>ipv4</code>.</p> -- * Subnets [Subnets] <p>The IDs of the public subnets. You can specify only one subnet per Availability Zone. You must specify either subnets or subnet mappings.</p> <p>[Application Load Balancers] You must specify subnets from at least two Availability Zones.</p> <p>[Network Load Balancers] You can specify subnets from one or more Availability Zones.</p> -- * Name [LoadBalancerName] <p>The name of the load balancer.</p> <p>This name must be unique per region per account, can have a maximum of 32 characters, must contain only alphanumeric characters or hyphens, must not begin or end with a hyphen, and must not begin with "internal-".</p> -- * Tags [TagList] <p>One or more tags to assign to the load balancer.</p> -- * SubnetMappings [SubnetMappings] <p>The IDs of the public subnets. You can specify only one subnet per Availability Zone. You must specify either subnets or subnet mappings.</p> <p>[Application Load Balancers] You must specify subnets from at least two Availability Zones. You cannot specify Elastic IP addresses for your subnets.</p> <p>[Network Load Balancers] You can specify subnets from one or more Availability Zones. You can specify one Elastic IP address per subnet.</p> -- * SecurityGroups [SecurityGroups] <p>[Application Load Balancers] The IDs of the security groups for the load balancer.</p> -- * Scheme [LoadBalancerSchemeEnum] <p>The nodes of an Internet-facing load balancer have public IP addresses. The DNS name of an Internet-facing load balancer is publicly resolvable to the public IP addresses of the nodes. Therefore, Internet-facing load balancers can route requests from clients over the internet.</p> <p>The nodes of an internal load balancer have only private IP addresses. The DNS name of an internal load balancer is publicly resolvable to the private IP addresses of the nodes. Therefore, internal load balancers can only route requests from clients with access to the VPC for the load balancer.</p> <p>The default is an Internet-facing load balancer.</p> -- * Type [LoadBalancerTypeEnum] <p>The type of load balancer. The default is <code>application</code>.</p> -- Required key: Name -- @return CreateLoadBalancerInput structure as a key-value pair table function M.CreateLoadBalancerInput(args) assert(args, "You must provide an argument table when creating CreateLoadBalancerInput") local query_args = { } local uri_args = { } local header_args = { } local all_args = { ["IpAddressType"] = args["IpAddressType"], ["Subnets"] = args["Subnets"], ["Name"] = args["Name"], ["Tags"] = args["Tags"], ["SubnetMappings"] = args["SubnetMappings"], ["SecurityGroups"] = args["SecurityGroups"], ["Scheme"] = args["Scheme"], ["Type"] = args["Type"], } asserts.AssertCreateLoadBalancerInput(all_args) return { all = all_args, query = query_args, uri = uri_args, headers = header_args, } end keys.SetIpAddressTypeInput = { ["IpAddressType"] = true, ["LoadBalancerArn"] = true, nil } function asserts.AssertSetIpAddressTypeInput(struct) assert(struct) assert(type(struct) == "table", "Expected SetIpAddressTypeInput to be of type 'table'") assert(struct["LoadBalancerArn"], "Expected key LoadBalancerArn to exist in table") assert(struct["IpAddressType"], "Expected key IpAddressType to exist in table") if struct["IpAddressType"] then asserts.AssertIpAddressType(struct["IpAddressType"]) end if struct["LoadBalancerArn"] then asserts.AssertLoadBalancerArn(struct["LoadBalancerArn"]) end for k,_ in pairs(struct) do assert(keys.SetIpAddressTypeInput[k], "SetIpAddressTypeInput contains unknown key " .. tostring(k)) end end --- Create a structure of type SetIpAddressTypeInput -- -- @param args Table with arguments in key-value form. -- Valid keys: -- * IpAddressType [IpAddressType] <p>The IP address type. The possible values are <code>ipv4</code> (for IPv4 addresses) and <code>dualstack</code> (for IPv4 and IPv6 addresses). Internal load balancers must use <code>ipv4</code>.</p> -- * LoadBalancerArn [LoadBalancerArn] <p>The Amazon Resource Name (ARN) of the load balancer.</p> -- Required key: LoadBalancerArn -- Required key: IpAddressType -- @return SetIpAddressTypeInput structure as a key-value pair table function M.SetIpAddressTypeInput(args) assert(args, "You must provide an argument table when creating SetIpAddressTypeInput") local query_args = { } local uri_args = { } local header_args = { } local all_args = { ["IpAddressType"] = args["IpAddressType"], ["LoadBalancerArn"] = args["LoadBalancerArn"], } asserts.AssertSetIpAddressTypeInput(all_args) return { all = all_args, query = query_args, uri = uri_args, headers = header_args, } end keys.AvailabilityZoneNotSupportedException = { nil } function asserts.AssertAvailabilityZoneNotSupportedException(struct) assert(struct) assert(type(struct) == "table", "Expected AvailabilityZoneNotSupportedException to be of type 'table'") for k,_ in pairs(struct) do assert(keys.AvailabilityZoneNotSupportedException[k], "AvailabilityZoneNotSupportedException contains unknown key " .. tostring(k)) end end --- Create a structure of type AvailabilityZoneNotSupportedException -- <p>The specified Availability Zone is not supported.</p> -- @param args Table with arguments in key-value form. -- Valid keys: -- @return AvailabilityZoneNotSupportedException structure as a key-value pair table function M.AvailabilityZoneNotSupportedException(args) assert(args, "You must provide an argument table when creating AvailabilityZoneNotSupportedException") local query_args = { } local uri_args = { } local header_args = { } local all_args = { } asserts.AssertAvailabilityZoneNotSupportedException(all_args) return { all = all_args, query = query_args, uri = uri_args, headers = header_args, } end keys.DeregisterTargetsOutput = { nil } function asserts.AssertDeregisterTargetsOutput(struct) assert(struct) assert(type(struct) == "table", "Expected DeregisterTargetsOutput to be of type 'table'") for k,_ in pairs(struct) do assert(keys.DeregisterTargetsOutput[k], "DeregisterTargetsOutput contains unknown key " .. tostring(k)) end end --- Create a structure of type DeregisterTargetsOutput -- -- @param args Table with arguments in key-value form. -- Valid keys: -- @return DeregisterTargetsOutput structure as a key-value pair table function M.DeregisterTargetsOutput(args) assert(args, "You must provide an argument table when creating DeregisterTargetsOutput") local query_args = { } local uri_args = { } local header_args = { } local all_args = { } asserts.AssertDeregisterTargetsOutput(all_args) return { all = all_args, query = query_args, uri = uri_args, headers = header_args, } end keys.DescribeListenerCertificatesInput = { ["Marker"] = true, ["PageSize"] = true, ["ListenerArn"] = true, nil } function asserts.AssertDescribeListenerCertificatesInput(struct) assert(struct) assert(type(struct) == "table", "Expected DescribeListenerCertificatesInput to be of type 'table'") assert(struct["ListenerArn"], "Expected key ListenerArn to exist in table") if struct["Marker"] then asserts.AssertMarker(struct["Marker"]) end if struct["PageSize"] then asserts.AssertPageSize(struct["PageSize"]) end if struct["ListenerArn"] then asserts.AssertListenerArn(struct["ListenerArn"]) end for k,_ in pairs(struct) do assert(keys.DescribeListenerCertificatesInput[k], "DescribeListenerCertificatesInput contains unknown key " .. tostring(k)) end end --- Create a structure of type DescribeListenerCertificatesInput -- -- @param args Table with arguments in key-value form. -- Valid keys: -- * Marker [Marker] <p>The marker for the next set of results. (You received this marker from a previous call.)</p> -- * PageSize [PageSize] <p>The maximum number of results to return with this call.</p> -- * ListenerArn [ListenerArn] <p>The Amazon Resource Names (ARN) of the listener.</p> -- Required key: ListenerArn -- @return DescribeListenerCertificatesInput structure as a key-value pair table function M.DescribeListenerCertificatesInput(args) assert(args, "You must provide an argument table when creating DescribeListenerCertificatesInput") local query_args = { } local uri_args = { } local header_args = { } local all_args = { ["Marker"] = args["Marker"], ["PageSize"] = args["PageSize"], ["ListenerArn"] = args["ListenerArn"], } asserts.AssertDescribeListenerCertificatesInput(all_args) return { all = all_args, query = query_args, uri = uri_args, headers = header_args, } end keys.InvalidSchemeException = { nil } function asserts.AssertInvalidSchemeException(struct) assert(struct) assert(type(struct) == "table", "Expected InvalidSchemeException to be of type 'table'") for k,_ in pairs(struct) do assert(keys.InvalidSchemeException[k], "InvalidSchemeException contains unknown key " .. tostring(k)) end end --- Create a structure of type InvalidSchemeException -- <p>The requested scheme is not valid.</p> -- @param args Table with arguments in key-value form. -- Valid keys: -- @return InvalidSchemeException structure as a key-value pair table function M.InvalidSchemeException(args) assert(args, "You must provide an argument table when creating InvalidSchemeException") local query_args = { } local uri_args = { } local header_args = { } local all_args = { } asserts.AssertInvalidSchemeException(all_args) return { all = all_args, query = query_args, uri = uri_args, headers = header_args, } end keys.TooManyLoadBalancersException = { nil } function asserts.AssertTooManyLoadBalancersException(struct) assert(struct) assert(type(struct) == "table", "Expected TooManyLoadBalancersException to be of type 'table'") for k,_ in pairs(struct) do assert(keys.TooManyLoadBalancersException[k], "TooManyLoadBalancersException contains unknown key " .. tostring(k)) end end --- Create a structure of type TooManyLoadBalancersException -- <p>You've reached the limit on the number of load balancers for your AWS account.</p> -- @param args Table with arguments in key-value form. -- Valid keys: -- @return TooManyLoadBalancersException structure as a key-value pair table function M.TooManyLoadBalancersException(args) assert(args, "You must provide an argument table when creating TooManyLoadBalancersException") local query_args = { } local uri_args = { } local header_args = { } local all_args = { } asserts.AssertTooManyLoadBalancersException(all_args) return { all = all_args, query = query_args, uri = uri_args, headers = header_args, } end keys.AllocationIdNotFoundException = { nil } function asserts.AssertAllocationIdNotFoundException(struct) assert(struct) assert(type(struct) == "table", "Expected AllocationIdNotFoundException to be of type 'table'") for k,_ in pairs(struct) do assert(keys.AllocationIdNotFoundException[k], "AllocationIdNotFoundException contains unknown key " .. tostring(k)) end end --- Create a structure of type AllocationIdNotFoundException -- <p>The specified allocation ID does not exist.</p> -- @param args Table with arguments in key-value form. -- Valid keys: -- @return AllocationIdNotFoundException structure as a key-value pair table function M.AllocationIdNotFoundException(args) assert(args, "You must provide an argument table when creating AllocationIdNotFoundException") local query_args = { } local uri_args = { } local header_args = { } local all_args = { } asserts.AssertAllocationIdNotFoundException(all_args) return { all = all_args, query = query_args, uri = uri_args, headers = header_args, } end keys.Listener = { ["Protocol"] = true, ["DefaultActions"] = true, ["SslPolicy"] = true, ["Certificates"] = true, ["LoadBalancerArn"] = true, ["Port"] = true, ["ListenerArn"] = true, nil } function asserts.AssertListener(struct) assert(struct) assert(type(struct) == "table", "Expected Listener to be of type 'table'") if struct["Protocol"] then asserts.AssertProtocolEnum(struct["Protocol"]) end if struct["DefaultActions"] then asserts.AssertActions(struct["DefaultActions"]) end if struct["SslPolicy"] then asserts.AssertSslPolicyName(struct["SslPolicy"]) end if struct["Certificates"] then asserts.AssertCertificateList(struct["Certificates"]) end if struct["LoadBalancerArn"] then asserts.AssertLoadBalancerArn(struct["LoadBalancerArn"]) end if struct["Port"] then asserts.AssertPort(struct["Port"]) end if struct["ListenerArn"] then asserts.AssertListenerArn(struct["ListenerArn"]) end for k,_ in pairs(struct) do assert(keys.Listener[k], "Listener contains unknown key " .. tostring(k)) end end --- Create a structure of type Listener -- <p>Information about a listener.</p> -- @param args Table with arguments in key-value form. -- Valid keys: -- * Protocol [ProtocolEnum] <p>The protocol for connections from clients to the load balancer.</p> -- * DefaultActions [Actions] <p>The default actions for the listener.</p> -- * SslPolicy [SslPolicyName] <p>The security policy that defines which ciphers and protocols are supported. The default is the current predefined security policy.</p> -- * Certificates [CertificateList] <p>The SSL server certificate. You must provide a certificate if the protocol is HTTPS.</p> -- * LoadBalancerArn [LoadBalancerArn] <p>The Amazon Resource Name (ARN) of the load balancer.</p> -- * Port [Port] <p>The port on which the load balancer is listening.</p> -- * ListenerArn [ListenerArn] <p>The Amazon Resource Name (ARN) of the listener.</p> -- @return Listener structure as a key-value pair table function M.Listener(args) assert(args, "You must provide an argument table when creating Listener") local query_args = { } local uri_args = { } local header_args = { } local all_args = { ["Protocol"] = args["Protocol"], ["DefaultActions"] = args["DefaultActions"], ["SslPolicy"] = args["SslPolicy"], ["Certificates"] = args["Certificates"], ["LoadBalancerArn"] = args["LoadBalancerArn"], ["Port"] = args["Port"], ["ListenerArn"] = args["ListenerArn"], } asserts.AssertListener(all_args) return { all = all_args, query = query_args, uri = uri_args, headers = header_args, } end keys.AuthenticateCognitoActionConfig = { ["UserPoolDomain"] = true, ["UserPoolArn"] = true, ["AuthenticationRequestExtraParams"] = true, ["SessionTimeout"] = true, ["Scope"] = true, ["SessionCookieName"] = true, ["UserPoolClientId"] = true, ["OnUnauthenticatedRequest"] = true, nil } function asserts.AssertAuthenticateCognitoActionConfig(struct) assert(struct) assert(type(struct) == "table", "Expected AuthenticateCognitoActionConfig to be of type 'table'") assert(struct["UserPoolArn"], "Expected key UserPoolArn to exist in table") assert(struct["UserPoolClientId"], "Expected key UserPoolClientId to exist in table") assert(struct["UserPoolDomain"], "Expected key UserPoolDomain to exist in table") if struct["UserPoolDomain"] then asserts.AssertAuthenticateCognitoActionUserPoolDomain(struct["UserPoolDomain"]) end if struct["UserPoolArn"] then asserts.AssertAuthenticateCognitoActionUserPoolArn(struct["UserPoolArn"]) end if struct["AuthenticationRequestExtraParams"] then asserts.AssertAuthenticateCognitoActionAuthenticationRequestExtraParams(struct["AuthenticationRequestExtraParams"]) end if struct["SessionTimeout"] then asserts.AssertAuthenticateCognitoActionSessionTimeout(struct["SessionTimeout"]) end if struct["Scope"] then asserts.AssertAuthenticateCognitoActionScope(struct["Scope"]) end if struct["SessionCookieName"] then asserts.AssertAuthenticateCognitoActionSessionCookieName(struct["SessionCookieName"]) end if struct["UserPoolClientId"] then asserts.AssertAuthenticateCognitoActionUserPoolClientId(struct["UserPoolClientId"]) end if struct["OnUnauthenticatedRequest"] then asserts.AssertAuthenticateCognitoActionConditionalBehaviorEnum(struct["OnUnauthenticatedRequest"]) end for k,_ in pairs(struct) do assert(keys.AuthenticateCognitoActionConfig[k], "AuthenticateCognitoActionConfig contains unknown key " .. tostring(k)) end end --- Create a structure of type AuthenticateCognitoActionConfig -- <p>Request parameters to use when integrating with Amazon Cognito to authenticate users.</p> -- @param args Table with arguments in key-value form. -- Valid keys: -- * UserPoolDomain [AuthenticateCognitoActionUserPoolDomain] <p>The domain prefix or fully-qualified domain name of the Amazon Cognito user pool.</p> -- * UserPoolArn [AuthenticateCognitoActionUserPoolArn] <p>The Amazon Resource Name (ARN) of the Amazon Cognito user pool.</p> -- * AuthenticationRequestExtraParams [AuthenticateCognitoActionAuthenticationRequestExtraParams] <p>The query parameters (up to 10) to include in the redirect request to the authorization endpoint.</p> -- * SessionTimeout [AuthenticateCognitoActionSessionTimeout] <p>The maximum duration of the authentication session, in seconds. The default is 604800 seconds (7 days).</p> -- * Scope [AuthenticateCognitoActionScope] <p>The set of user claims to be requested from the IdP. The default is <code>openid</code>.</p> <p>To verify which scope values your IdP supports and how to separate multiple values, see the documentation for your IdP.</p> -- * SessionCookieName [AuthenticateCognitoActionSessionCookieName] <p>The name of the cookie used to maintain session information. The default is AWSELBAuthSessionCookie.</p> -- * UserPoolClientId [AuthenticateCognitoActionUserPoolClientId] <p>The ID of the Amazon Cognito user pool client.</p> -- * OnUnauthenticatedRequest [AuthenticateCognitoActionConditionalBehaviorEnum] <p>The behavior if the user is not authenticated. The following are possible values:</p> <ul> <li> <p>deny<code/> - Return an HTTP 401 Unauthorized error.</p> </li> <li> <p>allow<code/> - Allow the request to be forwarded to the target.</p> </li> <li> <p>authenticate<code/> - Redirect the request to the IdP authorization endpoint. This is the default value.</p> </li> </ul> -- Required key: UserPoolArn -- Required key: UserPoolClientId -- Required key: UserPoolDomain -- @return AuthenticateCognitoActionConfig structure as a key-value pair table function M.AuthenticateCognitoActionConfig(args) assert(args, "You must provide an argument table when creating AuthenticateCognitoActionConfig") local query_args = { } local uri_args = { } local header_args = { } local all_args = { ["UserPoolDomain"] = args["UserPoolDomain"], ["UserPoolArn"] = args["UserPoolArn"], ["AuthenticationRequestExtraParams"] = args["AuthenticationRequestExtraParams"], ["SessionTimeout"] = args["SessionTimeout"], ["Scope"] = args["Scope"], ["SessionCookieName"] = args["SessionCookieName"], ["UserPoolClientId"] = args["UserPoolClientId"], ["OnUnauthenticatedRequest"] = args["OnUnauthenticatedRequest"], } asserts.AssertAuthenticateCognitoActionConfig(all_args) return { all = all_args, query = query_args, uri = uri_args, headers = header_args, } end keys.TooManyRulesException = { nil } function asserts.AssertTooManyRulesException(struct) assert(struct) assert(type(struct) == "table", "Expected TooManyRulesException to be of type 'table'") for k,_ in pairs(struct) do assert(keys.TooManyRulesException[k], "TooManyRulesException contains unknown key " .. tostring(k)) end end --- Create a structure of type TooManyRulesException -- <p>You've reached the limit on the number of rules per load balancer.</p> -- @param args Table with arguments in key-value form. -- Valid keys: -- @return TooManyRulesException structure as a key-value pair table function M.TooManyRulesException(args) assert(args, "You must provide an argument table when creating TooManyRulesException") local query_args = { } local uri_args = { } local header_args = { } local all_args = { } asserts.AssertTooManyRulesException(all_args) return { all = all_args, query = query_args, uri = uri_args, headers = header_args, } end keys.TargetHealth = { ["State"] = true, ["Reason"] = true, ["Description"] = true, nil } function asserts.AssertTargetHealth(struct) assert(struct) assert(type(struct) == "table", "Expected TargetHealth to be of type 'table'") if struct["State"] then asserts.AssertTargetHealthStateEnum(struct["State"]) end if struct["Reason"] then asserts.AssertTargetHealthReasonEnum(struct["Reason"]) end if struct["Description"] then asserts.AssertDescription(struct["Description"]) end for k,_ in pairs(struct) do assert(keys.TargetHealth[k], "TargetHealth contains unknown key " .. tostring(k)) end end --- Create a structure of type TargetHealth -- <p>Information about the current health of a target.</p> -- @param args Table with arguments in key-value form. -- Valid keys: -- * State [TargetHealthStateEnum] <p>The state of the target.</p> -- * Reason [TargetHealthReasonEnum] <p>The reason code. If the target state is <code>healthy</code>, a reason code is not provided.</p> <p>If the target state is <code>initial</code>, the reason code can be one of the following values:</p> <ul> <li> <p> <code>Elb.RegistrationInProgress</code> - The target is in the process of being registered with the load balancer.</p> </li> <li> <p> <code>Elb.InitialHealthChecking</code> - The load balancer is still sending the target the minimum number of health checks required to determine its health status.</p> </li> </ul> <p>If the target state is <code>unhealthy</code>, the reason code can be one of the following values:</p> <ul> <li> <p> <code>Target.ResponseCodeMismatch</code> - The health checks did not return an expected HTTP code.</p> </li> <li> <p> <code>Target.Timeout</code> - The health check requests timed out.</p> </li> <li> <p> <code>Target.FailedHealthChecks</code> - The health checks failed because the connection to the target timed out, the target response was malformed, or the target failed the health check for an unknown reason.</p> </li> <li> <p> <code>Elb.InternalError</code> - The health checks failed due to an internal error.</p> </li> </ul> <p>If the target state is <code>unused</code>, the reason code can be one of the following values:</p> <ul> <li> <p> <code>Target.NotRegistered</code> - The target is not registered with the target group.</p> </li> <li> <p> <code>Target.NotInUse</code> - The target group is not used by any load balancer or the target is in an Availability Zone that is not enabled for its load balancer.</p> </li> <li> <p> <code>Target.IpUnusable</code> - The target IP address is reserved for use by a load balancer.</p> </li> <li> <p> <code>Target.InvalidState</code> - The target is in the stopped or terminated state.</p> </li> </ul> <p>If the target state is <code>draining</code>, the reason code can be the following value:</p> <ul> <li> <p> <code>Target.DeregistrationInProgress</code> - The target is in the process of being deregistered and the deregistration delay period has not expired.</p> </li> </ul> -- * Description [Description] <p>A description of the target health that provides additional details. If the state is <code>healthy</code>, a description is not provided.</p> -- @return TargetHealth structure as a key-value pair table function M.TargetHealth(args) assert(args, "You must provide an argument table when creating TargetHealth") local query_args = { } local uri_args = { } local header_args = { } local all_args = { ["State"] = args["State"], ["Reason"] = args["Reason"], ["Description"] = args["Description"], } asserts.AssertTargetHealth(all_args) return { all = all_args, query = query_args, uri = uri_args, headers = header_args, } end keys.DescribeLoadBalancerAttributesInput = { ["LoadBalancerArn"] = true, nil } function asserts.AssertDescribeLoadBalancerAttributesInput(struct) assert(struct) assert(type(struct) == "table", "Expected DescribeLoadBalancerAttributesInput to be of type 'table'") assert(struct["LoadBalancerArn"], "Expected key LoadBalancerArn to exist in table") if struct["LoadBalancerArn"] then asserts.AssertLoadBalancerArn(struct["LoadBalancerArn"]) end for k,_ in pairs(struct) do assert(keys.DescribeLoadBalancerAttributesInput[k], "DescribeLoadBalancerAttributesInput contains unknown key " .. tostring(k)) end end --- Create a structure of type DescribeLoadBalancerAttributesInput -- -- @param args Table with arguments in key-value form. -- Valid keys: -- * LoadBalancerArn [LoadBalancerArn] <p>The Amazon Resource Name (ARN) of the load balancer.</p> -- Required key: LoadBalancerArn -- @return DescribeLoadBalancerAttributesInput structure as a key-value pair table function M.DescribeLoadBalancerAttributesInput(args) assert(args, "You must provide an argument table when creating DescribeLoadBalancerAttributesInput") local query_args = { } local uri_args = { } local header_args = { } local all_args = { ["LoadBalancerArn"] = args["LoadBalancerArn"], } asserts.AssertDescribeLoadBalancerAttributesInput(all_args) return { all = all_args, query = query_args, uri = uri_args, headers = header_args, } end keys.UnsupportedProtocolException = { nil } function asserts.AssertUnsupportedProtocolException(struct) assert(struct) assert(type(struct) == "table", "Expected UnsupportedProtocolException to be of type 'table'") for k,_ in pairs(struct) do assert(keys.UnsupportedProtocolException[k], "UnsupportedProtocolException contains unknown key " .. tostring(k)) end end --- Create a structure of type UnsupportedProtocolException -- <p>The specified protocol is not supported.</p> -- @param args Table with arguments in key-value form. -- Valid keys: -- @return UnsupportedProtocolException structure as a key-value pair table function M.UnsupportedProtocolException(args) assert(args, "You must provide an argument table when creating UnsupportedProtocolException") local query_args = { } local uri_args = { } local header_args = { } local all_args = { } asserts.AssertUnsupportedProtocolException(all_args) return { all = all_args, query = query_args, uri = uri_args, headers = header_args, } end keys.ModifyRuleOutput = { ["Rules"] = true, nil } function asserts.AssertModifyRuleOutput(struct) assert(struct) assert(type(struct) == "table", "Expected ModifyRuleOutput to be of type 'table'") if struct["Rules"] then asserts.AssertRules(struct["Rules"]) end for k,_ in pairs(struct) do assert(keys.ModifyRuleOutput[k], "ModifyRuleOutput contains unknown key " .. tostring(k)) end end --- Create a structure of type ModifyRuleOutput -- -- @param args Table with arguments in key-value form. -- Valid keys: -- * Rules [Rules] <p>Information about the modified rule.</p> -- @return ModifyRuleOutput structure as a key-value pair table function M.ModifyRuleOutput(args) assert(args, "You must provide an argument table when creating ModifyRuleOutput") local query_args = { } local uri_args = { } local header_args = { } local all_args = { ["Rules"] = args["Rules"], } asserts.AssertModifyRuleOutput(all_args) return { all = all_args, query = query_args, uri = uri_args, headers = header_args, } end keys.RemoveListenerCertificatesInput = { ["Certificates"] = true, ["ListenerArn"] = true, nil } function asserts.AssertRemoveListenerCertificatesInput(struct) assert(struct) assert(type(struct) == "table", "Expected RemoveListenerCertificatesInput to be of type 'table'") assert(struct["ListenerArn"], "Expected key ListenerArn to exist in table") assert(struct["Certificates"], "Expected key Certificates to exist in table") if struct["Certificates"] then asserts.AssertCertificateList(struct["Certificates"]) end if struct["ListenerArn"] then asserts.AssertListenerArn(struct["ListenerArn"]) end for k,_ in pairs(struct) do assert(keys.RemoveListenerCertificatesInput[k], "RemoveListenerCertificatesInput contains unknown key " .. tostring(k)) end end --- Create a structure of type RemoveListenerCertificatesInput -- -- @param args Table with arguments in key-value form. -- Valid keys: -- * Certificates [CertificateList] <p>The certificate to remove. You can specify one certificate per call.</p> -- * ListenerArn [ListenerArn] <p>The Amazon Resource Name (ARN) of the listener.</p> -- Required key: ListenerArn -- Required key: Certificates -- @return RemoveListenerCertificatesInput structure as a key-value pair table function M.RemoveListenerCertificatesInput(args) assert(args, "You must provide an argument table when creating RemoveListenerCertificatesInput") local query_args = { } local uri_args = { } local header_args = { } local all_args = { ["Certificates"] = args["Certificates"], ["ListenerArn"] = args["ListenerArn"], } asserts.AssertRemoveListenerCertificatesInput(all_args) return { all = all_args, query = query_args, uri = uri_args, headers = header_args, } end keys.DeleteRuleOutput = { nil } function asserts.AssertDeleteRuleOutput(struct) assert(struct) assert(type(struct) == "table", "Expected DeleteRuleOutput to be of type 'table'") for k,_ in pairs(struct) do assert(keys.DeleteRuleOutput[k], "DeleteRuleOutput contains unknown key " .. tostring(k)) end end --- Create a structure of type DeleteRuleOutput -- -- @param args Table with arguments in key-value form. -- Valid keys: -- @return DeleteRuleOutput structure as a key-value pair table function M.DeleteRuleOutput(args) assert(args, "You must provide an argument table when creating DeleteRuleOutput") local query_args = { } local uri_args = { } local header_args = { } local all_args = { } asserts.AssertDeleteRuleOutput(all_args) return { all = all_args, query = query_args, uri = uri_args, headers = header_args, } end keys.AvailabilityZone = { ["SubnetId"] = true, ["LoadBalancerAddresses"] = true, ["ZoneName"] = true, nil } function asserts.AssertAvailabilityZone(struct) assert(struct) assert(type(struct) == "table", "Expected AvailabilityZone to be of type 'table'") if struct["SubnetId"] then asserts.AssertSubnetId(struct["SubnetId"]) end if struct["LoadBalancerAddresses"] then asserts.AssertLoadBalancerAddresses(struct["LoadBalancerAddresses"]) end if struct["ZoneName"] then asserts.AssertZoneName(struct["ZoneName"]) end for k,_ in pairs(struct) do assert(keys.AvailabilityZone[k], "AvailabilityZone contains unknown key " .. tostring(k)) end end --- Create a structure of type AvailabilityZone -- <p>Information about an Availability Zone.</p> -- @param args Table with arguments in key-value form. -- Valid keys: -- * SubnetId [SubnetId] <p>The ID of the subnet.</p> -- * LoadBalancerAddresses [LoadBalancerAddresses] <p>[Network Load Balancers] The static IP address.</p> -- * ZoneName [ZoneName] <p>The name of the Availability Zone.</p> -- @return AvailabilityZone structure as a key-value pair table function M.AvailabilityZone(args) assert(args, "You must provide an argument table when creating AvailabilityZone") local query_args = { } local uri_args = { } local header_args = { } local all_args = { ["SubnetId"] = args["SubnetId"], ["LoadBalancerAddresses"] = args["LoadBalancerAddresses"], ["ZoneName"] = args["ZoneName"], } asserts.AssertAvailabilityZone(all_args) return { all = all_args, query = query_args, uri = uri_args, headers = header_args, } end keys.TooManyRegistrationsForTargetIdException = { nil } function asserts.AssertTooManyRegistrationsForTargetIdException(struct) assert(struct) assert(type(struct) == "table", "Expected TooManyRegistrationsForTargetIdException to be of type 'table'") for k,_ in pairs(struct) do assert(keys.TooManyRegistrationsForTargetIdException[k], "TooManyRegistrationsForTargetIdException contains unknown key " .. tostring(k)) end end --- Create a structure of type TooManyRegistrationsForTargetIdException -- <p>You've reached the limit on the number of times a target can be registered with a load balancer.</p> -- @param args Table with arguments in key-value form. -- Valid keys: -- @return TooManyRegistrationsForTargetIdException structure as a key-value pair table function M.TooManyRegistrationsForTargetIdException(args) assert(args, "You must provide an argument table when creating TooManyRegistrationsForTargetIdException") local query_args = { } local uri_args = { } local header_args = { } local all_args = { } asserts.AssertTooManyRegistrationsForTargetIdException(all_args) return { all = all_args, query = query_args, uri = uri_args, headers = header_args, } end keys.ResourceInUseException = { nil } function asserts.AssertResourceInUseException(struct) assert(struct) assert(type(struct) == "table", "Expected ResourceInUseException to be of type 'table'") for k,_ in pairs(struct) do assert(keys.ResourceInUseException[k], "ResourceInUseException contains unknown key " .. tostring(k)) end end --- Create a structure of type ResourceInUseException -- <p>A specified resource is in use.</p> -- @param args Table with arguments in key-value form. -- Valid keys: -- @return ResourceInUseException structure as a key-value pair table function M.ResourceInUseException(args) assert(args, "You must provide an argument table when creating ResourceInUseException") local query_args = { } local uri_args = { } local header_args = { } local all_args = { } asserts.AssertResourceInUseException(all_args) return { all = all_args, query = query_args, uri = uri_args, headers = header_args, } end keys.DescribeLoadBalancersOutput = { ["LoadBalancers"] = true, ["NextMarker"] = true, nil } function asserts.AssertDescribeLoadBalancersOutput(struct) assert(struct) assert(type(struct) == "table", "Expected DescribeLoadBalancersOutput to be of type 'table'") if struct["LoadBalancers"] then asserts.AssertLoadBalancers(struct["LoadBalancers"]) end if struct["NextMarker"] then asserts.AssertMarker(struct["NextMarker"]) end for k,_ in pairs(struct) do assert(keys.DescribeLoadBalancersOutput[k], "DescribeLoadBalancersOutput contains unknown key " .. tostring(k)) end end --- Create a structure of type DescribeLoadBalancersOutput -- -- @param args Table with arguments in key-value form. -- Valid keys: -- * LoadBalancers [LoadBalancers] <p>Information about the load balancers.</p> -- * NextMarker [Marker] <p>The marker to use when requesting the next set of results. If there are no additional results, the string is empty.</p> -- @return DescribeLoadBalancersOutput structure as a key-value pair table function M.DescribeLoadBalancersOutput(args) assert(args, "You must provide an argument table when creating DescribeLoadBalancersOutput") local query_args = { } local uri_args = { } local header_args = { } local all_args = { ["LoadBalancers"] = args["LoadBalancers"], ["NextMarker"] = args["NextMarker"], } asserts.AssertDescribeLoadBalancersOutput(all_args) return { all = all_args, query = query_args, uri = uri_args, headers = header_args, } end keys.IncompatibleProtocolsException = { nil } function asserts.AssertIncompatibleProtocolsException(struct) assert(struct) assert(type(struct) == "table", "Expected IncompatibleProtocolsException to be of type 'table'") for k,_ in pairs(struct) do assert(keys.IncompatibleProtocolsException[k], "IncompatibleProtocolsException contains unknown key " .. tostring(k)) end end --- Create a structure of type IncompatibleProtocolsException -- <p>The specified configuration is not valid with this protocol.</p> -- @param args Table with arguments in key-value form. -- Valid keys: -- @return IncompatibleProtocolsException structure as a key-value pair table function M.IncompatibleProtocolsException(args) assert(args, "You must provide an argument table when creating IncompatibleProtocolsException") local query_args = { } local uri_args = { } local header_args = { } local all_args = { } asserts.AssertIncompatibleProtocolsException(all_args) return { all = all_args, query = query_args, uri = uri_args, headers = header_args, } end keys.RemoveTagsOutput = { nil } function asserts.AssertRemoveTagsOutput(struct) assert(struct) assert(type(struct) == "table", "Expected RemoveTagsOutput to be of type 'table'") for k,_ in pairs(struct) do assert(keys.RemoveTagsOutput[k], "RemoveTagsOutput contains unknown key " .. tostring(k)) end end --- Create a structure of type RemoveTagsOutput -- -- @param args Table with arguments in key-value form. -- Valid keys: -- @return RemoveTagsOutput structure as a key-value pair table function M.RemoveTagsOutput(args) assert(args, "You must provide an argument table when creating RemoveTagsOutput") local query_args = { } local uri_args = { } local header_args = { } local all_args = { } asserts.AssertRemoveTagsOutput(all_args) return { all = all_args, query = query_args, uri = uri_args, headers = header_args, } end keys.TooManyTargetGroupsException = { nil } function asserts.AssertTooManyTargetGroupsException(struct) assert(struct) assert(type(struct) == "table", "Expected TooManyTargetGroupsException to be of type 'table'") for k,_ in pairs(struct) do assert(keys.TooManyTargetGroupsException[k], "TooManyTargetGroupsException contains unknown key " .. tostring(k)) end end --- Create a structure of type TooManyTargetGroupsException -- <p>You've reached the limit on the number of target groups for your AWS account.</p> -- @param args Table with arguments in key-value form. -- Valid keys: -- @return TooManyTargetGroupsException structure as a key-value pair table function M.TooManyTargetGroupsException(args) assert(args, "You must provide an argument table when creating TooManyTargetGroupsException") local query_args = { } local uri_args = { } local header_args = { } local all_args = { } asserts.AssertTooManyTargetGroupsException(all_args) return { all = all_args, query = query_args, uri = uri_args, headers = header_args, } end keys.TargetGroupNotFoundException = { nil } function asserts.AssertTargetGroupNotFoundException(struct) assert(struct) assert(type(struct) == "table", "Expected TargetGroupNotFoundException to be of type 'table'") for k,_ in pairs(struct) do assert(keys.TargetGroupNotFoundException[k], "TargetGroupNotFoundException contains unknown key " .. tostring(k)) end end --- Create a structure of type TargetGroupNotFoundException -- <p>The specified target group does not exist.</p> -- @param args Table with arguments in key-value form. -- Valid keys: -- @return TargetGroupNotFoundException structure as a key-value pair table function M.TargetGroupNotFoundException(args) assert(args, "You must provide an argument table when creating TargetGroupNotFoundException") local query_args = { } local uri_args = { } local header_args = { } local all_args = { } asserts.AssertTargetGroupNotFoundException(all_args) return { all = all_args, query = query_args, uri = uri_args, headers = header_args, } end keys.CreateLoadBalancerOutput = { ["LoadBalancers"] = true, nil } function asserts.AssertCreateLoadBalancerOutput(struct) assert(struct) assert(type(struct) == "table", "Expected CreateLoadBalancerOutput to be of type 'table'") if struct["LoadBalancers"] then asserts.AssertLoadBalancers(struct["LoadBalancers"]) end for k,_ in pairs(struct) do assert(keys.CreateLoadBalancerOutput[k], "CreateLoadBalancerOutput contains unknown key " .. tostring(k)) end end --- Create a structure of type CreateLoadBalancerOutput -- -- @param args Table with arguments in key-value form. -- Valid keys: -- * LoadBalancers [LoadBalancers] <p>Information about the load balancer.</p> -- @return CreateLoadBalancerOutput structure as a key-value pair table function M.CreateLoadBalancerOutput(args) assert(args, "You must provide an argument table when creating CreateLoadBalancerOutput") local query_args = { } local uri_args = { } local header_args = { } local all_args = { ["LoadBalancers"] = args["LoadBalancers"], } asserts.AssertCreateLoadBalancerOutput(all_args) return { all = all_args, query = query_args, uri = uri_args, headers = header_args, } end keys.DescribeTargetHealthInput = { ["TargetGroupArn"] = true, ["Targets"] = true, nil } function asserts.AssertDescribeTargetHealthInput(struct) assert(struct) assert(type(struct) == "table", "Expected DescribeTargetHealthInput to be of type 'table'") assert(struct["TargetGroupArn"], "Expected key TargetGroupArn to exist in table") if struct["TargetGroupArn"] then asserts.AssertTargetGroupArn(struct["TargetGroupArn"]) end if struct["Targets"] then asserts.AssertTargetDescriptions(struct["Targets"]) end for k,_ in pairs(struct) do assert(keys.DescribeTargetHealthInput[k], "DescribeTargetHealthInput contains unknown key " .. tostring(k)) end end --- Create a structure of type DescribeTargetHealthInput -- -- @param args Table with arguments in key-value form. -- Valid keys: -- * TargetGroupArn [TargetGroupArn] <p>The Amazon Resource Name (ARN) of the target group.</p> -- * Targets [TargetDescriptions] <p>The targets.</p> -- Required key: TargetGroupArn -- @return DescribeTargetHealthInput structure as a key-value pair table function M.DescribeTargetHealthInput(args) assert(args, "You must provide an argument table when creating DescribeTargetHealthInput") local query_args = { } local uri_args = { } local header_args = { } local all_args = { ["TargetGroupArn"] = args["TargetGroupArn"], ["Targets"] = args["Targets"], } asserts.AssertDescribeTargetHealthInput(all_args) return { all = all_args, query = query_args, uri = uri_args, headers = header_args, } end keys.Certificate = { ["CertificateArn"] = true, ["IsDefault"] = true, nil } function asserts.AssertCertificate(struct) assert(struct) assert(type(struct) == "table", "Expected Certificate to be of type 'table'") if struct["CertificateArn"] then asserts.AssertCertificateArn(struct["CertificateArn"]) end if struct["IsDefault"] then asserts.AssertDefault(struct["IsDefault"]) end for k,_ in pairs(struct) do assert(keys.Certificate[k], "Certificate contains unknown key " .. tostring(k)) end end --- Create a structure of type Certificate -- <p>Information about an SSL server certificate.</p> -- @param args Table with arguments in key-value form. -- Valid keys: -- * CertificateArn [CertificateArn] <p>The Amazon Resource Name (ARN) of the certificate.</p> -- * IsDefault [Default] <p>Indicates whether the certificate is the default certificate.</p> -- @return Certificate structure as a key-value pair table function M.Certificate(args) assert(args, "You must provide an argument table when creating Certificate") local query_args = { } local uri_args = { } local header_args = { } local all_args = { ["CertificateArn"] = args["CertificateArn"], ["IsDefault"] = args["IsDefault"], } asserts.AssertCertificate(all_args) return { all = all_args, query = query_args, uri = uri_args, headers = header_args, } end keys.TooManyListenersException = { nil } function asserts.AssertTooManyListenersException(struct) assert(struct) assert(type(struct) == "table", "Expected TooManyListenersException to be of type 'table'") for k,_ in pairs(struct) do assert(keys.TooManyListenersException[k], "TooManyListenersException contains unknown key " .. tostring(k)) end end --- Create a structure of type TooManyListenersException -- <p>You've reached the limit on the number of listeners per load balancer.</p> -- @param args Table with arguments in key-value form. -- Valid keys: -- @return TooManyListenersException structure as a key-value pair table function M.TooManyListenersException(args) assert(args, "You must provide an argument table when creating TooManyListenersException") local query_args = { } local uri_args = { } local header_args = { } local all_args = { } asserts.AssertTooManyListenersException(all_args) return { all = all_args, query = query_args, uri = uri_args, headers = header_args, } end keys.SetSubnetsOutput = { ["AvailabilityZones"] = true, nil } function asserts.AssertSetSubnetsOutput(struct) assert(struct) assert(type(struct) == "table", "Expected SetSubnetsOutput to be of type 'table'") if struct["AvailabilityZones"] then asserts.AssertAvailabilityZones(struct["AvailabilityZones"]) end for k,_ in pairs(struct) do assert(keys.SetSubnetsOutput[k], "SetSubnetsOutput contains unknown key " .. tostring(k)) end end --- Create a structure of type SetSubnetsOutput -- -- @param args Table with arguments in key-value form. -- Valid keys: -- * AvailabilityZones [AvailabilityZones] <p>Information about the subnet and Availability Zone.</p> -- @return SetSubnetsOutput structure as a key-value pair table function M.SetSubnetsOutput(args) assert(args, "You must provide an argument table when creating SetSubnetsOutput") local query_args = { } local uri_args = { } local header_args = { } local all_args = { ["AvailabilityZones"] = args["AvailabilityZones"], } asserts.AssertSetSubnetsOutput(all_args) return { all = all_args, query = query_args, uri = uri_args, headers = header_args, } end keys.TargetHealthDescription = { ["HealthCheckPort"] = true, ["Target"] = true, ["TargetHealth"] = true, nil } function asserts.AssertTargetHealthDescription(struct) assert(struct) assert(type(struct) == "table", "Expected TargetHealthDescription to be of type 'table'") if struct["HealthCheckPort"] then asserts.AssertHealthCheckPort(struct["HealthCheckPort"]) end if struct["Target"] then asserts.AssertTargetDescription(struct["Target"]) end if struct["TargetHealth"] then asserts.AssertTargetHealth(struct["TargetHealth"]) end for k,_ in pairs(struct) do assert(keys.TargetHealthDescription[k], "TargetHealthDescription contains unknown key " .. tostring(k)) end end --- Create a structure of type TargetHealthDescription -- <p>Information about the health of a target.</p> -- @param args Table with arguments in key-value form. -- Valid keys: -- * HealthCheckPort [HealthCheckPort] <p>The port to use to connect with the target.</p> -- * Target [TargetDescription] <p>The description of the target.</p> -- * TargetHealth [TargetHealth] <p>The health information for the target.</p> -- @return TargetHealthDescription structure as a key-value pair table function M.TargetHealthDescription(args) assert(args, "You must provide an argument table when creating TargetHealthDescription") local query_args = { } local uri_args = { } local header_args = { } local all_args = { ["HealthCheckPort"] = args["HealthCheckPort"], ["Target"] = args["Target"], ["TargetHealth"] = args["TargetHealth"], } asserts.AssertTargetHealthDescription(all_args) return { all = all_args, query = query_args, uri = uri_args, headers = header_args, } end keys.DescribeTargetHealthOutput = { ["TargetHealthDescriptions"] = true, nil } function asserts.AssertDescribeTargetHealthOutput(struct) assert(struct) assert(type(struct) == "table", "Expected DescribeTargetHealthOutput to be of type 'table'") if struct["TargetHealthDescriptions"] then asserts.AssertTargetHealthDescriptions(struct["TargetHealthDescriptions"]) end for k,_ in pairs(struct) do assert(keys.DescribeTargetHealthOutput[k], "DescribeTargetHealthOutput contains unknown key " .. tostring(k)) end end --- Create a structure of type DescribeTargetHealthOutput -- -- @param args Table with arguments in key-value form. -- Valid keys: -- * TargetHealthDescriptions [TargetHealthDescriptions] <p>Information about the health of the targets.</p> -- @return DescribeTargetHealthOutput structure as a key-value pair table function M.DescribeTargetHealthOutput(args) assert(args, "You must provide an argument table when creating DescribeTargetHealthOutput") local query_args = { } local uri_args = { } local header_args = { } local all_args = { ["TargetHealthDescriptions"] = args["TargetHealthDescriptions"], } asserts.AssertDescribeTargetHealthOutput(all_args) return { all = all_args, query = query_args, uri = uri_args, headers = header_args, } end keys.DeleteListenerInput = { ["ListenerArn"] = true, nil } function asserts.AssertDeleteListenerInput(struct) assert(struct) assert(type(struct) == "table", "Expected DeleteListenerInput to be of type 'table'") assert(struct["ListenerArn"], "Expected key ListenerArn to exist in table") if struct["ListenerArn"] then asserts.AssertListenerArn(struct["ListenerArn"]) end for k,_ in pairs(struct) do assert(keys.DeleteListenerInput[k], "DeleteListenerInput contains unknown key " .. tostring(k)) end end --- Create a structure of type DeleteListenerInput -- -- @param args Table with arguments in key-value form. -- Valid keys: -- * ListenerArn [ListenerArn] <p>The Amazon Resource Name (ARN) of the listener.</p> -- Required key: ListenerArn -- @return DeleteListenerInput structure as a key-value pair table function M.DeleteListenerInput(args) assert(args, "You must provide an argument table when creating DeleteListenerInput") local query_args = { } local uri_args = { } local header_args = { } local all_args = { ["ListenerArn"] = args["ListenerArn"], } asserts.AssertDeleteListenerInput(all_args) return { all = all_args, query = query_args, uri = uri_args, headers = header_args, } end keys.TargetGroupAttribute = { ["Value"] = true, ["Key"] = true, nil } function asserts.AssertTargetGroupAttribute(struct) assert(struct) assert(type(struct) == "table", "Expected TargetGroupAttribute to be of type 'table'") if struct["Value"] then asserts.AssertTargetGroupAttributeValue(struct["Value"]) end if struct["Key"] then asserts.AssertTargetGroupAttributeKey(struct["Key"]) end for k,_ in pairs(struct) do assert(keys.TargetGroupAttribute[k], "TargetGroupAttribute contains unknown key " .. tostring(k)) end end --- Create a structure of type TargetGroupAttribute -- <p>Information about a target group attribute.</p> -- @param args Table with arguments in key-value form. -- Valid keys: -- * Value [TargetGroupAttributeValue] <p>The value of the attribute.</p> -- * Key [TargetGroupAttributeKey] <p>The name of the attribute.</p> <p>The following attributes are supported by both Application Load Balancers and Network Load Balancers:</p> <ul> <li> <p> <code>deregistration_delay.timeout_seconds</code> - The amount of time, in seconds, for Elastic Load Balancing to wait before changing the state of a deregistering target from <code>draining</code> to <code>unused</code>. The range is 0-3600 seconds. The default value is 300 seconds.</p> </li> </ul> <p>The following attributes are supported by only Application Load Balancers:</p> <ul> <li> <p> <code>slow_start.duration_seconds</code> - The time period, in seconds, during which a newly registered target receives a linearly increasing share of the traffic to the target group. After this time period ends, the target receives its full share of traffic. The range is 30-900 seconds (15 minutes). Slow start mode is disabled by default.</p> </li> <li> <p> <code>stickiness.enabled</code> - Indicates whether sticky sessions are enabled. The value is <code>true</code> or <code>false</code>. The default is <code>false</code>.</p> </li> <li> <p> <code>stickiness.type</code> - The type of sticky sessions. The possible value is <code>lb_cookie</code>.</p> </li> <li> <p> <code>stickiness.lb_cookie.duration_seconds</code> - The time period, in seconds, during which requests from a client should be routed to the same target. After this time period expires, the load balancer-generated cookie is considered stale. The range is 1 second to 1 week (604800 seconds). The default value is 1 day (86400 seconds).</p> </li> </ul> <p>The following attributes are supported by only Network Load Balancers:</p> <ul> <li> <p> <code>proxy_protocol_v2.enabled</code> - Indicates whether Proxy Protocol version 2 is enabled. The value is <code>true</code> or <code>false</code>. The default is <code>false</code>.</p> </li> </ul> -- @return TargetGroupAttribute structure as a key-value pair table function M.TargetGroupAttribute(args) assert(args, "You must provide an argument table when creating TargetGroupAttribute") local query_args = { } local uri_args = { } local header_args = { } local all_args = { ["Value"] = args["Value"], ["Key"] = args["Key"], } asserts.AssertTargetGroupAttribute(all_args) return { all = all_args, query = query_args, uri = uri_args, headers = header_args, } end keys.CreateListenerInput = { ["Protocol"] = true, ["DefaultActions"] = true, ["SslPolicy"] = true, ["Certificates"] = true, ["LoadBalancerArn"] = true, ["Port"] = true, nil } function asserts.AssertCreateListenerInput(struct) assert(struct) assert(type(struct) == "table", "Expected CreateListenerInput to be of type 'table'") assert(struct["LoadBalancerArn"], "Expected key LoadBalancerArn to exist in table") assert(struct["Protocol"], "Expected key Protocol to exist in table") assert(struct["Port"], "Expected key Port to exist in table") assert(struct["DefaultActions"], "Expected key DefaultActions to exist in table") if struct["Protocol"] then asserts.AssertProtocolEnum(struct["Protocol"]) end if struct["DefaultActions"] then asserts.AssertActions(struct["DefaultActions"]) end if struct["SslPolicy"] then asserts.AssertSslPolicyName(struct["SslPolicy"]) end if struct["Certificates"] then asserts.AssertCertificateList(struct["Certificates"]) end if struct["LoadBalancerArn"] then asserts.AssertLoadBalancerArn(struct["LoadBalancerArn"]) end if struct["Port"] then asserts.AssertPort(struct["Port"]) end for k,_ in pairs(struct) do assert(keys.CreateListenerInput[k], "CreateListenerInput contains unknown key " .. tostring(k)) end end --- Create a structure of type CreateListenerInput -- -- @param args Table with arguments in key-value form. -- Valid keys: -- * Protocol [ProtocolEnum] <p>The protocol for connections from clients to the load balancer. For Application Load Balancers, the supported protocols are HTTP and HTTPS. For Network Load Balancers, the supported protocol is TCP.</p> -- * DefaultActions [Actions] <p>The actions for the default rule. The rule must include one forward action or one or more fixed-response actions.</p> <p>If the action type is <code>forward</code>, you can specify a single target group. The protocol of the target group must be HTTP or HTTPS for an Application Load Balancer or TCP for a Network Load Balancer.</p> <p>[HTTPS listener] If the action type is <code>authenticate-oidc</code>, you can use an identity provider that is OpenID Connect (OIDC) compliant to authenticate users as they access your application.</p> <p>[HTTPS listener] If the action type is <code>authenticate-cognito</code>, you can use Amazon Cognito to authenticate users as they access your application.</p> <p>[Application Load Balancer] If the action type is <code>redirect</code>, you can redirect HTTP and HTTPS requests.</p> <p>[Application Load Balancer] If the action type is <code>fixed-response</code>, you can return a custom HTTP response.</p> -- * SslPolicy [SslPolicyName] <p>[HTTPS listeners] The security policy that defines which ciphers and protocols are supported. The default is the current predefined security policy.</p> -- * Certificates [CertificateList] <p>[HTTPS listeners] The default SSL server certificate. You must provide exactly one default certificate. To create a certificate list, use <a>AddListenerCertificates</a>.</p> -- * LoadBalancerArn [LoadBalancerArn] <p>The Amazon Resource Name (ARN) of the load balancer.</p> -- * Port [Port] <p>The port on which the load balancer is listening.</p> -- Required key: LoadBalancerArn -- Required key: Protocol -- Required key: Port -- Required key: DefaultActions -- @return CreateListenerInput structure as a key-value pair table function M.CreateListenerInput(args) assert(args, "You must provide an argument table when creating CreateListenerInput") local query_args = { } local uri_args = { } local header_args = { } local all_args = { ["Protocol"] = args["Protocol"], ["DefaultActions"] = args["DefaultActions"], ["SslPolicy"] = args["SslPolicy"], ["Certificates"] = args["Certificates"], ["LoadBalancerArn"] = args["LoadBalancerArn"], ["Port"] = args["Port"], } asserts.AssertCreateListenerInput(all_args) return { all = all_args, query = query_args, uri = uri_args, headers = header_args, } end keys.CreateTargetGroupInput = { ["HealthyThresholdCount"] = true, ["HealthCheckIntervalSeconds"] = true, ["VpcId"] = true, ["Protocol"] = true, ["Name"] = true, ["TargetType"] = true, ["HealthCheckProtocol"] = true, ["UnhealthyThresholdCount"] = true, ["HealthCheckPath"] = true, ["HealthCheckTimeoutSeconds"] = true, ["Matcher"] = true, ["HealthCheckPort"] = true, ["Port"] = true, nil } function asserts.AssertCreateTargetGroupInput(struct) assert(struct) assert(type(struct) == "table", "Expected CreateTargetGroupInput to be of type 'table'") assert(struct["Name"], "Expected key Name to exist in table") assert(struct["Protocol"], "Expected key Protocol to exist in table") assert(struct["Port"], "Expected key Port to exist in table") assert(struct["VpcId"], "Expected key VpcId to exist in table") if struct["HealthyThresholdCount"] then asserts.AssertHealthCheckThresholdCount(struct["HealthyThresholdCount"]) end if struct["HealthCheckIntervalSeconds"] then asserts.AssertHealthCheckIntervalSeconds(struct["HealthCheckIntervalSeconds"]) end if struct["VpcId"] then asserts.AssertVpcId(struct["VpcId"]) end if struct["Protocol"] then asserts.AssertProtocolEnum(struct["Protocol"]) end if struct["Name"] then asserts.AssertTargetGroupName(struct["Name"]) end if struct["TargetType"] then asserts.AssertTargetTypeEnum(struct["TargetType"]) end if struct["HealthCheckProtocol"] then asserts.AssertProtocolEnum(struct["HealthCheckProtocol"]) end if struct["UnhealthyThresholdCount"] then asserts.AssertHealthCheckThresholdCount(struct["UnhealthyThresholdCount"]) end if struct["HealthCheckPath"] then asserts.AssertPath(struct["HealthCheckPath"]) end if struct["HealthCheckTimeoutSeconds"] then asserts.AssertHealthCheckTimeoutSeconds(struct["HealthCheckTimeoutSeconds"]) end if struct["Matcher"] then asserts.AssertMatcher(struct["Matcher"]) end if struct["HealthCheckPort"] then asserts.AssertHealthCheckPort(struct["HealthCheckPort"]) end if struct["Port"] then asserts.AssertPort(struct["Port"]) end for k,_ in pairs(struct) do assert(keys.CreateTargetGroupInput[k], "CreateTargetGroupInput contains unknown key " .. tostring(k)) end end --- Create a structure of type CreateTargetGroupInput -- -- @param args Table with arguments in key-value form. -- Valid keys: -- * HealthyThresholdCount [HealthCheckThresholdCount] <p>The number of consecutive health checks successes required before considering an unhealthy target healthy. For Application Load Balancers, the default is 5. For Network Load Balancers, the default is 3.</p> -- * HealthCheckIntervalSeconds [HealthCheckIntervalSeconds] <p>The approximate amount of time, in seconds, between health checks of an individual target. For Application Load Balancers, the range is 5–300 seconds. For Network Load Balancers, the supported values are 10 or 30 seconds. The default is 30 seconds.</p> -- * VpcId [VpcId] <p>The identifier of the virtual private cloud (VPC).</p> -- * Protocol [ProtocolEnum] <p>The protocol to use for routing traffic to the targets. For Application Load Balancers, the supported protocols are HTTP and HTTPS. For Network Load Balancers, the supported protocol is TCP.</p> -- * Name [TargetGroupName] <p>The name of the target group.</p> <p>This name must be unique per region per account, can have a maximum of 32 characters, must contain only alphanumeric characters or hyphens, and must not begin or end with a hyphen.</p> -- * TargetType [TargetTypeEnum] <p>The type of target that you must specify when registering targets with this target group. The possible values are <code>instance</code> (targets are specified by instance ID) or <code>ip</code> (targets are specified by IP address). The default is <code>instance</code>. You can't specify targets for a target group using both instance IDs and IP addresses.</p> <p>If the target type is <code>ip</code>, specify IP addresses from the subnets of the virtual private cloud (VPC) for the target group, the RFC 1918 range (10.0.0.0/8, 172.16.0.0/12, and 192.168.0.0/16), and the RFC 6598 range (100.64.0.0/10). You can't specify publicly routable IP addresses.</p> -- * HealthCheckProtocol [ProtocolEnum] <p>The protocol the load balancer uses when performing health checks on targets. The TCP protocol is supported only if the protocol of the target group is TCP. For Application Load Balancers, the default is HTTP. For Network Load Balancers, the default is TCP.</p> -- * UnhealthyThresholdCount [HealthCheckThresholdCount] <p>The number of consecutive health check failures required before considering a target unhealthy. For Application Load Balancers, the default is 2. For Network Load Balancers, this value must be the same as the healthy threshold count.</p> -- * HealthCheckPath [Path] <p>[HTTP/HTTPS health checks] The ping path that is the destination on the targets for health checks. The default is /.</p> -- * HealthCheckTimeoutSeconds [HealthCheckTimeoutSeconds] <p>The amount of time, in seconds, during which no response from a target means a failed health check. For Application Load Balancers, the range is 2–60 seconds and the default is 5 seconds. For Network Load Balancers, this is 10 seconds for TCP and HTTPS health checks and 6 seconds for HTTP health checks.</p> -- * Matcher [Matcher] <p>[HTTP/HTTPS health checks] The HTTP codes to use when checking for a successful response from a target.</p> -- * HealthCheckPort [HealthCheckPort] <p>The port the load balancer uses when performing health checks on targets. The default is <code>traffic-port</code>, which is the port on which each target receives traffic from the load balancer.</p> -- * Port [Port] <p>The port on which the targets receive traffic. This port is used unless you specify a port override when registering the target.</p> -- Required key: Name -- Required key: Protocol -- Required key: Port -- Required key: VpcId -- @return CreateTargetGroupInput structure as a key-value pair table function M.CreateTargetGroupInput(args) assert(args, "You must provide an argument table when creating CreateTargetGroupInput") local query_args = { } local uri_args = { } local header_args = { } local all_args = { ["HealthyThresholdCount"] = args["HealthyThresholdCount"], ["HealthCheckIntervalSeconds"] = args["HealthCheckIntervalSeconds"], ["VpcId"] = args["VpcId"], ["Protocol"] = args["Protocol"], ["Name"] = args["Name"], ["TargetType"] = args["TargetType"], ["HealthCheckProtocol"] = args["HealthCheckProtocol"], ["UnhealthyThresholdCount"] = args["UnhealthyThresholdCount"], ["HealthCheckPath"] = args["HealthCheckPath"], ["HealthCheckTimeoutSeconds"] = args["HealthCheckTimeoutSeconds"], ["Matcher"] = args["Matcher"], ["HealthCheckPort"] = args["HealthCheckPort"], ["Port"] = args["Port"], } asserts.AssertCreateTargetGroupInput(all_args) return { all = all_args, query = query_args, uri = uri_args, headers = header_args, } end keys.ModifyLoadBalancerAttributesOutput = { ["Attributes"] = true, nil } function asserts.AssertModifyLoadBalancerAttributesOutput(struct) assert(struct) assert(type(struct) == "table", "Expected ModifyLoadBalancerAttributesOutput to be of type 'table'") if struct["Attributes"] then asserts.AssertLoadBalancerAttributes(struct["Attributes"]) end for k,_ in pairs(struct) do assert(keys.ModifyLoadBalancerAttributesOutput[k], "ModifyLoadBalancerAttributesOutput contains unknown key " .. tostring(k)) end end --- Create a structure of type ModifyLoadBalancerAttributesOutput -- -- @param args Table with arguments in key-value form. -- Valid keys: -- * Attributes [LoadBalancerAttributes] <p>Information about the load balancer attributes.</p> -- @return ModifyLoadBalancerAttributesOutput structure as a key-value pair table function M.ModifyLoadBalancerAttributesOutput(args) assert(args, "You must provide an argument table when creating ModifyLoadBalancerAttributesOutput") local query_args = { } local uri_args = { } local header_args = { } local all_args = { ["Attributes"] = args["Attributes"], } asserts.AssertModifyLoadBalancerAttributesOutput(all_args) return { all = all_args, query = query_args, uri = uri_args, headers = header_args, } end keys.RegisterTargetsOutput = { nil } function asserts.AssertRegisterTargetsOutput(struct) assert(struct) assert(type(struct) == "table", "Expected RegisterTargetsOutput to be of type 'table'") for k,_ in pairs(struct) do assert(keys.RegisterTargetsOutput[k], "RegisterTargetsOutput contains unknown key " .. tostring(k)) end end --- Create a structure of type RegisterTargetsOutput -- -- @param args Table with arguments in key-value form. -- Valid keys: -- @return RegisterTargetsOutput structure as a key-value pair table function M.RegisterTargetsOutput(args) assert(args, "You must provide an argument table when creating RegisterTargetsOutput") local query_args = { } local uri_args = { } local header_args = { } local all_args = { } asserts.AssertRegisterTargetsOutput(all_args) return { all = all_args, query = query_args, uri = uri_args, headers = header_args, } end keys.AuthenticateOidcActionConfig = { ["ClientSecret"] = true, ["OnUnauthenticatedRequest"] = true, ["TokenEndpoint"] = true, ["AuthenticationRequestExtraParams"] = true, ["ClientId"] = true, ["SessionTimeout"] = true, ["AuthorizationEndpoint"] = true, ["Scope"] = true, ["SessionCookieName"] = true, ["UserInfoEndpoint"] = true, ["Issuer"] = true, nil } function asserts.AssertAuthenticateOidcActionConfig(struct) assert(struct) assert(type(struct) == "table", "Expected AuthenticateOidcActionConfig to be of type 'table'") assert(struct["Issuer"], "Expected key Issuer to exist in table") assert(struct["AuthorizationEndpoint"], "Expected key AuthorizationEndpoint to exist in table") assert(struct["TokenEndpoint"], "Expected key TokenEndpoint to exist in table") assert(struct["UserInfoEndpoint"], "Expected key UserInfoEndpoint to exist in table") assert(struct["ClientId"], "Expected key ClientId to exist in table") assert(struct["ClientSecret"], "Expected key ClientSecret to exist in table") if struct["ClientSecret"] then asserts.AssertAuthenticateOidcActionClientSecret(struct["ClientSecret"]) end if struct["OnUnauthenticatedRequest"] then asserts.AssertAuthenticateOidcActionConditionalBehaviorEnum(struct["OnUnauthenticatedRequest"]) end if struct["TokenEndpoint"] then asserts.AssertAuthenticateOidcActionTokenEndpoint(struct["TokenEndpoint"]) end if struct["AuthenticationRequestExtraParams"] then asserts.AssertAuthenticateOidcActionAuthenticationRequestExtraParams(struct["AuthenticationRequestExtraParams"]) end if struct["ClientId"] then asserts.AssertAuthenticateOidcActionClientId(struct["ClientId"]) end if struct["SessionTimeout"] then asserts.AssertAuthenticateOidcActionSessionTimeout(struct["SessionTimeout"]) end if struct["AuthorizationEndpoint"] then asserts.AssertAuthenticateOidcActionAuthorizationEndpoint(struct["AuthorizationEndpoint"]) end if struct["Scope"] then asserts.AssertAuthenticateOidcActionScope(struct["Scope"]) end if struct["SessionCookieName"] then asserts.AssertAuthenticateOidcActionSessionCookieName(struct["SessionCookieName"]) end if struct["UserInfoEndpoint"] then asserts.AssertAuthenticateOidcActionUserInfoEndpoint(struct["UserInfoEndpoint"]) end if struct["Issuer"] then asserts.AssertAuthenticateOidcActionIssuer(struct["Issuer"]) end for k,_ in pairs(struct) do assert(keys.AuthenticateOidcActionConfig[k], "AuthenticateOidcActionConfig contains unknown key " .. tostring(k)) end end --- Create a structure of type AuthenticateOidcActionConfig -- <p>Request parameters when using an identity provider (IdP) that is compliant with OpenID Connect (OIDC) to authenticate users.</p> -- @param args Table with arguments in key-value form. -- Valid keys: -- * ClientSecret [AuthenticateOidcActionClientSecret] <p>The OAuth 2.0 client secret.</p> -- * OnUnauthenticatedRequest [AuthenticateOidcActionConditionalBehaviorEnum] <p>The behavior if the user is not authenticated. The following are possible values:</p> <ul> <li> <p>deny<code/> - Return an HTTP 401 Unauthorized error.</p> </li> <li> <p>allow<code/> - Allow the request to be forwarded to the target.</p> </li> <li> <p>authenticate<code/> - Redirect the request to the IdP authorization endpoint. This is the default value.</p> </li> </ul> -- * TokenEndpoint [AuthenticateOidcActionTokenEndpoint] <p>The token endpoint of the IdP. This must be a full URL, including the HTTPS protocol, the domain, and the path.</p> -- * AuthenticationRequestExtraParams [AuthenticateOidcActionAuthenticationRequestExtraParams] <p>The query parameters (up to 10) to include in the redirect request to the authorization endpoint.</p> -- * ClientId [AuthenticateOidcActionClientId] <p>The OAuth 2.0 client identifier.</p> -- * SessionTimeout [AuthenticateOidcActionSessionTimeout] <p>The maximum duration of the authentication session, in seconds. The default is 604800 seconds (7 days).</p> -- * AuthorizationEndpoint [AuthenticateOidcActionAuthorizationEndpoint] <p>The authorization endpoint of the IdP. This must be a full URL, including the HTTPS protocol, the domain, and the path.</p> -- * Scope [AuthenticateOidcActionScope] <p>The set of user claims to be requested from the IdP. The default is <code>openid</code>.</p> <p>To verify which scope values your IdP supports and how to separate multiple values, see the documentation for your IdP.</p> -- * SessionCookieName [AuthenticateOidcActionSessionCookieName] <p>The name of the cookie used to maintain session information. The default is AWSELBAuthSessionCookie.</p> -- * UserInfoEndpoint [AuthenticateOidcActionUserInfoEndpoint] <p>The user info endpoint of the IdP. This must be a full URL, including the HTTPS protocol, the domain, and the path.</p> -- * Issuer [AuthenticateOidcActionIssuer] <p>The OIDC issuer identifier of the IdP. This must be a full URL, including the HTTPS protocol, the domain, and the path.</p> -- Required key: Issuer -- Required key: AuthorizationEndpoint -- Required key: TokenEndpoint -- Required key: UserInfoEndpoint -- Required key: ClientId -- Required key: ClientSecret -- @return AuthenticateOidcActionConfig structure as a key-value pair table function M.AuthenticateOidcActionConfig(args) assert(args, "You must provide an argument table when creating AuthenticateOidcActionConfig") local query_args = { } local uri_args = { } local header_args = { } local all_args = { ["ClientSecret"] = args["ClientSecret"], ["OnUnauthenticatedRequest"] = args["OnUnauthenticatedRequest"], ["TokenEndpoint"] = args["TokenEndpoint"], ["AuthenticationRequestExtraParams"] = args["AuthenticationRequestExtraParams"], ["ClientId"] = args["ClientId"], ["SessionTimeout"] = args["SessionTimeout"], ["AuthorizationEndpoint"] = args["AuthorizationEndpoint"], ["Scope"] = args["Scope"], ["SessionCookieName"] = args["SessionCookieName"], ["UserInfoEndpoint"] = args["UserInfoEndpoint"], ["Issuer"] = args["Issuer"], } asserts.AssertAuthenticateOidcActionConfig(all_args) return { all = all_args, query = query_args, uri = uri_args, headers = header_args, } end keys.Matcher = { ["HttpCode"] = true, nil } function asserts.AssertMatcher(struct) assert(struct) assert(type(struct) == "table", "Expected Matcher to be of type 'table'") assert(struct["HttpCode"], "Expected key HttpCode to exist in table") if struct["HttpCode"] then asserts.AssertHttpCode(struct["HttpCode"]) end for k,_ in pairs(struct) do assert(keys.Matcher[k], "Matcher contains unknown key " .. tostring(k)) end end --- Create a structure of type Matcher -- <p>Information to use when checking for a successful response from a target.</p> -- @param args Table with arguments in key-value form. -- Valid keys: -- * HttpCode [HttpCode] <p>The HTTP codes.</p> <p>For Application Load Balancers, you can specify values between 200 and 499, and the default value is 200. You can specify multiple values (for example, "200,202") or a range of values (for example, "200-299").</p> <p>For Network Load Balancers, this is 200–399.</p> -- Required key: HttpCode -- @return Matcher structure as a key-value pair table function M.Matcher(args) assert(args, "You must provide an argument table when creating Matcher") local query_args = { } local uri_args = { } local header_args = { } local all_args = { ["HttpCode"] = args["HttpCode"], } asserts.AssertMatcher(all_args) return { all = all_args, query = query_args, uri = uri_args, headers = header_args, } end keys.InvalidSecurityGroupException = { nil } function asserts.AssertInvalidSecurityGroupException(struct) assert(struct) assert(type(struct) == "table", "Expected InvalidSecurityGroupException to be of type 'table'") for k,_ in pairs(struct) do assert(keys.InvalidSecurityGroupException[k], "InvalidSecurityGroupException contains unknown key " .. tostring(k)) end end --- Create a structure of type InvalidSecurityGroupException -- <p>The specified security group does not exist.</p> -- @param args Table with arguments in key-value form. -- Valid keys: -- @return InvalidSecurityGroupException structure as a key-value pair table function M.InvalidSecurityGroupException(args) assert(args, "You must provide an argument table when creating InvalidSecurityGroupException") local query_args = { } local uri_args = { } local header_args = { } local all_args = { } asserts.AssertInvalidSecurityGroupException(all_args) return { all = all_args, query = query_args, uri = uri_args, headers = header_args, } end keys.TooManyActionsException = { nil } function asserts.AssertTooManyActionsException(struct) assert(struct) assert(type(struct) == "table", "Expected TooManyActionsException to be of type 'table'") for k,_ in pairs(struct) do assert(keys.TooManyActionsException[k], "TooManyActionsException contains unknown key " .. tostring(k)) end end --- Create a structure of type TooManyActionsException -- <p>You've reached the limit on the number of actions per rule.</p> -- @param args Table with arguments in key-value form. -- Valid keys: -- @return TooManyActionsException structure as a key-value pair table function M.TooManyActionsException(args) assert(args, "You must provide an argument table when creating TooManyActionsException") local query_args = { } local uri_args = { } local header_args = { } local all_args = { } asserts.AssertTooManyActionsException(all_args) return { all = all_args, query = query_args, uri = uri_args, headers = header_args, } end keys.DescribeAccountLimitsOutput = { ["NextMarker"] = true, ["Limits"] = true, nil } function asserts.AssertDescribeAccountLimitsOutput(struct) assert(struct) assert(type(struct) == "table", "Expected DescribeAccountLimitsOutput to be of type 'table'") if struct["NextMarker"] then asserts.AssertMarker(struct["NextMarker"]) end if struct["Limits"] then asserts.AssertLimits(struct["Limits"]) end for k,_ in pairs(struct) do assert(keys.DescribeAccountLimitsOutput[k], "DescribeAccountLimitsOutput contains unknown key " .. tostring(k)) end end --- Create a structure of type DescribeAccountLimitsOutput -- -- @param args Table with arguments in key-value form. -- Valid keys: -- * NextMarker [Marker] <p>The marker to use when requesting the next set of results. If there are no additional results, the string is empty.</p> -- * Limits [Limits] <p>Information about the limits.</p> -- @return DescribeAccountLimitsOutput structure as a key-value pair table function M.DescribeAccountLimitsOutput(args) assert(args, "You must provide an argument table when creating DescribeAccountLimitsOutput") local query_args = { } local uri_args = { } local header_args = { } local all_args = { ["NextMarker"] = args["NextMarker"], ["Limits"] = args["Limits"], } asserts.AssertDescribeAccountLimitsOutput(all_args) return { all = all_args, query = query_args, uri = uri_args, headers = header_args, } end keys.ModifyListenerInput = { ["Protocol"] = true, ["DefaultActions"] = true, ["SslPolicy"] = true, ["Certificates"] = true, ["Port"] = true, ["ListenerArn"] = true, nil } function asserts.AssertModifyListenerInput(struct) assert(struct) assert(type(struct) == "table", "Expected ModifyListenerInput to be of type 'table'") assert(struct["ListenerArn"], "Expected key ListenerArn to exist in table") if struct["Protocol"] then asserts.AssertProtocolEnum(struct["Protocol"]) end if struct["DefaultActions"] then asserts.AssertActions(struct["DefaultActions"]) end if struct["SslPolicy"] then asserts.AssertSslPolicyName(struct["SslPolicy"]) end if struct["Certificates"] then asserts.AssertCertificateList(struct["Certificates"]) end if struct["Port"] then asserts.AssertPort(struct["Port"]) end if struct["ListenerArn"] then asserts.AssertListenerArn(struct["ListenerArn"]) end for k,_ in pairs(struct) do assert(keys.ModifyListenerInput[k], "ModifyListenerInput contains unknown key " .. tostring(k)) end end --- Create a structure of type ModifyListenerInput -- -- @param args Table with arguments in key-value form. -- Valid keys: -- * Protocol [ProtocolEnum] <p>The protocol for connections from clients to the load balancer. Application Load Balancers support HTTP and HTTPS and Network Load Balancers support TCP.</p> -- * DefaultActions [Actions] <p>The actions for the default rule. The rule must include one forward action or one or more fixed-response actions.</p> <p>If the action type is <code>forward</code>, you can specify a single target group. The protocol of the target group must be HTTP or HTTPS for an Application Load Balancer or TCP for a Network Load Balancer.</p> <p>[HTTPS listener] If the action type is <code>authenticate-oidc</code>, you can use an identity provider that is OpenID Connect (OIDC) compliant to authenticate users as they access your application.</p> <p>[HTTPS listener] If the action type is <code>authenticate-cognito</code>, you can use Amazon Cognito to authenticate users as they access your application.</p> <p>[Application Load Balancer] If the action type is <code>redirect</code>, you can redirect HTTP and HTTPS requests.</p> <p>[Application Load Balancer] If the action type is <code>fixed-response</code>, you can return a custom HTTP response.</p> -- * SslPolicy [SslPolicyName] <p>[HTTPS listeners] The security policy that defines which protocols and ciphers are supported. For more information, see <a href="http://docs.aws.amazon.com/elasticloadbalancing/latest/application/create-https-listener.html#describe-ssl-policies">Security Policies</a> in the <i>Application Load Balancers Guide</i>.</p> -- * Certificates [CertificateList] <p>[HTTPS listeners] The default SSL server certificate. You must provide exactly one default certificate. To create a certificate list, use <a>AddListenerCertificates</a>.</p> -- * Port [Port] <p>The port for connections from clients to the load balancer.</p> -- * ListenerArn [ListenerArn] <p>The Amazon Resource Name (ARN) of the listener.</p> -- Required key: ListenerArn -- @return ModifyListenerInput structure as a key-value pair table function M.ModifyListenerInput(args) assert(args, "You must provide an argument table when creating ModifyListenerInput") local query_args = { } local uri_args = { } local header_args = { } local all_args = { ["Protocol"] = args["Protocol"], ["DefaultActions"] = args["DefaultActions"], ["SslPolicy"] = args["SslPolicy"], ["Certificates"] = args["Certificates"], ["Port"] = args["Port"], ["ListenerArn"] = args["ListenerArn"], } asserts.AssertModifyListenerInput(all_args) return { all = all_args, query = query_args, uri = uri_args, headers = header_args, } end keys.ModifyLoadBalancerAttributesInput = { ["Attributes"] = true, ["LoadBalancerArn"] = true, nil } function asserts.AssertModifyLoadBalancerAttributesInput(struct) assert(struct) assert(type(struct) == "table", "Expected ModifyLoadBalancerAttributesInput to be of type 'table'") assert(struct["LoadBalancerArn"], "Expected key LoadBalancerArn to exist in table") assert(struct["Attributes"], "Expected key Attributes to exist in table") if struct["Attributes"] then asserts.AssertLoadBalancerAttributes(struct["Attributes"]) end if struct["LoadBalancerArn"] then asserts.AssertLoadBalancerArn(struct["LoadBalancerArn"]) end for k,_ in pairs(struct) do assert(keys.ModifyLoadBalancerAttributesInput[k], "ModifyLoadBalancerAttributesInput contains unknown key " .. tostring(k)) end end --- Create a structure of type ModifyLoadBalancerAttributesInput -- -- @param args Table with arguments in key-value form. -- Valid keys: -- * Attributes [LoadBalancerAttributes] <p>The load balancer attributes.</p> -- * LoadBalancerArn [LoadBalancerArn] <p>The Amazon Resource Name (ARN) of the load balancer.</p> -- Required key: LoadBalancerArn -- Required key: Attributes -- @return ModifyLoadBalancerAttributesInput structure as a key-value pair table function M.ModifyLoadBalancerAttributesInput(args) assert(args, "You must provide an argument table when creating ModifyLoadBalancerAttributesInput") local query_args = { } local uri_args = { } local header_args = { } local all_args = { ["Attributes"] = args["Attributes"], ["LoadBalancerArn"] = args["LoadBalancerArn"], } asserts.AssertModifyLoadBalancerAttributesInput(all_args) return { all = all_args, query = query_args, uri = uri_args, headers = header_args, } end keys.DeleteLoadBalancerOutput = { nil } function asserts.AssertDeleteLoadBalancerOutput(struct) assert(struct) assert(type(struct) == "table", "Expected DeleteLoadBalancerOutput to be of type 'table'") for k,_ in pairs(struct) do assert(keys.DeleteLoadBalancerOutput[k], "DeleteLoadBalancerOutput contains unknown key " .. tostring(k)) end end --- Create a structure of type DeleteLoadBalancerOutput -- -- @param args Table with arguments in key-value form. -- Valid keys: -- @return DeleteLoadBalancerOutput structure as a key-value pair table function M.DeleteLoadBalancerOutput(args) assert(args, "You must provide an argument table when creating DeleteLoadBalancerOutput") local query_args = { } local uri_args = { } local header_args = { } local all_args = { } asserts.AssertDeleteLoadBalancerOutput(all_args) return { all = all_args, query = query_args, uri = uri_args, headers = header_args, } end keys.ModifyTargetGroupInput = { ["HealthyThresholdCount"] = true, ["HealthCheckIntervalSeconds"] = true, ["TargetGroupArn"] = true, ["HealthCheckPort"] = true, ["HealthCheckProtocol"] = true, ["HealthCheckPath"] = true, ["HealthCheckTimeoutSeconds"] = true, ["Matcher"] = true, ["UnhealthyThresholdCount"] = true, nil } function asserts.AssertModifyTargetGroupInput(struct) assert(struct) assert(type(struct) == "table", "Expected ModifyTargetGroupInput to be of type 'table'") assert(struct["TargetGroupArn"], "Expected key TargetGroupArn to exist in table") if struct["HealthyThresholdCount"] then asserts.AssertHealthCheckThresholdCount(struct["HealthyThresholdCount"]) end if struct["HealthCheckIntervalSeconds"] then asserts.AssertHealthCheckIntervalSeconds(struct["HealthCheckIntervalSeconds"]) end if struct["TargetGroupArn"] then asserts.AssertTargetGroupArn(struct["TargetGroupArn"]) end if struct["HealthCheckPort"] then asserts.AssertHealthCheckPort(struct["HealthCheckPort"]) end if struct["HealthCheckProtocol"] then asserts.AssertProtocolEnum(struct["HealthCheckProtocol"]) end if struct["HealthCheckPath"] then asserts.AssertPath(struct["HealthCheckPath"]) end if struct["HealthCheckTimeoutSeconds"] then asserts.AssertHealthCheckTimeoutSeconds(struct["HealthCheckTimeoutSeconds"]) end if struct["Matcher"] then asserts.AssertMatcher(struct["Matcher"]) end if struct["UnhealthyThresholdCount"] then asserts.AssertHealthCheckThresholdCount(struct["UnhealthyThresholdCount"]) end for k,_ in pairs(struct) do assert(keys.ModifyTargetGroupInput[k], "ModifyTargetGroupInput contains unknown key " .. tostring(k)) end end --- Create a structure of type ModifyTargetGroupInput -- -- @param args Table with arguments in key-value form. -- Valid keys: -- * HealthyThresholdCount [HealthCheckThresholdCount] <p>The number of consecutive health checks successes required before considering an unhealthy target healthy.</p> -- * HealthCheckIntervalSeconds [HealthCheckIntervalSeconds] <p>The approximate amount of time, in seconds, between health checks of an individual target. For Application Load Balancers, the range is 5–300 seconds. For Network Load Balancers, the supported values are 10 or 30 seconds.</p> -- * TargetGroupArn [TargetGroupArn] <p>The Amazon Resource Name (ARN) of the target group.</p> -- * HealthCheckPort [HealthCheckPort] <p>The port the load balancer uses when performing health checks on targets.</p> -- * HealthCheckProtocol [ProtocolEnum] <p>The protocol the load balancer uses when performing health checks on targets. The TCP protocol is supported only if the protocol of the target group is TCP.</p> -- * HealthCheckPath [Path] <p>[HTTP/HTTPS health checks] The ping path that is the destination for the health check request.</p> -- * HealthCheckTimeoutSeconds [HealthCheckTimeoutSeconds] <p>[HTTP/HTTPS health checks] The amount of time, in seconds, during which no response means a failed health check.</p> -- * Matcher [Matcher] <p>[HTTP/HTTPS health checks] The HTTP codes to use when checking for a successful response from a target.</p> -- * UnhealthyThresholdCount [HealthCheckThresholdCount] <p>The number of consecutive health check failures required before considering the target unhealthy. For Network Load Balancers, this value must be the same as the healthy threshold count.</p> -- Required key: TargetGroupArn -- @return ModifyTargetGroupInput structure as a key-value pair table function M.ModifyTargetGroupInput(args) assert(args, "You must provide an argument table when creating ModifyTargetGroupInput") local query_args = { } local uri_args = { } local header_args = { } local all_args = { ["HealthyThresholdCount"] = args["HealthyThresholdCount"], ["HealthCheckIntervalSeconds"] = args["HealthCheckIntervalSeconds"], ["TargetGroupArn"] = args["TargetGroupArn"], ["HealthCheckPort"] = args["HealthCheckPort"], ["HealthCheckProtocol"] = args["HealthCheckProtocol"], ["HealthCheckPath"] = args["HealthCheckPath"], ["HealthCheckTimeoutSeconds"] = args["HealthCheckTimeoutSeconds"], ["Matcher"] = args["Matcher"], ["UnhealthyThresholdCount"] = args["UnhealthyThresholdCount"], } asserts.AssertModifyTargetGroupInput(all_args) return { all = all_args, query = query_args, uri = uri_args, headers = header_args, } end keys.CreateRuleInput = { ["Priority"] = true, ["Conditions"] = true, ["Actions"] = true, ["ListenerArn"] = true, nil } function asserts.AssertCreateRuleInput(struct) assert(struct) assert(type(struct) == "table", "Expected CreateRuleInput to be of type 'table'") assert(struct["ListenerArn"], "Expected key ListenerArn to exist in table") assert(struct["Conditions"], "Expected key Conditions to exist in table") assert(struct["Priority"], "Expected key Priority to exist in table") assert(struct["Actions"], "Expected key Actions to exist in table") if struct["Priority"] then asserts.AssertRulePriority(struct["Priority"]) end if struct["Conditions"] then asserts.AssertRuleConditionList(struct["Conditions"]) end if struct["Actions"] then asserts.AssertActions(struct["Actions"]) end if struct["ListenerArn"] then asserts.AssertListenerArn(struct["ListenerArn"]) end for k,_ in pairs(struct) do assert(keys.CreateRuleInput[k], "CreateRuleInput contains unknown key " .. tostring(k)) end end --- Create a structure of type CreateRuleInput -- -- @param args Table with arguments in key-value form. -- Valid keys: -- * Priority [RulePriority] <p>The rule priority. A listener can't have multiple rules with the same priority.</p> -- * Conditions [RuleConditionList] <p>The conditions. Each condition specifies a field name and a single value.</p> <p>If the field name is <code>host-header</code>, you can specify a single host name (for example, my.example.com). A host name is case insensitive, can be up to 128 characters in length, and can contain any of the following characters. You can include up to three wildcard characters.</p> <ul> <li> <p>A-Z, a-z, 0-9</p> </li> <li> <p>- .</p> </li> <li> <p>* (matches 0 or more characters)</p> </li> <li> <p>? (matches exactly 1 character)</p> </li> </ul> <p>If the field name is <code>path-pattern</code>, you can specify a single path pattern. A path pattern is case-sensitive, can be up to 128 characters in length, and can contain any of the following characters. You can include up to three wildcard characters.</p> <ul> <li> <p>A-Z, a-z, 0-9</p> </li> <li> <p>_ - . $ / ~ " ' @ : +</p> </li> <li> <p>&amp; (using &amp;amp;)</p> </li> <li> <p>* (matches 0 or more characters)</p> </li> <li> <p>? (matches exactly 1 character)</p> </li> </ul> -- * Actions [Actions] <p>The actions. Each rule must include exactly one of the following types of actions: <code>forward</code>, <code>fixed-response</code>, or <code>redirect</code>.</p> <p>If the action type is <code>forward</code>, you can specify a single target group.</p> <p>[HTTPS listener] If the action type is <code>authenticate-oidc</code>, you can use an identity provider that is OpenID Connect (OIDC) compliant to authenticate users as they access your application.</p> <p>[HTTPS listener] If the action type is <code>authenticate-cognito</code>, you can use Amazon Cognito to authenticate users as they access your application.</p> <p>[Application Load Balancer] If the action type is <code>redirect</code>, you can redirect HTTP and HTTPS requests.</p> <p>[Application Load Balancer] If the action type is <code>fixed-response</code>, you can return a custom HTTP response.</p> -- * ListenerArn [ListenerArn] <p>The Amazon Resource Name (ARN) of the listener.</p> -- Required key: ListenerArn -- Required key: Conditions -- Required key: Priority -- Required key: Actions -- @return CreateRuleInput structure as a key-value pair table function M.CreateRuleInput(args) assert(args, "You must provide an argument table when creating CreateRuleInput") local query_args = { } local uri_args = { } local header_args = { } local all_args = { ["Priority"] = args["Priority"], ["Conditions"] = args["Conditions"], ["Actions"] = args["Actions"], ["ListenerArn"] = args["ListenerArn"], } asserts.AssertCreateRuleInput(all_args) return { all = all_args, query = query_args, uri = uri_args, headers = header_args, } end keys.RemoveListenerCertificatesOutput = { nil } function asserts.AssertRemoveListenerCertificatesOutput(struct) assert(struct) assert(type(struct) == "table", "Expected RemoveListenerCertificatesOutput to be of type 'table'") for k,_ in pairs(struct) do assert(keys.RemoveListenerCertificatesOutput[k], "RemoveListenerCertificatesOutput contains unknown key " .. tostring(k)) end end --- Create a structure of type RemoveListenerCertificatesOutput -- -- @param args Table with arguments in key-value form. -- Valid keys: -- @return RemoveListenerCertificatesOutput structure as a key-value pair table function M.RemoveListenerCertificatesOutput(args) assert(args, "You must provide an argument table when creating RemoveListenerCertificatesOutput") local query_args = { } local uri_args = { } local header_args = { } local all_args = { } asserts.AssertRemoveListenerCertificatesOutput(all_args) return { all = all_args, query = query_args, uri = uri_args, headers = header_args, } end keys.DescribeListenersInput = { ["ListenerArns"] = true, ["Marker"] = true, ["LoadBalancerArn"] = true, ["PageSize"] = true, nil } function asserts.AssertDescribeListenersInput(struct) assert(struct) assert(type(struct) == "table", "Expected DescribeListenersInput to be of type 'table'") if struct["ListenerArns"] then asserts.AssertListenerArns(struct["ListenerArns"]) end if struct["Marker"] then asserts.AssertMarker(struct["Marker"]) end if struct["LoadBalancerArn"] then asserts.AssertLoadBalancerArn(struct["LoadBalancerArn"]) end if struct["PageSize"] then asserts.AssertPageSize(struct["PageSize"]) end for k,_ in pairs(struct) do assert(keys.DescribeListenersInput[k], "DescribeListenersInput contains unknown key " .. tostring(k)) end end --- Create a structure of type DescribeListenersInput -- -- @param args Table with arguments in key-value form. -- Valid keys: -- * ListenerArns [ListenerArns] <p>The Amazon Resource Names (ARN) of the listeners.</p> -- * Marker [Marker] <p>The marker for the next set of results. (You received this marker from a previous call.)</p> -- * LoadBalancerArn [LoadBalancerArn] <p>The Amazon Resource Name (ARN) of the load balancer.</p> -- * PageSize [PageSize] <p>The maximum number of results to return with this call.</p> -- @return DescribeListenersInput structure as a key-value pair table function M.DescribeListenersInput(args) assert(args, "You must provide an argument table when creating DescribeListenersInput") local query_args = { } local uri_args = { } local header_args = { } local all_args = { ["ListenerArns"] = args["ListenerArns"], ["Marker"] = args["Marker"], ["LoadBalancerArn"] = args["LoadBalancerArn"], ["PageSize"] = args["PageSize"], } asserts.AssertDescribeListenersInput(all_args) return { all = all_args, query = query_args, uri = uri_args, headers = header_args, } end keys.DeleteLoadBalancerInput = { ["LoadBalancerArn"] = true, nil } function asserts.AssertDeleteLoadBalancerInput(struct) assert(struct) assert(type(struct) == "table", "Expected DeleteLoadBalancerInput to be of type 'table'") assert(struct["LoadBalancerArn"], "Expected key LoadBalancerArn to exist in table") if struct["LoadBalancerArn"] then asserts.AssertLoadBalancerArn(struct["LoadBalancerArn"]) end for k,_ in pairs(struct) do assert(keys.DeleteLoadBalancerInput[k], "DeleteLoadBalancerInput contains unknown key " .. tostring(k)) end end --- Create a structure of type DeleteLoadBalancerInput -- -- @param args Table with arguments in key-value form. -- Valid keys: -- * LoadBalancerArn [LoadBalancerArn] <p>The Amazon Resource Name (ARN) of the load balancer.</p> -- Required key: LoadBalancerArn -- @return DeleteLoadBalancerInput structure as a key-value pair table function M.DeleteLoadBalancerInput(args) assert(args, "You must provide an argument table when creating DeleteLoadBalancerInput") local query_args = { } local uri_args = { } local header_args = { } local all_args = { ["LoadBalancerArn"] = args["LoadBalancerArn"], } asserts.AssertDeleteLoadBalancerInput(all_args) return { all = all_args, query = query_args, uri = uri_args, headers = header_args, } end keys.SetRulePrioritiesInput = { ["RulePriorities"] = true, nil } function asserts.AssertSetRulePrioritiesInput(struct) assert(struct) assert(type(struct) == "table", "Expected SetRulePrioritiesInput to be of type 'table'") assert(struct["RulePriorities"], "Expected key RulePriorities to exist in table") if struct["RulePriorities"] then asserts.AssertRulePriorityList(struct["RulePriorities"]) end for k,_ in pairs(struct) do assert(keys.SetRulePrioritiesInput[k], "SetRulePrioritiesInput contains unknown key " .. tostring(k)) end end --- Create a structure of type SetRulePrioritiesInput -- -- @param args Table with arguments in key-value form. -- Valid keys: -- * RulePriorities [RulePriorityList] <p>The rule priorities.</p> -- Required key: RulePriorities -- @return SetRulePrioritiesInput structure as a key-value pair table function M.SetRulePrioritiesInput(args) assert(args, "You must provide an argument table when creating SetRulePrioritiesInput") local query_args = { } local uri_args = { } local header_args = { } local all_args = { ["RulePriorities"] = args["RulePriorities"], } asserts.AssertSetRulePrioritiesInput(all_args) return { all = all_args, query = query_args, uri = uri_args, headers = header_args, } end keys.SetRulePrioritiesOutput = { ["Rules"] = true, nil } function asserts.AssertSetRulePrioritiesOutput(struct) assert(struct) assert(type(struct) == "table", "Expected SetRulePrioritiesOutput to be of type 'table'") if struct["Rules"] then asserts.AssertRules(struct["Rules"]) end for k,_ in pairs(struct) do assert(keys.SetRulePrioritiesOutput[k], "SetRulePrioritiesOutput contains unknown key " .. tostring(k)) end end --- Create a structure of type SetRulePrioritiesOutput -- -- @param args Table with arguments in key-value form. -- Valid keys: -- * Rules [Rules] <p>Information about the rules.</p> -- @return SetRulePrioritiesOutput structure as a key-value pair table function M.SetRulePrioritiesOutput(args) assert(args, "You must provide an argument table when creating SetRulePrioritiesOutput") local query_args = { } local uri_args = { } local header_args = { } local all_args = { ["Rules"] = args["Rules"], } asserts.AssertSetRulePrioritiesOutput(all_args) return { all = all_args, query = query_args, uri = uri_args, headers = header_args, } end keys.Action = { ["TargetGroupArn"] = true, ["FixedResponseConfig"] = true, ["Type"] = true, ["AuthenticateCognitoConfig"] = true, ["AuthenticateOidcConfig"] = true, ["RedirectConfig"] = true, ["Order"] = true, nil } function asserts.AssertAction(struct) assert(struct) assert(type(struct) == "table", "Expected Action to be of type 'table'") assert(struct["Type"], "Expected key Type to exist in table") if struct["TargetGroupArn"] then asserts.AssertTargetGroupArn(struct["TargetGroupArn"]) end if struct["FixedResponseConfig"] then asserts.AssertFixedResponseActionConfig(struct["FixedResponseConfig"]) end if struct["Type"] then asserts.AssertActionTypeEnum(struct["Type"]) end if struct["AuthenticateCognitoConfig"] then asserts.AssertAuthenticateCognitoActionConfig(struct["AuthenticateCognitoConfig"]) end if struct["AuthenticateOidcConfig"] then asserts.AssertAuthenticateOidcActionConfig(struct["AuthenticateOidcConfig"]) end if struct["RedirectConfig"] then asserts.AssertRedirectActionConfig(struct["RedirectConfig"]) end if struct["Order"] then asserts.AssertActionOrder(struct["Order"]) end for k,_ in pairs(struct) do assert(keys.Action[k], "Action contains unknown key " .. tostring(k)) end end --- Create a structure of type Action -- <p>Information about an action.</p> -- @param args Table with arguments in key-value form. -- Valid keys: -- * TargetGroupArn [TargetGroupArn] <p>The Amazon Resource Name (ARN) of the target group. Specify only when <code>Type</code> is <code>forward</code>.</p> -- * FixedResponseConfig [FixedResponseActionConfig] <p>[Application Load Balancer] Information for creating an action that returns a custom HTTP response. Specify only when <code>Type</code> is <code>fixed-response</code>.</p> -- * Type [ActionTypeEnum] <p>The type of action. Each rule must include exactly one of the following types of actions: <code>forward</code>, <code>fixed-response</code>, or <code>redirect</code>.</p> -- * AuthenticateCognitoConfig [AuthenticateCognitoActionConfig] <p>[HTTPS listener] Information for using Amazon Cognito to authenticate users. Specify only when <code>Type</code> is <code>authenticate-cognito</code>.</p> -- * AuthenticateOidcConfig [AuthenticateOidcActionConfig] <p>[HTTPS listener] Information about an identity provider that is compliant with OpenID Connect (OIDC). Specify only when <code>Type</code> is <code>authenticate-oidc</code>.</p> -- * RedirectConfig [RedirectActionConfig] <p>[Application Load Balancer] Information for creating a redirect action. Specify only when <code>Type</code> is <code>redirect</code>.</p> -- * Order [ActionOrder] <p>The order for the action. This value is required for rules with multiple actions. The action with the lowest value for order is performed first. The final action to be performed must be a <code>forward</code> or a <code>fixed-response</code> action.</p> -- Required key: Type -- @return Action structure as a key-value pair table function M.Action(args) assert(args, "You must provide an argument table when creating Action") local query_args = { } local uri_args = { } local header_args = { } local all_args = { ["TargetGroupArn"] = args["TargetGroupArn"], ["FixedResponseConfig"] = args["FixedResponseConfig"], ["Type"] = args["Type"], ["AuthenticateCognitoConfig"] = args["AuthenticateCognitoConfig"], ["AuthenticateOidcConfig"] = args["AuthenticateOidcConfig"], ["RedirectConfig"] = args["RedirectConfig"], ["Order"] = args["Order"], } asserts.AssertAction(all_args) return { all = all_args, query = query_args, uri = uri_args, headers = header_args, } end keys.PriorityInUseException = { nil } function asserts.AssertPriorityInUseException(struct) assert(struct) assert(type(struct) == "table", "Expected PriorityInUseException to be of type 'table'") for k,_ in pairs(struct) do assert(keys.PriorityInUseException[k], "PriorityInUseException contains unknown key " .. tostring(k)) end end --- Create a structure of type PriorityInUseException -- <p>The specified priority is in use.</p> -- @param args Table with arguments in key-value form. -- Valid keys: -- @return PriorityInUseException structure as a key-value pair table function M.PriorityInUseException(args) assert(args, "You must provide an argument table when creating PriorityInUseException") local query_args = { } local uri_args = { } local header_args = { } local all_args = { } asserts.AssertPriorityInUseException(all_args) return { all = all_args, query = query_args, uri = uri_args, headers = header_args, } end keys.RegisterTargetsInput = { ["TargetGroupArn"] = true, ["Targets"] = true, nil } function asserts.AssertRegisterTargetsInput(struct) assert(struct) assert(type(struct) == "table", "Expected RegisterTargetsInput to be of type 'table'") assert(struct["TargetGroupArn"], "Expected key TargetGroupArn to exist in table") assert(struct["Targets"], "Expected key Targets to exist in table") if struct["TargetGroupArn"] then asserts.AssertTargetGroupArn(struct["TargetGroupArn"]) end if struct["Targets"] then asserts.AssertTargetDescriptions(struct["Targets"]) end for k,_ in pairs(struct) do assert(keys.RegisterTargetsInput[k], "RegisterTargetsInput contains unknown key " .. tostring(k)) end end --- Create a structure of type RegisterTargetsInput -- -- @param args Table with arguments in key-value form. -- Valid keys: -- * TargetGroupArn [TargetGroupArn] <p>The Amazon Resource Name (ARN) of the target group.</p> -- * Targets [TargetDescriptions] <p>The targets.</p> -- Required key: TargetGroupArn -- Required key: Targets -- @return RegisterTargetsInput structure as a key-value pair table function M.RegisterTargetsInput(args) assert(args, "You must provide an argument table when creating RegisterTargetsInput") local query_args = { } local uri_args = { } local header_args = { } local all_args = { ["TargetGroupArn"] = args["TargetGroupArn"], ["Targets"] = args["Targets"], } asserts.AssertRegisterTargetsInput(all_args) return { all = all_args, query = query_args, uri = uri_args, headers = header_args, } end keys.DeleteTargetGroupInput = { ["TargetGroupArn"] = true, nil } function asserts.AssertDeleteTargetGroupInput(struct) assert(struct) assert(type(struct) == "table", "Expected DeleteTargetGroupInput to be of type 'table'") assert(struct["TargetGroupArn"], "Expected key TargetGroupArn to exist in table") if struct["TargetGroupArn"] then asserts.AssertTargetGroupArn(struct["TargetGroupArn"]) end for k,_ in pairs(struct) do assert(keys.DeleteTargetGroupInput[k], "DeleteTargetGroupInput contains unknown key " .. tostring(k)) end end --- Create a structure of type DeleteTargetGroupInput -- -- @param args Table with arguments in key-value form. -- Valid keys: -- * TargetGroupArn [TargetGroupArn] <p>The Amazon Resource Name (ARN) of the target group.</p> -- Required key: TargetGroupArn -- @return DeleteTargetGroupInput structure as a key-value pair table function M.DeleteTargetGroupInput(args) assert(args, "You must provide an argument table when creating DeleteTargetGroupInput") local query_args = { } local uri_args = { } local header_args = { } local all_args = { ["TargetGroupArn"] = args["TargetGroupArn"], } asserts.AssertDeleteTargetGroupInput(all_args) return { all = all_args, query = query_args, uri = uri_args, headers = header_args, } end keys.RuleNotFoundException = { nil } function asserts.AssertRuleNotFoundException(struct) assert(struct) assert(type(struct) == "table", "Expected RuleNotFoundException to be of type 'table'") for k,_ in pairs(struct) do assert(keys.RuleNotFoundException[k], "RuleNotFoundException contains unknown key " .. tostring(k)) end end --- Create a structure of type RuleNotFoundException -- <p>The specified rule does not exist.</p> -- @param args Table with arguments in key-value form. -- Valid keys: -- @return RuleNotFoundException structure as a key-value pair table function M.RuleNotFoundException(args) assert(args, "You must provide an argument table when creating RuleNotFoundException") local query_args = { } local uri_args = { } local header_args = { } local all_args = { } asserts.AssertRuleNotFoundException(all_args) return { all = all_args, query = query_args, uri = uri_args, headers = header_args, } end keys.TooManyTargetsException = { nil } function asserts.AssertTooManyTargetsException(struct) assert(struct) assert(type(struct) == "table", "Expected TooManyTargetsException to be of type 'table'") for k,_ in pairs(struct) do assert(keys.TooManyTargetsException[k], "TooManyTargetsException contains unknown key " .. tostring(k)) end end --- Create a structure of type TooManyTargetsException -- <p>You've reached the limit on the number of targets.</p> -- @param args Table with arguments in key-value form. -- Valid keys: -- @return TooManyTargetsException structure as a key-value pair table function M.TooManyTargetsException(args) assert(args, "You must provide an argument table when creating TooManyTargetsException") local query_args = { } local uri_args = { } local header_args = { } local all_args = { } asserts.AssertTooManyTargetsException(all_args) return { all = all_args, query = query_args, uri = uri_args, headers = header_args, } end keys.OperationNotPermittedException = { nil } function asserts.AssertOperationNotPermittedException(struct) assert(struct) assert(type(struct) == "table", "Expected OperationNotPermittedException to be of type 'table'") for k,_ in pairs(struct) do assert(keys.OperationNotPermittedException[k], "OperationNotPermittedException contains unknown key " .. tostring(k)) end end --- Create a structure of type OperationNotPermittedException -- <p>This operation is not allowed.</p> -- @param args Table with arguments in key-value form. -- Valid keys: -- @return OperationNotPermittedException structure as a key-value pair table function M.OperationNotPermittedException(args) assert(args, "You must provide an argument table when creating OperationNotPermittedException") local query_args = { } local uri_args = { } local header_args = { } local all_args = { } asserts.AssertOperationNotPermittedException(all_args) return { all = all_args, query = query_args, uri = uri_args, headers = header_args, } end keys.AddTagsInput = { ["ResourceArns"] = true, ["Tags"] = true, nil } function asserts.AssertAddTagsInput(struct) assert(struct) assert(type(struct) == "table", "Expected AddTagsInput to be of type 'table'") assert(struct["ResourceArns"], "Expected key ResourceArns to exist in table") assert(struct["Tags"], "Expected key Tags to exist in table") if struct["ResourceArns"] then asserts.AssertResourceArns(struct["ResourceArns"]) end if struct["Tags"] then asserts.AssertTagList(struct["Tags"]) end for k,_ in pairs(struct) do assert(keys.AddTagsInput[k], "AddTagsInput contains unknown key " .. tostring(k)) end end --- Create a structure of type AddTagsInput -- -- @param args Table with arguments in key-value form. -- Valid keys: -- * ResourceArns [ResourceArns] <p>The Amazon Resource Name (ARN) of the resource.</p> -- * Tags [TagList] <p>The tags. Each resource can have a maximum of 10 tags.</p> -- Required key: ResourceArns -- Required key: Tags -- @return AddTagsInput structure as a key-value pair table function M.AddTagsInput(args) assert(args, "You must provide an argument table when creating AddTagsInput") local query_args = { } local uri_args = { } local header_args = { } local all_args = { ["ResourceArns"] = args["ResourceArns"], ["Tags"] = args["Tags"], } asserts.AssertAddTagsInput(all_args) return { all = all_args, query = query_args, uri = uri_args, headers = header_args, } end keys.HealthUnavailableException = { nil } function asserts.AssertHealthUnavailableException(struct) assert(struct) assert(type(struct) == "table", "Expected HealthUnavailableException to be of type 'table'") for k,_ in pairs(struct) do assert(keys.HealthUnavailableException[k], "HealthUnavailableException contains unknown key " .. tostring(k)) end end --- Create a structure of type HealthUnavailableException -- <p>The health of the specified targets could not be retrieved due to an internal error.</p> -- @param args Table with arguments in key-value form. -- Valid keys: -- @return HealthUnavailableException structure as a key-value pair table function M.HealthUnavailableException(args) assert(args, "You must provide an argument table when creating HealthUnavailableException") local query_args = { } local uri_args = { } local header_args = { } local all_args = { } asserts.AssertHealthUnavailableException(all_args) return { all = all_args, query = query_args, uri = uri_args, headers = header_args, } end keys.ModifyRuleInput = { ["Conditions"] = true, ["RuleArn"] = true, ["Actions"] = true, nil } function asserts.AssertModifyRuleInput(struct) assert(struct) assert(type(struct) == "table", "Expected ModifyRuleInput to be of type 'table'") assert(struct["RuleArn"], "Expected key RuleArn to exist in table") if struct["Conditions"] then asserts.AssertRuleConditionList(struct["Conditions"]) end if struct["RuleArn"] then asserts.AssertRuleArn(struct["RuleArn"]) end if struct["Actions"] then asserts.AssertActions(struct["Actions"]) end for k,_ in pairs(struct) do assert(keys.ModifyRuleInput[k], "ModifyRuleInput contains unknown key " .. tostring(k)) end end --- Create a structure of type ModifyRuleInput -- -- @param args Table with arguments in key-value form. -- Valid keys: -- * Conditions [RuleConditionList] <p>The conditions. Each condition specifies a field name and a single value.</p> <p>If the field name is <code>host-header</code>, you can specify a single host name (for example, my.example.com). A host name is case insensitive, can be up to 128 characters in length, and can contain any of the following characters. You can include up to three wildcard characters.</p> <ul> <li> <p>A-Z, a-z, 0-9</p> </li> <li> <p>- .</p> </li> <li> <p>* (matches 0 or more characters)</p> </li> <li> <p>? (matches exactly 1 character)</p> </li> </ul> <p>If the field name is <code>path-pattern</code>, you can specify a single path pattern. A path pattern is case-sensitive, can be up to 128 characters in length, and can contain any of the following characters. You can include up to three wildcard characters.</p> <ul> <li> <p>A-Z, a-z, 0-9</p> </li> <li> <p>_ - . $ / ~ " ' @ : +</p> </li> <li> <p>&amp; (using &amp;amp;)</p> </li> <li> <p>* (matches 0 or more characters)</p> </li> <li> <p>? (matches exactly 1 character)</p> </li> </ul> -- * RuleArn [RuleArn] <p>The Amazon Resource Name (ARN) of the rule.</p> -- * Actions [Actions] <p>The actions.</p> <p>If the action type is <code>forward</code>, you can specify a single target group.</p> <p>If the action type is <code>authenticate-oidc</code>, you can use an identity provider that is OpenID Connect (OIDC) compliant to authenticate users as they access your application.</p> <p>If the action type is <code>authenticate-cognito</code>, you can use Amazon Cognito to authenticate users as they access your application.</p> -- Required key: RuleArn -- @return ModifyRuleInput structure as a key-value pair table function M.ModifyRuleInput(args) assert(args, "You must provide an argument table when creating ModifyRuleInput") local query_args = { } local uri_args = { } local header_args = { } local all_args = { ["Conditions"] = args["Conditions"], ["RuleArn"] = args["RuleArn"], ["Actions"] = args["Actions"], } asserts.AssertModifyRuleInput(all_args) return { all = all_args, query = query_args, uri = uri_args, headers = header_args, } end keys.TooManyTagsException = { nil } function asserts.AssertTooManyTagsException(struct) assert(struct) assert(type(struct) == "table", "Expected TooManyTagsException to be of type 'table'") for k,_ in pairs(struct) do assert(keys.TooManyTagsException[k], "TooManyTagsException contains unknown key " .. tostring(k)) end end --- Create a structure of type TooManyTagsException -- <p>You've reached the limit on the number of tags per load balancer.</p> -- @param args Table with arguments in key-value form. -- Valid keys: -- @return TooManyTagsException structure as a key-value pair table function M.TooManyTagsException(args) assert(args, "You must provide an argument table when creating TooManyTagsException") local query_args = { } local uri_args = { } local header_args = { } local all_args = { } asserts.AssertTooManyTagsException(all_args) return { all = all_args, query = query_args, uri = uri_args, headers = header_args, } end keys.DescribeRulesOutput = { ["Rules"] = true, ["NextMarker"] = true, nil } function asserts.AssertDescribeRulesOutput(struct) assert(struct) assert(type(struct) == "table", "Expected DescribeRulesOutput to be of type 'table'") if struct["Rules"] then asserts.AssertRules(struct["Rules"]) end if struct["NextMarker"] then asserts.AssertMarker(struct["NextMarker"]) end for k,_ in pairs(struct) do assert(keys.DescribeRulesOutput[k], "DescribeRulesOutput contains unknown key " .. tostring(k)) end end --- Create a structure of type DescribeRulesOutput -- -- @param args Table with arguments in key-value form. -- Valid keys: -- * Rules [Rules] <p>Information about the rules.</p> -- * NextMarker [Marker] <p>The marker to use when requesting the next set of results. If there are no additional results, the string is empty.</p> -- @return DescribeRulesOutput structure as a key-value pair table function M.DescribeRulesOutput(args) assert(args, "You must provide an argument table when creating DescribeRulesOutput") local query_args = { } local uri_args = { } local header_args = { } local all_args = { ["Rules"] = args["Rules"], ["NextMarker"] = args["NextMarker"], } asserts.AssertDescribeRulesOutput(all_args) return { all = all_args, query = query_args, uri = uri_args, headers = header_args, } end keys.SSLPolicyNotFoundException = { nil } function asserts.AssertSSLPolicyNotFoundException(struct) assert(struct) assert(type(struct) == "table", "Expected SSLPolicyNotFoundException to be of type 'table'") for k,_ in pairs(struct) do assert(keys.SSLPolicyNotFoundException[k], "SSLPolicyNotFoundException contains unknown key " .. tostring(k)) end end --- Create a structure of type SSLPolicyNotFoundException -- <p>The specified SSL policy does not exist.</p> -- @param args Table with arguments in key-value form. -- Valid keys: -- @return SSLPolicyNotFoundException structure as a key-value pair table function M.SSLPolicyNotFoundException(args) assert(args, "You must provide an argument table when creating SSLPolicyNotFoundException") local query_args = { } local uri_args = { } local header_args = { } local all_args = { } asserts.AssertSSLPolicyNotFoundException(all_args) return { all = all_args, query = query_args, uri = uri_args, headers = header_args, } end keys.DuplicateListenerException = { nil } function asserts.AssertDuplicateListenerException(struct) assert(struct) assert(type(struct) == "table", "Expected DuplicateListenerException to be of type 'table'") for k,_ in pairs(struct) do assert(keys.DuplicateListenerException[k], "DuplicateListenerException contains unknown key " .. tostring(k)) end end --- Create a structure of type DuplicateListenerException -- <p>A listener with the specified port already exists.</p> -- @param args Table with arguments in key-value form. -- Valid keys: -- @return DuplicateListenerException structure as a key-value pair table function M.DuplicateListenerException(args) assert(args, "You must provide an argument table when creating DuplicateListenerException") local query_args = { } local uri_args = { } local header_args = { } local all_args = { } asserts.AssertDuplicateListenerException(all_args) return { all = all_args, query = query_args, uri = uri_args, headers = header_args, } end keys.DescribeTargetGroupsOutput = { ["NextMarker"] = true, ["TargetGroups"] = true, nil } function asserts.AssertDescribeTargetGroupsOutput(struct) assert(struct) assert(type(struct) == "table", "Expected DescribeTargetGroupsOutput to be of type 'table'") if struct["NextMarker"] then asserts.AssertMarker(struct["NextMarker"]) end if struct["TargetGroups"] then asserts.AssertTargetGroups(struct["TargetGroups"]) end for k,_ in pairs(struct) do assert(keys.DescribeTargetGroupsOutput[k], "DescribeTargetGroupsOutput contains unknown key " .. tostring(k)) end end --- Create a structure of type DescribeTargetGroupsOutput -- -- @param args Table with arguments in key-value form. -- Valid keys: -- * NextMarker [Marker] <p>The marker to use when requesting the next set of results. If there are no additional results, the string is empty.</p> -- * TargetGroups [TargetGroups] <p>Information about the target groups.</p> -- @return DescribeTargetGroupsOutput structure as a key-value pair table function M.DescribeTargetGroupsOutput(args) assert(args, "You must provide an argument table when creating DescribeTargetGroupsOutput") local query_args = { } local uri_args = { } local header_args = { } local all_args = { ["NextMarker"] = args["NextMarker"], ["TargetGroups"] = args["TargetGroups"], } asserts.AssertDescribeTargetGroupsOutput(all_args) return { all = all_args, query = query_args, uri = uri_args, headers = header_args, } end keys.ModifyTargetGroupOutput = { ["TargetGroups"] = true, nil } function asserts.AssertModifyTargetGroupOutput(struct) assert(struct) assert(type(struct) == "table", "Expected ModifyTargetGroupOutput to be of type 'table'") if struct["TargetGroups"] then asserts.AssertTargetGroups(struct["TargetGroups"]) end for k,_ in pairs(struct) do assert(keys.ModifyTargetGroupOutput[k], "ModifyTargetGroupOutput contains unknown key " .. tostring(k)) end end --- Create a structure of type ModifyTargetGroupOutput -- -- @param args Table with arguments in key-value form. -- Valid keys: -- * TargetGroups [TargetGroups] <p>Information about the modified target group.</p> -- @return ModifyTargetGroupOutput structure as a key-value pair table function M.ModifyTargetGroupOutput(args) assert(args, "You must provide an argument table when creating ModifyTargetGroupOutput") local query_args = { } local uri_args = { } local header_args = { } local all_args = { ["TargetGroups"] = args["TargetGroups"], } asserts.AssertModifyTargetGroupOutput(all_args) return { all = all_args, query = query_args, uri = uri_args, headers = header_args, } end keys.ModifyTargetGroupAttributesOutput = { ["Attributes"] = true, nil } function asserts.AssertModifyTargetGroupAttributesOutput(struct) assert(struct) assert(type(struct) == "table", "Expected ModifyTargetGroupAttributesOutput to be of type 'table'") if struct["Attributes"] then asserts.AssertTargetGroupAttributes(struct["Attributes"]) end for k,_ in pairs(struct) do assert(keys.ModifyTargetGroupAttributesOutput[k], "ModifyTargetGroupAttributesOutput contains unknown key " .. tostring(k)) end end --- Create a structure of type ModifyTargetGroupAttributesOutput -- -- @param args Table with arguments in key-value form. -- Valid keys: -- * Attributes [TargetGroupAttributes] <p>Information about the attributes.</p> -- @return ModifyTargetGroupAttributesOutput structure as a key-value pair table function M.ModifyTargetGroupAttributesOutput(args) assert(args, "You must provide an argument table when creating ModifyTargetGroupAttributesOutput") local query_args = { } local uri_args = { } local header_args = { } local all_args = { ["Attributes"] = args["Attributes"], } asserts.AssertModifyTargetGroupAttributesOutput(all_args) return { all = all_args, query = query_args, uri = uri_args, headers = header_args, } end keys.CreateTargetGroupOutput = { ["TargetGroups"] = true, nil } function asserts.AssertCreateTargetGroupOutput(struct) assert(struct) assert(type(struct) == "table", "Expected CreateTargetGroupOutput to be of type 'table'") if struct["TargetGroups"] then asserts.AssertTargetGroups(struct["TargetGroups"]) end for k,_ in pairs(struct) do assert(keys.CreateTargetGroupOutput[k], "CreateTargetGroupOutput contains unknown key " .. tostring(k)) end end --- Create a structure of type CreateTargetGroupOutput -- -- @param args Table with arguments in key-value form. -- Valid keys: -- * TargetGroups [TargetGroups] <p>Information about the target group.</p> -- @return CreateTargetGroupOutput structure as a key-value pair table function M.CreateTargetGroupOutput(args) assert(args, "You must provide an argument table when creating CreateTargetGroupOutput") local query_args = { } local uri_args = { } local header_args = { } local all_args = { ["TargetGroups"] = args["TargetGroups"], } asserts.AssertCreateTargetGroupOutput(all_args) return { all = all_args, query = query_args, uri = uri_args, headers = header_args, } end keys.CreateListenerOutput = { ["Listeners"] = true, nil } function asserts.AssertCreateListenerOutput(struct) assert(struct) assert(type(struct) == "table", "Expected CreateListenerOutput to be of type 'table'") if struct["Listeners"] then asserts.AssertListeners(struct["Listeners"]) end for k,_ in pairs(struct) do assert(keys.CreateListenerOutput[k], "CreateListenerOutput contains unknown key " .. tostring(k)) end end --- Create a structure of type CreateListenerOutput -- -- @param args Table with arguments in key-value form. -- Valid keys: -- * Listeners [Listeners] <p>Information about the listener.</p> -- @return CreateListenerOutput structure as a key-value pair table function M.CreateListenerOutput(args) assert(args, "You must provide an argument table when creating CreateListenerOutput") local query_args = { } local uri_args = { } local header_args = { } local all_args = { ["Listeners"] = args["Listeners"], } asserts.AssertCreateListenerOutput(all_args) return { all = all_args, query = query_args, uri = uri_args, headers = header_args, } end keys.LoadBalancerAddress = { ["IpAddress"] = true, ["AllocationId"] = true, nil } function asserts.AssertLoadBalancerAddress(struct) assert(struct) assert(type(struct) == "table", "Expected LoadBalancerAddress to be of type 'table'") if struct["IpAddress"] then asserts.AssertIpAddress(struct["IpAddress"]) end if struct["AllocationId"] then asserts.AssertAllocationId(struct["AllocationId"]) end for k,_ in pairs(struct) do assert(keys.LoadBalancerAddress[k], "LoadBalancerAddress contains unknown key " .. tostring(k)) end end --- Create a structure of type LoadBalancerAddress -- <p>Information about a static IP address for a load balancer.</p> -- @param args Table with arguments in key-value form. -- Valid keys: -- * IpAddress [IpAddress] <p>The static IP address.</p> -- * AllocationId [AllocationId] <p>[Network Load Balancers] The allocation ID of the Elastic IP address.</p> -- @return LoadBalancerAddress structure as a key-value pair table function M.LoadBalancerAddress(args) assert(args, "You must provide an argument table when creating LoadBalancerAddress") local query_args = { } local uri_args = { } local header_args = { } local all_args = { ["IpAddress"] = args["IpAddress"], ["AllocationId"] = args["AllocationId"], } asserts.AssertLoadBalancerAddress(all_args) return { all = all_args, query = query_args, uri = uri_args, headers = header_args, } end keys.DescribeRulesInput = { ["Marker"] = true, ["RuleArns"] = true, ["PageSize"] = true, ["ListenerArn"] = true, nil } function asserts.AssertDescribeRulesInput(struct) assert(struct) assert(type(struct) == "table", "Expected DescribeRulesInput to be of type 'table'") if struct["Marker"] then asserts.AssertMarker(struct["Marker"]) end if struct["RuleArns"] then asserts.AssertRuleArns(struct["RuleArns"]) end if struct["PageSize"] then asserts.AssertPageSize(struct["PageSize"]) end if struct["ListenerArn"] then asserts.AssertListenerArn(struct["ListenerArn"]) end for k,_ in pairs(struct) do assert(keys.DescribeRulesInput[k], "DescribeRulesInput contains unknown key " .. tostring(k)) end end --- Create a structure of type DescribeRulesInput -- -- @param args Table with arguments in key-value form. -- Valid keys: -- * Marker [Marker] <p>The marker for the next set of results. (You received this marker from a previous call.)</p> -- * RuleArns [RuleArns] <p>The Amazon Resource Names (ARN) of the rules.</p> -- * PageSize [PageSize] <p>The maximum number of results to return with this call.</p> -- * ListenerArn [ListenerArn] <p>The Amazon Resource Name (ARN) of the listener.</p> -- @return DescribeRulesInput structure as a key-value pair table function M.DescribeRulesInput(args) assert(args, "You must provide an argument table when creating DescribeRulesInput") local query_args = { } local uri_args = { } local header_args = { } local all_args = { ["Marker"] = args["Marker"], ["RuleArns"] = args["RuleArns"], ["PageSize"] = args["PageSize"], ["ListenerArn"] = args["ListenerArn"], } asserts.AssertDescribeRulesInput(all_args) return { all = all_args, query = query_args, uri = uri_args, headers = header_args, } end keys.DeleteListenerOutput = { nil } function asserts.AssertDeleteListenerOutput(struct) assert(struct) assert(type(struct) == "table", "Expected DeleteListenerOutput to be of type 'table'") for k,_ in pairs(struct) do assert(keys.DeleteListenerOutput[k], "DeleteListenerOutput contains unknown key " .. tostring(k)) end end --- Create a structure of type DeleteListenerOutput -- -- @param args Table with arguments in key-value form. -- Valid keys: -- @return DeleteListenerOutput structure as a key-value pair table function M.DeleteListenerOutput(args) assert(args, "You must provide an argument table when creating DeleteListenerOutput") local query_args = { } local uri_args = { } local header_args = { } local all_args = { } asserts.AssertDeleteListenerOutput(all_args) return { all = all_args, query = query_args, uri = uri_args, headers = header_args, } end keys.AddTagsOutput = { nil } function asserts.AssertAddTagsOutput(struct) assert(struct) assert(type(struct) == "table", "Expected AddTagsOutput to be of type 'table'") for k,_ in pairs(struct) do assert(keys.AddTagsOutput[k], "AddTagsOutput contains unknown key " .. tostring(k)) end end --- Create a structure of type AddTagsOutput -- -- @param args Table with arguments in key-value form. -- Valid keys: -- @return AddTagsOutput structure as a key-value pair table function M.AddTagsOutput(args) assert(args, "You must provide an argument table when creating AddTagsOutput") local query_args = { } local uri_args = { } local header_args = { } local all_args = { } asserts.AssertAddTagsOutput(all_args) return { all = all_args, query = query_args, uri = uri_args, headers = header_args, } end keys.DescribeTagsOutput = { ["TagDescriptions"] = true, nil } function asserts.AssertDescribeTagsOutput(struct) assert(struct) assert(type(struct) == "table", "Expected DescribeTagsOutput to be of type 'table'") if struct["TagDescriptions"] then asserts.AssertTagDescriptions(struct["TagDescriptions"]) end for k,_ in pairs(struct) do assert(keys.DescribeTagsOutput[k], "DescribeTagsOutput contains unknown key " .. tostring(k)) end end --- Create a structure of type DescribeTagsOutput -- -- @param args Table with arguments in key-value form. -- Valid keys: -- * TagDescriptions [TagDescriptions] <p>Information about the tags.</p> -- @return DescribeTagsOutput structure as a key-value pair table function M.DescribeTagsOutput(args) assert(args, "You must provide an argument table when creating DescribeTagsOutput") local query_args = { } local uri_args = { } local header_args = { } local all_args = { ["TagDescriptions"] = args["TagDescriptions"], } asserts.AssertDescribeTagsOutput(all_args) return { all = all_args, query = query_args, uri = uri_args, headers = header_args, } end keys.ModifyListenerOutput = { ["Listeners"] = true, nil } function asserts.AssertModifyListenerOutput(struct) assert(struct) assert(type(struct) == "table", "Expected ModifyListenerOutput to be of type 'table'") if struct["Listeners"] then asserts.AssertListeners(struct["Listeners"]) end for k,_ in pairs(struct) do assert(keys.ModifyListenerOutput[k], "ModifyListenerOutput contains unknown key " .. tostring(k)) end end --- Create a structure of type ModifyListenerOutput -- -- @param args Table with arguments in key-value form. -- Valid keys: -- * Listeners [Listeners] <p>Information about the modified listener.</p> -- @return ModifyListenerOutput structure as a key-value pair table function M.ModifyListenerOutput(args) assert(args, "You must provide an argument table when creating ModifyListenerOutput") local query_args = { } local uri_args = { } local header_args = { } local all_args = { ["Listeners"] = args["Listeners"], } asserts.AssertModifyListenerOutput(all_args) return { all = all_args, query = query_args, uri = uri_args, headers = header_args, } end keys.SetSubnetsInput = { ["SubnetMappings"] = true, ["Subnets"] = true, ["LoadBalancerArn"] = true, nil } function asserts.AssertSetSubnetsInput(struct) assert(struct) assert(type(struct) == "table", "Expected SetSubnetsInput to be of type 'table'") assert(struct["LoadBalancerArn"], "Expected key LoadBalancerArn to exist in table") if struct["SubnetMappings"] then asserts.AssertSubnetMappings(struct["SubnetMappings"]) end if struct["Subnets"] then asserts.AssertSubnets(struct["Subnets"]) end if struct["LoadBalancerArn"] then asserts.AssertLoadBalancerArn(struct["LoadBalancerArn"]) end for k,_ in pairs(struct) do assert(keys.SetSubnetsInput[k], "SetSubnetsInput contains unknown key " .. tostring(k)) end end --- Create a structure of type SetSubnetsInput -- -- @param args Table with arguments in key-value form. -- Valid keys: -- * SubnetMappings [SubnetMappings] <p>The IDs of the public subnets. You must specify subnets from at least two Availability Zones. You can specify only one subnet per Availability Zone. You must specify either subnets or subnet mappings.</p> <p>You cannot specify Elastic IP addresses for your subnets.</p> -- * Subnets [Subnets] <p>The IDs of the public subnets. You must specify subnets from at least two Availability Zones. You can specify only one subnet per Availability Zone. You must specify either subnets or subnet mappings.</p> -- * LoadBalancerArn [LoadBalancerArn] <p>The Amazon Resource Name (ARN) of the load balancer.</p> -- Required key: LoadBalancerArn -- @return SetSubnetsInput structure as a key-value pair table function M.SetSubnetsInput(args) assert(args, "You must provide an argument table when creating SetSubnetsInput") local query_args = { } local uri_args = { } local header_args = { } local all_args = { ["SubnetMappings"] = args["SubnetMappings"], ["Subnets"] = args["Subnets"], ["LoadBalancerArn"] = args["LoadBalancerArn"], } asserts.AssertSetSubnetsInput(all_args) return { all = all_args, query = query_args, uri = uri_args, headers = header_args, } end keys.LoadBalancerState = { ["Reason"] = true, ["Code"] = true, nil } function asserts.AssertLoadBalancerState(struct) assert(struct) assert(type(struct) == "table", "Expected LoadBalancerState to be of type 'table'") if struct["Reason"] then asserts.AssertStateReason(struct["Reason"]) end if struct["Code"] then asserts.AssertLoadBalancerStateEnum(struct["Code"]) end for k,_ in pairs(struct) do assert(keys.LoadBalancerState[k], "LoadBalancerState contains unknown key " .. tostring(k)) end end --- Create a structure of type LoadBalancerState -- <p>Information about the state of the load balancer.</p> -- @param args Table with arguments in key-value form. -- Valid keys: -- * Reason [StateReason] <p>A description of the state.</p> -- * Code [LoadBalancerStateEnum] <p>The state code. The initial state of the load balancer is <code>provisioning</code>. After the load balancer is fully set up and ready to route traffic, its state is <code>active</code>. If the load balancer could not be set up, its state is <code>failed</code>.</p> -- @return LoadBalancerState structure as a key-value pair table function M.LoadBalancerState(args) assert(args, "You must provide an argument table when creating LoadBalancerState") local query_args = { } local uri_args = { } local header_args = { } local all_args = { ["Reason"] = args["Reason"], ["Code"] = args["Code"], } asserts.AssertLoadBalancerState(all_args) return { all = all_args, query = query_args, uri = uri_args, headers = header_args, } end keys.TargetGroupAssociationLimitException = { nil } function asserts.AssertTargetGroupAssociationLimitException(struct) assert(struct) assert(type(struct) == "table", "Expected TargetGroupAssociationLimitException to be of type 'table'") for k,_ in pairs(struct) do assert(keys.TargetGroupAssociationLimitException[k], "TargetGroupAssociationLimitException contains unknown key " .. tostring(k)) end end --- Create a structure of type TargetGroupAssociationLimitException -- <p>You've reached the limit on the number of load balancers per target group.</p> -- @param args Table with arguments in key-value form. -- Valid keys: -- @return TargetGroupAssociationLimitException structure as a key-value pair table function M.TargetGroupAssociationLimitException(args) assert(args, "You must provide an argument table when creating TargetGroupAssociationLimitException") local query_args = { } local uri_args = { } local header_args = { } local all_args = { } asserts.AssertTargetGroupAssociationLimitException(all_args) return { all = all_args, query = query_args, uri = uri_args, headers = header_args, } end keys.InvalidTargetException = { nil } function asserts.AssertInvalidTargetException(struct) assert(struct) assert(type(struct) == "table", "Expected InvalidTargetException to be of type 'table'") for k,_ in pairs(struct) do assert(keys.InvalidTargetException[k], "InvalidTargetException contains unknown key " .. tostring(k)) end end --- Create a structure of type InvalidTargetException -- <p>The specified target does not exist, is not in the same VPC as the target group, or has an unsupported instance type.</p> -- @param args Table with arguments in key-value form. -- Valid keys: -- @return InvalidTargetException structure as a key-value pair table function M.InvalidTargetException(args) assert(args, "You must provide an argument table when creating InvalidTargetException") local query_args = { } local uri_args = { } local header_args = { } local all_args = { } asserts.AssertInvalidTargetException(all_args) return { all = all_args, query = query_args, uri = uri_args, headers = header_args, } end keys.SubnetMapping = { ["SubnetId"] = true, ["AllocationId"] = true, nil } function asserts.AssertSubnetMapping(struct) assert(struct) assert(type(struct) == "table", "Expected SubnetMapping to be of type 'table'") if struct["SubnetId"] then asserts.AssertSubnetId(struct["SubnetId"]) end if struct["AllocationId"] then asserts.AssertAllocationId(struct["AllocationId"]) end for k,_ in pairs(struct) do assert(keys.SubnetMapping[k], "SubnetMapping contains unknown key " .. tostring(k)) end end --- Create a structure of type SubnetMapping -- <p>Information about a subnet mapping.</p> -- @param args Table with arguments in key-value form. -- Valid keys: -- * SubnetId [SubnetId] <p>The ID of the subnet.</p> -- * AllocationId [AllocationId] <p>[Network Load Balancers] The allocation ID of the Elastic IP address.</p> -- @return SubnetMapping structure as a key-value pair table function M.SubnetMapping(args) assert(args, "You must provide an argument table when creating SubnetMapping") local query_args = { } local uri_args = { } local header_args = { } local all_args = { ["SubnetId"] = args["SubnetId"], ["AllocationId"] = args["AllocationId"], } asserts.AssertSubnetMapping(all_args) return { all = all_args, query = query_args, uri = uri_args, headers = header_args, } end keys.SetSecurityGroupsInput = { ["SecurityGroups"] = true, ["LoadBalancerArn"] = true, nil } function asserts.AssertSetSecurityGroupsInput(struct) assert(struct) assert(type(struct) == "table", "Expected SetSecurityGroupsInput to be of type 'table'") assert(struct["LoadBalancerArn"], "Expected key LoadBalancerArn to exist in table") assert(struct["SecurityGroups"], "Expected key SecurityGroups to exist in table") if struct["SecurityGroups"] then asserts.AssertSecurityGroups(struct["SecurityGroups"]) end if struct["LoadBalancerArn"] then asserts.AssertLoadBalancerArn(struct["LoadBalancerArn"]) end for k,_ in pairs(struct) do assert(keys.SetSecurityGroupsInput[k], "SetSecurityGroupsInput contains unknown key " .. tostring(k)) end end --- Create a structure of type SetSecurityGroupsInput -- -- @param args Table with arguments in key-value form. -- Valid keys: -- * SecurityGroups [SecurityGroups] <p>The IDs of the security groups.</p> -- * LoadBalancerArn [LoadBalancerArn] <p>The Amazon Resource Name (ARN) of the load balancer.</p> -- Required key: LoadBalancerArn -- Required key: SecurityGroups -- @return SetSecurityGroupsInput structure as a key-value pair table function M.SetSecurityGroupsInput(args) assert(args, "You must provide an argument table when creating SetSecurityGroupsInput") local query_args = { } local uri_args = { } local header_args = { } local all_args = { ["SecurityGroups"] = args["SecurityGroups"], ["LoadBalancerArn"] = args["LoadBalancerArn"], } asserts.AssertSetSecurityGroupsInput(all_args) return { all = all_args, query = query_args, uri = uri_args, headers = header_args, } end keys.LoadBalancerAttribute = { ["Value"] = true, ["Key"] = true, nil } function asserts.AssertLoadBalancerAttribute(struct) assert(struct) assert(type(struct) == "table", "Expected LoadBalancerAttribute to be of type 'table'") if struct["Value"] then asserts.AssertLoadBalancerAttributeValue(struct["Value"]) end if struct["Key"] then asserts.AssertLoadBalancerAttributeKey(struct["Key"]) end for k,_ in pairs(struct) do assert(keys.LoadBalancerAttribute[k], "LoadBalancerAttribute contains unknown key " .. tostring(k)) end end --- Create a structure of type LoadBalancerAttribute -- <p>Information about a load balancer attribute.</p> -- @param args Table with arguments in key-value form. -- Valid keys: -- * Value [LoadBalancerAttributeValue] <p>The value of the attribute.</p> -- * Key [LoadBalancerAttributeKey] <p>The name of the attribute.</p> <p>The following attributes are supported by both Application Load Balancers and Network Load Balancers:</p> <ul> <li> <p> <code>deletion_protection.enabled</code> - Indicates whether deletion protection is enabled. The value is <code>true</code> or <code>false</code>. The default is <code>false</code>.</p> </li> </ul> <p>The following attributes are supported by only Application Load Balancers:</p> <ul> <li> <p> <code>access_logs.s3.enabled</code> - Indicates whether access logs are enabled. The value is <code>true</code> or <code>false</code>. The default is <code>false</code>.</p> </li> <li> <p> <code>access_logs.s3.bucket</code> - The name of the S3 bucket for the access logs. This attribute is required if access logs are enabled. The bucket must exist in the same region as the load balancer and have a bucket policy that grants Elastic Load Balancing permissions to write to the bucket.</p> </li> <li> <p> <code>access_logs.s3.prefix</code> - The prefix for the location in the S3 bucket for the access logs.</p> </li> <li> <p> <code>idle_timeout.timeout_seconds</code> - The idle timeout value, in seconds. The valid range is 1-4000 seconds. The default is 60 seconds.</p> </li> <li> <p> <code>routing.http2.enabled</code> - Indicates whether HTTP/2 is enabled. The value is <code>true</code> or <code>false</code>. The default is <code>true</code>.</p> </li> </ul> <p>The following attributes are supported by only Network Load Balancers:</p> <ul> <li> <p> <code>load_balancing.cross_zone.enabled</code> - Indicates whether cross-zone load balancing is enabled. The value is <code>true</code> or <code>false</code>. The default is <code>false</code>.</p> </li> </ul> -- @return LoadBalancerAttribute structure as a key-value pair table function M.LoadBalancerAttribute(args) assert(args, "You must provide an argument table when creating LoadBalancerAttribute") local query_args = { } local uri_args = { } local header_args = { } local all_args = { ["Value"] = args["Value"], ["Key"] = args["Key"], } asserts.AssertLoadBalancerAttribute(all_args) return { all = all_args, query = query_args, uri = uri_args, headers = header_args, } end keys.DescribeTargetGroupsInput = { ["Marker"] = true, ["TargetGroupArns"] = true, ["LoadBalancerArn"] = true, ["Names"] = true, ["PageSize"] = true, nil } function asserts.AssertDescribeTargetGroupsInput(struct) assert(struct) assert(type(struct) == "table", "Expected DescribeTargetGroupsInput to be of type 'table'") if struct["Marker"] then asserts.AssertMarker(struct["Marker"]) end if struct["TargetGroupArns"] then asserts.AssertTargetGroupArns(struct["TargetGroupArns"]) end if struct["LoadBalancerArn"] then asserts.AssertLoadBalancerArn(struct["LoadBalancerArn"]) end if struct["Names"] then asserts.AssertTargetGroupNames(struct["Names"]) end if struct["PageSize"] then asserts.AssertPageSize(struct["PageSize"]) end for k,_ in pairs(struct) do assert(keys.DescribeTargetGroupsInput[k], "DescribeTargetGroupsInput contains unknown key " .. tostring(k)) end end --- Create a structure of type DescribeTargetGroupsInput -- -- @param args Table with arguments in key-value form. -- Valid keys: -- * Marker [Marker] <p>The marker for the next set of results. (You received this marker from a previous call.)</p> -- * TargetGroupArns [TargetGroupArns] <p>The Amazon Resource Names (ARN) of the target groups.</p> -- * LoadBalancerArn [LoadBalancerArn] <p>The Amazon Resource Name (ARN) of the load balancer.</p> -- * Names [TargetGroupNames] <p>The names of the target groups.</p> -- * PageSize [PageSize] <p>The maximum number of results to return with this call.</p> -- @return DescribeTargetGroupsInput structure as a key-value pair table function M.DescribeTargetGroupsInput(args) assert(args, "You must provide an argument table when creating DescribeTargetGroupsInput") local query_args = { } local uri_args = { } local header_args = { } local all_args = { ["Marker"] = args["Marker"], ["TargetGroupArns"] = args["TargetGroupArns"], ["LoadBalancerArn"] = args["LoadBalancerArn"], ["Names"] = args["Names"], ["PageSize"] = args["PageSize"], } asserts.AssertDescribeTargetGroupsInput(all_args) return { all = all_args, query = query_args, uri = uri_args, headers = header_args, } end keys.DescribeListenersOutput = { ["Listeners"] = true, ["NextMarker"] = true, nil } function asserts.AssertDescribeListenersOutput(struct) assert(struct) assert(type(struct) == "table", "Expected DescribeListenersOutput to be of type 'table'") if struct["Listeners"] then asserts.AssertListeners(struct["Listeners"]) end if struct["NextMarker"] then asserts.AssertMarker(struct["NextMarker"]) end for k,_ in pairs(struct) do assert(keys.DescribeListenersOutput[k], "DescribeListenersOutput contains unknown key " .. tostring(k)) end end --- Create a structure of type DescribeListenersOutput -- -- @param args Table with arguments in key-value form. -- Valid keys: -- * Listeners [Listeners] <p>Information about the listeners.</p> -- * NextMarker [Marker] <p>The marker to use when requesting the next set of results. If there are no additional results, the string is empty.</p> -- @return DescribeListenersOutput structure as a key-value pair table function M.DescribeListenersOutput(args) assert(args, "You must provide an argument table when creating DescribeListenersOutput") local query_args = { } local uri_args = { } local header_args = { } local all_args = { ["Listeners"] = args["Listeners"], ["NextMarker"] = args["NextMarker"], } asserts.AssertDescribeListenersOutput(all_args) return { all = all_args, query = query_args, uri = uri_args, headers = header_args, } end keys.RemoveTagsInput = { ["TagKeys"] = true, ["ResourceArns"] = true, nil } function asserts.AssertRemoveTagsInput(struct) assert(struct) assert(type(struct) == "table", "Expected RemoveTagsInput to be of type 'table'") assert(struct["ResourceArns"], "Expected key ResourceArns to exist in table") assert(struct["TagKeys"], "Expected key TagKeys to exist in table") if struct["TagKeys"] then asserts.AssertTagKeys(struct["TagKeys"]) end if struct["ResourceArns"] then asserts.AssertResourceArns(struct["ResourceArns"]) end for k,_ in pairs(struct) do assert(keys.RemoveTagsInput[k], "RemoveTagsInput contains unknown key " .. tostring(k)) end end --- Create a structure of type RemoveTagsInput -- -- @param args Table with arguments in key-value form. -- Valid keys: -- * TagKeys [TagKeys] <p>The tag keys for the tags to remove.</p> -- * ResourceArns [ResourceArns] <p>The Amazon Resource Name (ARN) of the resource.</p> -- Required key: ResourceArns -- Required key: TagKeys -- @return RemoveTagsInput structure as a key-value pair table function M.RemoveTagsInput(args) assert(args, "You must provide an argument table when creating RemoveTagsInput") local query_args = { } local uri_args = { } local header_args = { } local all_args = { ["TagKeys"] = args["TagKeys"], ["ResourceArns"] = args["ResourceArns"], } asserts.AssertRemoveTagsInput(all_args) return { all = all_args, query = query_args, uri = uri_args, headers = header_args, } end keys.Rule = { ["Priority"] = true, ["Conditions"] = true, ["RuleArn"] = true, ["IsDefault"] = true, ["Actions"] = true, nil } function asserts.AssertRule(struct) assert(struct) assert(type(struct) == "table", "Expected Rule to be of type 'table'") if struct["Priority"] then asserts.AssertString(struct["Priority"]) end if struct["Conditions"] then asserts.AssertRuleConditionList(struct["Conditions"]) end if struct["RuleArn"] then asserts.AssertRuleArn(struct["RuleArn"]) end if struct["IsDefault"] then asserts.AssertIsDefault(struct["IsDefault"]) end if struct["Actions"] then asserts.AssertActions(struct["Actions"]) end for k,_ in pairs(struct) do assert(keys.Rule[k], "Rule contains unknown key " .. tostring(k)) end end --- Create a structure of type Rule -- <p>Information about a rule.</p> -- @param args Table with arguments in key-value form. -- Valid keys: -- * Priority [String] <p>The priority.</p> -- * Conditions [RuleConditionList] <p>The conditions.</p> -- * RuleArn [RuleArn] <p>The Amazon Resource Name (ARN) of the rule.</p> -- * IsDefault [IsDefault] <p>Indicates whether this is the default rule.</p> -- * Actions [Actions] <p>The actions.</p> -- @return Rule structure as a key-value pair table function M.Rule(args) assert(args, "You must provide an argument table when creating Rule") local query_args = { } local uri_args = { } local header_args = { } local all_args = { ["Priority"] = args["Priority"], ["Conditions"] = args["Conditions"], ["RuleArn"] = args["RuleArn"], ["IsDefault"] = args["IsDefault"], ["Actions"] = args["Actions"], } asserts.AssertRule(all_args) return { all = all_args, query = query_args, uri = uri_args, headers = header_args, } end keys.LoadBalancerNotFoundException = { nil } function asserts.AssertLoadBalancerNotFoundException(struct) assert(struct) assert(type(struct) == "table", "Expected LoadBalancerNotFoundException to be of type 'table'") for k,_ in pairs(struct) do assert(keys.LoadBalancerNotFoundException[k], "LoadBalancerNotFoundException contains unknown key " .. tostring(k)) end end --- Create a structure of type LoadBalancerNotFoundException -- <p>The specified load balancer does not exist.</p> -- @param args Table with arguments in key-value form. -- Valid keys: -- @return LoadBalancerNotFoundException structure as a key-value pair table function M.LoadBalancerNotFoundException(args) assert(args, "You must provide an argument table when creating LoadBalancerNotFoundException") local query_args = { } local uri_args = { } local header_args = { } local all_args = { } asserts.AssertLoadBalancerNotFoundException(all_args) return { all = all_args, query = query_args, uri = uri_args, headers = header_args, } end keys.TargetDescription = { ["AvailabilityZone"] = true, ["Id"] = true, ["Port"] = true, nil } function asserts.AssertTargetDescription(struct) assert(struct) assert(type(struct) == "table", "Expected TargetDescription to be of type 'table'") assert(struct["Id"], "Expected key Id to exist in table") if struct["AvailabilityZone"] then asserts.AssertZoneName(struct["AvailabilityZone"]) end if struct["Id"] then asserts.AssertTargetId(struct["Id"]) end if struct["Port"] then asserts.AssertPort(struct["Port"]) end for k,_ in pairs(struct) do assert(keys.TargetDescription[k], "TargetDescription contains unknown key " .. tostring(k)) end end --- Create a structure of type TargetDescription -- <p>Information about a target.</p> -- @param args Table with arguments in key-value form. -- Valid keys: -- * AvailabilityZone [ZoneName] <p>An Availability Zone or <code>all</code>. This determines whether the target receives traffic from the load balancer nodes in the specified Availability Zone or from all enabled Availability Zones for the load balancer.</p> <p>This parameter is not supported if the target type of the target group is <code>instance</code>. If the IP address is in a subnet of the VPC for the target group, the Availability Zone is automatically detected and this parameter is optional. If the IP address is outside the VPC, this parameter is required.</p> <p>With an Application Load Balancer, if the IP address is outside the VPC for the target group, the only supported value is <code>all</code>.</p> -- * Id [TargetId] <p>The ID of the target. If the target type of the target group is <code>instance</code>, specify an instance ID. If the target type is <code>ip</code>, specify an IP address.</p> -- * Port [Port] <p>The port on which the target is listening.</p> -- Required key: Id -- @return TargetDescription structure as a key-value pair table function M.TargetDescription(args) assert(args, "You must provide an argument table when creating TargetDescription") local query_args = { } local uri_args = { } local header_args = { } local all_args = { ["AvailabilityZone"] = args["AvailabilityZone"], ["Id"] = args["Id"], ["Port"] = args["Port"], } asserts.AssertTargetDescription(all_args) return { all = all_args, query = query_args, uri = uri_args, headers = header_args, } end keys.SetIpAddressTypeOutput = { ["IpAddressType"] = true, nil } function asserts.AssertSetIpAddressTypeOutput(struct) assert(struct) assert(type(struct) == "table", "Expected SetIpAddressTypeOutput to be of type 'table'") if struct["IpAddressType"] then asserts.AssertIpAddressType(struct["IpAddressType"]) end for k,_ in pairs(struct) do assert(keys.SetIpAddressTypeOutput[k], "SetIpAddressTypeOutput contains unknown key " .. tostring(k)) end end --- Create a structure of type SetIpAddressTypeOutput -- -- @param args Table with arguments in key-value form. -- Valid keys: -- * IpAddressType [IpAddressType] <p>The IP address type.</p> -- @return SetIpAddressTypeOutput structure as a key-value pair table function M.SetIpAddressTypeOutput(args) assert(args, "You must provide an argument table when creating SetIpAddressTypeOutput") local query_args = { } local uri_args = { } local header_args = { } local all_args = { ["IpAddressType"] = args["IpAddressType"], } asserts.AssertSetIpAddressTypeOutput(all_args) return { all = all_args, query = query_args, uri = uri_args, headers = header_args, } end keys.DescribeSSLPoliciesInput = { ["Marker"] = true, ["Names"] = true, ["PageSize"] = true, nil } function asserts.AssertDescribeSSLPoliciesInput(struct) assert(struct) assert(type(struct) == "table", "Expected DescribeSSLPoliciesInput to be of type 'table'") if struct["Marker"] then asserts.AssertMarker(struct["Marker"]) end if struct["Names"] then asserts.AssertSslPolicyNames(struct["Names"]) end if struct["PageSize"] then asserts.AssertPageSize(struct["PageSize"]) end for k,_ in pairs(struct) do assert(keys.DescribeSSLPoliciesInput[k], "DescribeSSLPoliciesInput contains unknown key " .. tostring(k)) end end --- Create a structure of type DescribeSSLPoliciesInput -- -- @param args Table with arguments in key-value form. -- Valid keys: -- * Marker [Marker] <p>The marker for the next set of results. (You received this marker from a previous call.)</p> -- * Names [SslPolicyNames] <p>The names of the policies.</p> -- * PageSize [PageSize] <p>The maximum number of results to return with this call.</p> -- @return DescribeSSLPoliciesInput structure as a key-value pair table function M.DescribeSSLPoliciesInput(args) assert(args, "You must provide an argument table when creating DescribeSSLPoliciesInput") local query_args = { } local uri_args = { } local header_args = { } local all_args = { ["Marker"] = args["Marker"], ["Names"] = args["Names"], ["PageSize"] = args["PageSize"], } asserts.AssertDescribeSSLPoliciesInput(all_args) return { all = all_args, query = query_args, uri = uri_args, headers = header_args, } end keys.AddListenerCertificatesInput = { ["Certificates"] = true, ["ListenerArn"] = true, nil } function asserts.AssertAddListenerCertificatesInput(struct) assert(struct) assert(type(struct) == "table", "Expected AddListenerCertificatesInput to be of type 'table'") assert(struct["ListenerArn"], "Expected key ListenerArn to exist in table") assert(struct["Certificates"], "Expected key Certificates to exist in table") if struct["Certificates"] then asserts.AssertCertificateList(struct["Certificates"]) end if struct["ListenerArn"] then asserts.AssertListenerArn(struct["ListenerArn"]) end for k,_ in pairs(struct) do assert(keys.AddListenerCertificatesInput[k], "AddListenerCertificatesInput contains unknown key " .. tostring(k)) end end --- Create a structure of type AddListenerCertificatesInput -- -- @param args Table with arguments in key-value form. -- Valid keys: -- * Certificates [CertificateList] <p>The certificate to add. You can specify one certificate per call.</p> -- * ListenerArn [ListenerArn] <p>The Amazon Resource Name (ARN) of the listener.</p> -- Required key: ListenerArn -- Required key: Certificates -- @return AddListenerCertificatesInput structure as a key-value pair table function M.AddListenerCertificatesInput(args) assert(args, "You must provide an argument table when creating AddListenerCertificatesInput") local query_args = { } local uri_args = { } local header_args = { } local all_args = { ["Certificates"] = args["Certificates"], ["ListenerArn"] = args["ListenerArn"], } asserts.AssertAddListenerCertificatesInput(all_args) return { all = all_args, query = query_args, uri = uri_args, headers = header_args, } end keys.RedirectActionConfig = { ["Protocol"] = true, ["Host"] = true, ["Query"] = true, ["Path"] = true, ["Port"] = true, ["StatusCode"] = true, nil } function asserts.AssertRedirectActionConfig(struct) assert(struct) assert(type(struct) == "table", "Expected RedirectActionConfig to be of type 'table'") assert(struct["StatusCode"], "Expected key StatusCode to exist in table") if struct["Protocol"] then asserts.AssertRedirectActionProtocol(struct["Protocol"]) end if struct["Host"] then asserts.AssertRedirectActionHost(struct["Host"]) end if struct["Query"] then asserts.AssertRedirectActionQuery(struct["Query"]) end if struct["Path"] then asserts.AssertRedirectActionPath(struct["Path"]) end if struct["Port"] then asserts.AssertRedirectActionPort(struct["Port"]) end if struct["StatusCode"] then asserts.AssertRedirectActionStatusCodeEnum(struct["StatusCode"]) end for k,_ in pairs(struct) do assert(keys.RedirectActionConfig[k], "RedirectActionConfig contains unknown key " .. tostring(k)) end end --- Create a structure of type RedirectActionConfig -- <p>Information about a redirect action.</p> <p>A URI consists of the following components: protocol://hostname:port/path?query. You must modify at least one of the following components to avoid a redirect loop: protocol, hostname, port, or path. Any components that you do not modify retain their original values.</p> <p>You can reuse URI components using the following reserved keywords:</p> <ul> <li> <p>#{protocol}</p> </li> <li> <p>#{host}</p> </li> <li> <p>#{port}</p> </li> <li> <p>#{path} (the leading "/" is removed)</p> </li> <li> <p>#{query}</p> </li> </ul> <p>For example, you can change the path to "/new/#{path}", the hostname to "example.#{host}", or the query to "#{query}&amp;value=xyz".</p> -- @param args Table with arguments in key-value form. -- Valid keys: -- * Protocol [RedirectActionProtocol] <p>The protocol. You can specify HTTP, HTTPS, or #{protocol}. You can redirect HTTP to HTTP, HTTP to HTTPS, and HTTPS to HTTPS. You cannot redirect HTTPS to HTTP.</p> -- * Host [RedirectActionHost] <p>The hostname. This component is not percent-encoded. The hostname can contain #{host}.</p> -- * Query [RedirectActionQuery] <p>The query parameters, URL-encoded when necessary, but not percent-encoded. Do not include the leading "?", as it is automatically added. You can specify any of the reserved keywords.</p> -- * Path [RedirectActionPath] <p>The absolute path, starting with the leading "/". This component is not percent-encoded. The path can contain #{host}, #{path}, and #{port}.</p> -- * Port [RedirectActionPort] <p>The port. You can specify a value from 1 to 65535 or #{port}.</p> -- * StatusCode [RedirectActionStatusCodeEnum] <p>The HTTP redirect code. The redirect is either permanent (HTTP 301) or temporary (HTTP 302).</p> -- Required key: StatusCode -- @return RedirectActionConfig structure as a key-value pair table function M.RedirectActionConfig(args) assert(args, "You must provide an argument table when creating RedirectActionConfig") local query_args = { } local uri_args = { } local header_args = { } local all_args = { ["Protocol"] = args["Protocol"], ["Host"] = args["Host"], ["Query"] = args["Query"], ["Path"] = args["Path"], ["Port"] = args["Port"], ["StatusCode"] = args["StatusCode"], } asserts.AssertRedirectActionConfig(all_args) return { all = all_args, query = query_args, uri = uri_args, headers = header_args, } end keys.FixedResponseActionConfig = { ["ContentType"] = true, ["MessageBody"] = true, ["StatusCode"] = true, nil } function asserts.AssertFixedResponseActionConfig(struct) assert(struct) assert(type(struct) == "table", "Expected FixedResponseActionConfig to be of type 'table'") assert(struct["StatusCode"], "Expected key StatusCode to exist in table") if struct["ContentType"] then asserts.AssertFixedResponseActionContentType(struct["ContentType"]) end if struct["MessageBody"] then asserts.AssertFixedResponseActionMessage(struct["MessageBody"]) end if struct["StatusCode"] then asserts.AssertFixedResponseActionStatusCode(struct["StatusCode"]) end for k,_ in pairs(struct) do assert(keys.FixedResponseActionConfig[k], "FixedResponseActionConfig contains unknown key " .. tostring(k)) end end --- Create a structure of type FixedResponseActionConfig -- <p>Information about an action that returns a custom HTTP response.</p> -- @param args Table with arguments in key-value form. -- Valid keys: -- * ContentType [FixedResponseActionContentType] <p>The content type.</p> <p>Valid Values: text/plain | text/css | text/html | application/javascript | application/json</p> -- * MessageBody [FixedResponseActionMessage] <p>The message.</p> -- * StatusCode [FixedResponseActionStatusCode] <p>The HTTP response code (2XX, 4XX, or 5XX).</p> -- Required key: StatusCode -- @return FixedResponseActionConfig structure as a key-value pair table function M.FixedResponseActionConfig(args) assert(args, "You must provide an argument table when creating FixedResponseActionConfig") local query_args = { } local uri_args = { } local header_args = { } local all_args = { ["ContentType"] = args["ContentType"], ["MessageBody"] = args["MessageBody"], ["StatusCode"] = args["StatusCode"], } asserts.AssertFixedResponseActionConfig(all_args) return { all = all_args, query = query_args, uri = uri_args, headers = header_args, } end keys.CreateRuleOutput = { ["Rules"] = true, nil } function asserts.AssertCreateRuleOutput(struct) assert(struct) assert(type(struct) == "table", "Expected CreateRuleOutput to be of type 'table'") if struct["Rules"] then asserts.AssertRules(struct["Rules"]) end for k,_ in pairs(struct) do assert(keys.CreateRuleOutput[k], "CreateRuleOutput contains unknown key " .. tostring(k)) end end --- Create a structure of type CreateRuleOutput -- -- @param args Table with arguments in key-value form. -- Valid keys: -- * Rules [Rules] <p>Information about the rule.</p> -- @return CreateRuleOutput structure as a key-value pair table function M.CreateRuleOutput(args) assert(args, "You must provide an argument table when creating CreateRuleOutput") local query_args = { } local uri_args = { } local header_args = { } local all_args = { ["Rules"] = args["Rules"], } asserts.AssertCreateRuleOutput(all_args) return { all = all_args, query = query_args, uri = uri_args, headers = header_args, } end keys.LoadBalancer = { ["IpAddressType"] = true, ["VpcId"] = true, ["LoadBalancerArn"] = true, ["State"] = true, ["DNSName"] = true, ["SecurityGroups"] = true, ["LoadBalancerName"] = true, ["CreatedTime"] = true, ["Scheme"] = true, ["Type"] = true, ["CanonicalHostedZoneId"] = true, ["AvailabilityZones"] = true, nil } function asserts.AssertLoadBalancer(struct) assert(struct) assert(type(struct) == "table", "Expected LoadBalancer to be of type 'table'") if struct["IpAddressType"] then asserts.AssertIpAddressType(struct["IpAddressType"]) end if struct["VpcId"] then asserts.AssertVpcId(struct["VpcId"]) end if struct["LoadBalancerArn"] then asserts.AssertLoadBalancerArn(struct["LoadBalancerArn"]) end if struct["State"] then asserts.AssertLoadBalancerState(struct["State"]) end if struct["DNSName"] then asserts.AssertDNSName(struct["DNSName"]) end if struct["SecurityGroups"] then asserts.AssertSecurityGroups(struct["SecurityGroups"]) end if struct["LoadBalancerName"] then asserts.AssertLoadBalancerName(struct["LoadBalancerName"]) end if struct["CreatedTime"] then asserts.AssertCreatedTime(struct["CreatedTime"]) end if struct["Scheme"] then asserts.AssertLoadBalancerSchemeEnum(struct["Scheme"]) end if struct["Type"] then asserts.AssertLoadBalancerTypeEnum(struct["Type"]) end if struct["CanonicalHostedZoneId"] then asserts.AssertCanonicalHostedZoneId(struct["CanonicalHostedZoneId"]) end if struct["AvailabilityZones"] then asserts.AssertAvailabilityZones(struct["AvailabilityZones"]) end for k,_ in pairs(struct) do assert(keys.LoadBalancer[k], "LoadBalancer contains unknown key " .. tostring(k)) end end --- Create a structure of type LoadBalancer -- <p>Information about a load balancer.</p> -- @param args Table with arguments in key-value form. -- Valid keys: -- * IpAddressType [IpAddressType] <p>The type of IP addresses used by the subnets for your load balancer. The possible values are <code>ipv4</code> (for IPv4 addresses) and <code>dualstack</code> (for IPv4 and IPv6 addresses).</p> -- * VpcId [VpcId] <p>The ID of the VPC for the load balancer.</p> -- * LoadBalancerArn [LoadBalancerArn] <p>The Amazon Resource Name (ARN) of the load balancer.</p> -- * State [LoadBalancerState] <p>The state of the load balancer.</p> -- * DNSName [DNSName] <p>The public DNS name of the load balancer.</p> -- * SecurityGroups [SecurityGroups] <p>The IDs of the security groups for the load balancer.</p> -- * LoadBalancerName [LoadBalancerName] <p>The name of the load balancer.</p> -- * CreatedTime [CreatedTime] <p>The date and time the load balancer was created.</p> -- * Scheme [LoadBalancerSchemeEnum] <p>The nodes of an Internet-facing load balancer have public IP addresses. The DNS name of an Internet-facing load balancer is publicly resolvable to the public IP addresses of the nodes. Therefore, Internet-facing load balancers can route requests from clients over the internet.</p> <p>The nodes of an internal load balancer have only private IP addresses. The DNS name of an internal load balancer is publicly resolvable to the private IP addresses of the nodes. Therefore, internal load balancers can only route requests from clients with access to the VPC for the load balancer.</p> -- * Type [LoadBalancerTypeEnum] <p>The type of load balancer.</p> -- * CanonicalHostedZoneId [CanonicalHostedZoneId] <p>The ID of the Amazon Route 53 hosted zone associated with the load balancer.</p> -- * AvailabilityZones [AvailabilityZones] <p>The Availability Zones for the load balancer.</p> -- @return LoadBalancer structure as a key-value pair table function M.LoadBalancer(args) assert(args, "You must provide an argument table when creating LoadBalancer") local query_args = { } local uri_args = { } local header_args = { } local all_args = { ["IpAddressType"] = args["IpAddressType"], ["VpcId"] = args["VpcId"], ["LoadBalancerArn"] = args["LoadBalancerArn"], ["State"] = args["State"], ["DNSName"] = args["DNSName"], ["SecurityGroups"] = args["SecurityGroups"], ["LoadBalancerName"] = args["LoadBalancerName"], ["CreatedTime"] = args["CreatedTime"], ["Scheme"] = args["Scheme"], ["Type"] = args["Type"], ["CanonicalHostedZoneId"] = args["CanonicalHostedZoneId"], ["AvailabilityZones"] = args["AvailabilityZones"], } asserts.AssertLoadBalancer(all_args) return { all = all_args, query = query_args, uri = uri_args, headers = header_args, } end function asserts.AssertAuthenticateCognitoActionAuthenticationRequestParamValue(str) assert(str) assert(type(str) == "string", "Expected AuthenticateCognitoActionAuthenticationRequestParamValue to be of type 'string'") end -- function M.AuthenticateCognitoActionAuthenticationRequestParamValue(str) asserts.AssertAuthenticateCognitoActionAuthenticationRequestParamValue(str) return str end function asserts.AssertDNSName(str) assert(str) assert(type(str) == "string", "Expected DNSName to be of type 'string'") end -- function M.DNSName(str) asserts.AssertDNSName(str) return str end function asserts.AssertLoadBalancerSchemeEnum(str) assert(str) assert(type(str) == "string", "Expected LoadBalancerSchemeEnum to be of type 'string'") end -- function M.LoadBalancerSchemeEnum(str) asserts.AssertLoadBalancerSchemeEnum(str) return str end function asserts.AssertTagKey(str) assert(str) assert(type(str) == "string", "Expected TagKey to be of type 'string'") assert(#str <= 128, "Expected string to be max 128 characters") assert(#str >= 1, "Expected string to be min 1 characters") end -- function M.TagKey(str) asserts.AssertTagKey(str) return str end function asserts.AssertPath(str) assert(str) assert(type(str) == "string", "Expected Path to be of type 'string'") assert(#str <= 1024, "Expected string to be max 1024 characters") assert(#str >= 1, "Expected string to be min 1 characters") end -- function M.Path(str) asserts.AssertPath(str) return str end function asserts.AssertConditionFieldName(str) assert(str) assert(type(str) == "string", "Expected ConditionFieldName to be of type 'string'") assert(#str <= 64, "Expected string to be max 64 characters") end -- function M.ConditionFieldName(str) asserts.AssertConditionFieldName(str) return str end function asserts.AssertAuthenticateOidcActionTokenEndpoint(str) assert(str) assert(type(str) == "string", "Expected AuthenticateOidcActionTokenEndpoint to be of type 'string'") end -- function M.AuthenticateOidcActionTokenEndpoint(str) asserts.AssertAuthenticateOidcActionTokenEndpoint(str) return str end function asserts.AssertTargetGroupArn(str) assert(str) assert(type(str) == "string", "Expected TargetGroupArn to be of type 'string'") end -- function M.TargetGroupArn(str) asserts.AssertTargetGroupArn(str) return str end function asserts.AssertIpAddressType(str) assert(str) assert(type(str) == "string", "Expected IpAddressType to be of type 'string'") end -- function M.IpAddressType(str) asserts.AssertIpAddressType(str) return str end function asserts.AssertTargetGroupAttributeKey(str) assert(str) assert(type(str) == "string", "Expected TargetGroupAttributeKey to be of type 'string'") assert(#str <= 256, "Expected string to be max 256 characters") end -- function M.TargetGroupAttributeKey(str) asserts.AssertTargetGroupAttributeKey(str) return str end function asserts.AssertAuthenticateOidcActionUserInfoEndpoint(str) assert(str) assert(type(str) == "string", "Expected AuthenticateOidcActionUserInfoEndpoint to be of type 'string'") end -- function M.AuthenticateOidcActionUserInfoEndpoint(str) asserts.AssertAuthenticateOidcActionUserInfoEndpoint(str) return str end function asserts.AssertLoadBalancerName(str) assert(str) assert(type(str) == "string", "Expected LoadBalancerName to be of type 'string'") end -- function M.LoadBalancerName(str) asserts.AssertLoadBalancerName(str) return str end function asserts.AssertStringValue(str) assert(str) assert(type(str) == "string", "Expected StringValue to be of type 'string'") end -- function M.StringValue(str) asserts.AssertStringValue(str) return str end function asserts.AssertLoadBalancerAttributeValue(str) assert(str) assert(type(str) == "string", "Expected LoadBalancerAttributeValue to be of type 'string'") assert(#str <= 1024, "Expected string to be max 1024 characters") end -- function M.LoadBalancerAttributeValue(str) asserts.AssertLoadBalancerAttributeValue(str) return str end function asserts.AssertAuthenticateOidcActionAuthenticationRequestParamValue(str) assert(str) assert(type(str) == "string", "Expected AuthenticateOidcActionAuthenticationRequestParamValue to be of type 'string'") end -- function M.AuthenticateOidcActionAuthenticationRequestParamValue(str) asserts.AssertAuthenticateOidcActionAuthenticationRequestParamValue(str) return str end function asserts.AssertFixedResponseActionMessage(str) assert(str) assert(type(str) == "string", "Expected FixedResponseActionMessage to be of type 'string'") assert(#str <= 1024, "Expected string to be max 1024 characters") end -- function M.FixedResponseActionMessage(str) asserts.AssertFixedResponseActionMessage(str) return str end function asserts.AssertTargetHealthReasonEnum(str) assert(str) assert(type(str) == "string", "Expected TargetHealthReasonEnum to be of type 'string'") end -- function M.TargetHealthReasonEnum(str) asserts.AssertTargetHealthReasonEnum(str) return str end function asserts.AssertLoadBalancerAttributeKey(str) assert(str) assert(type(str) == "string", "Expected LoadBalancerAttributeKey to be of type 'string'") assert(#str <= 256, "Expected string to be max 256 characters") end -- function M.LoadBalancerAttributeKey(str) asserts.AssertLoadBalancerAttributeKey(str) return str end function asserts.AssertAuthenticateOidcActionIssuer(str) assert(str) assert(type(str) == "string", "Expected AuthenticateOidcActionIssuer to be of type 'string'") end -- function M.AuthenticateOidcActionIssuer(str) asserts.AssertAuthenticateOidcActionIssuer(str) return str end function asserts.AssertTargetGroupAttributeValue(str) assert(str) assert(type(str) == "string", "Expected TargetGroupAttributeValue to be of type 'string'") end -- function M.TargetGroupAttributeValue(str) asserts.AssertTargetGroupAttributeValue(str) return str end function asserts.AssertString(str) assert(str) assert(type(str) == "string", "Expected String to be of type 'string'") end -- function M.String(str) asserts.AssertString(str) return str end function asserts.AssertResourceArn(str) assert(str) assert(type(str) == "string", "Expected ResourceArn to be of type 'string'") end -- function M.ResourceArn(str) asserts.AssertResourceArn(str) return str end function asserts.AssertZoneName(str) assert(str) assert(type(str) == "string", "Expected ZoneName to be of type 'string'") end -- function M.ZoneName(str) asserts.AssertZoneName(str) return str end function asserts.AssertSubnetId(str) assert(str) assert(type(str) == "string", "Expected SubnetId to be of type 'string'") end -- function M.SubnetId(str) asserts.AssertSubnetId(str) return str end function asserts.AssertTargetGroupName(str) assert(str) assert(type(str) == "string", "Expected TargetGroupName to be of type 'string'") end -- function M.TargetGroupName(str) asserts.AssertTargetGroupName(str) return str end function asserts.AssertAuthenticateCognitoActionSessionCookieName(str) assert(str) assert(type(str) == "string", "Expected AuthenticateCognitoActionSessionCookieName to be of type 'string'") end -- function M.AuthenticateCognitoActionSessionCookieName(str) asserts.AssertAuthenticateCognitoActionSessionCookieName(str) return str end function asserts.AssertMarker(str) assert(str) assert(type(str) == "string", "Expected Marker to be of type 'string'") end -- function M.Marker(str) asserts.AssertMarker(str) return str end function asserts.AssertTagValue(str) assert(str) assert(type(str) == "string", "Expected TagValue to be of type 'string'") assert(#str <= 256, "Expected string to be max 256 characters") end -- function M.TagValue(str) asserts.AssertTagValue(str) return str end function asserts.AssertRedirectActionQuery(str) assert(str) assert(type(str) == "string", "Expected RedirectActionQuery to be of type 'string'") assert(#str <= 128, "Expected string to be max 128 characters") end -- function M.RedirectActionQuery(str) asserts.AssertRedirectActionQuery(str) return str end function asserts.AssertCertificateArn(str) assert(str) assert(type(str) == "string", "Expected CertificateArn to be of type 'string'") end -- function M.CertificateArn(str) asserts.AssertCertificateArn(str) return str end function asserts.AssertRedirectActionHost(str) assert(str) assert(type(str) == "string", "Expected RedirectActionHost to be of type 'string'") assert(#str <= 128, "Expected string to be max 128 characters") assert(#str >= 1, "Expected string to be min 1 characters") end -- function M.RedirectActionHost(str) asserts.AssertRedirectActionHost(str) return str end function asserts.AssertRedirectActionProtocol(str) assert(str) assert(type(str) == "string", "Expected RedirectActionProtocol to be of type 'string'") end -- function M.RedirectActionProtocol(str) asserts.AssertRedirectActionProtocol(str) return str end function asserts.AssertSslProtocol(str) assert(str) assert(type(str) == "string", "Expected SslProtocol to be of type 'string'") end -- function M.SslProtocol(str) asserts.AssertSslProtocol(str) return str end function asserts.AssertTargetTypeEnum(str) assert(str) assert(type(str) == "string", "Expected TargetTypeEnum to be of type 'string'") end -- function M.TargetTypeEnum(str) asserts.AssertTargetTypeEnum(str) return str end function asserts.AssertAuthenticateCognitoActionUserPoolArn(str) assert(str) assert(type(str) == "string", "Expected AuthenticateCognitoActionUserPoolArn to be of type 'string'") end -- function M.AuthenticateCognitoActionUserPoolArn(str) asserts.AssertAuthenticateCognitoActionUserPoolArn(str) return str end function asserts.AssertAuthenticateCognitoActionUserPoolDomain(str) assert(str) assert(type(str) == "string", "Expected AuthenticateCognitoActionUserPoolDomain to be of type 'string'") end -- function M.AuthenticateCognitoActionUserPoolDomain(str) asserts.AssertAuthenticateCognitoActionUserPoolDomain(str) return str end function asserts.AssertActionTypeEnum(str) assert(str) assert(type(str) == "string", "Expected ActionTypeEnum to be of type 'string'") end -- function M.ActionTypeEnum(str) asserts.AssertActionTypeEnum(str) return str end function asserts.AssertAuthenticateCognitoActionUserPoolClientId(str) assert(str) assert(type(str) == "string", "Expected AuthenticateCognitoActionUserPoolClientId to be of type 'string'") end -- function M.AuthenticateCognitoActionUserPoolClientId(str) asserts.AssertAuthenticateCognitoActionUserPoolClientId(str) return str end function asserts.AssertFixedResponseActionContentType(str) assert(str) assert(type(str) == "string", "Expected FixedResponseActionContentType to be of type 'string'") assert(#str <= 32, "Expected string to be max 32 characters") end -- function M.FixedResponseActionContentType(str) asserts.AssertFixedResponseActionContentType(str) return str end function asserts.AssertRedirectActionStatusCodeEnum(str) assert(str) assert(type(str) == "string", "Expected RedirectActionStatusCodeEnum to be of type 'string'") end -- function M.RedirectActionStatusCodeEnum(str) asserts.AssertRedirectActionStatusCodeEnum(str) return str end function asserts.AssertHealthCheckPort(str) assert(str) assert(type(str) == "string", "Expected HealthCheckPort to be of type 'string'") end -- function M.HealthCheckPort(str) asserts.AssertHealthCheckPort(str) return str end function asserts.AssertAuthenticateOidcActionAuthenticationRequestParamName(str) assert(str) assert(type(str) == "string", "Expected AuthenticateOidcActionAuthenticationRequestParamName to be of type 'string'") end -- function M.AuthenticateOidcActionAuthenticationRequestParamName(str) asserts.AssertAuthenticateOidcActionAuthenticationRequestParamName(str) return str end function asserts.AssertRedirectActionPath(str) assert(str) assert(type(str) == "string", "Expected RedirectActionPath to be of type 'string'") assert(#str <= 128, "Expected string to be max 128 characters") assert(#str >= 1, "Expected string to be min 1 characters") end -- function M.RedirectActionPath(str) asserts.AssertRedirectActionPath(str) return str end function asserts.AssertAuthenticateOidcActionSessionCookieName(str) assert(str) assert(type(str) == "string", "Expected AuthenticateOidcActionSessionCookieName to be of type 'string'") end -- function M.AuthenticateOidcActionSessionCookieName(str) asserts.AssertAuthenticateOidcActionSessionCookieName(str) return str end function asserts.AssertListenerArn(str) assert(str) assert(type(str) == "string", "Expected ListenerArn to be of type 'string'") end -- function M.ListenerArn(str) asserts.AssertListenerArn(str) return str end function asserts.AssertLoadBalancerArn(str) assert(str) assert(type(str) == "string", "Expected LoadBalancerArn to be of type 'string'") end -- function M.LoadBalancerArn(str) asserts.AssertLoadBalancerArn(str) return str end function asserts.AssertHttpCode(str) assert(str) assert(type(str) == "string", "Expected HttpCode to be of type 'string'") end -- function M.HttpCode(str) asserts.AssertHttpCode(str) return str end function asserts.AssertAuthenticateOidcActionClientId(str) assert(str) assert(type(str) == "string", "Expected AuthenticateOidcActionClientId to be of type 'string'") end -- function M.AuthenticateOidcActionClientId(str) asserts.AssertAuthenticateOidcActionClientId(str) return str end function asserts.AssertAuthenticateOidcActionClientSecret(str) assert(str) assert(type(str) == "string", "Expected AuthenticateOidcActionClientSecret to be of type 'string'") end -- function M.AuthenticateOidcActionClientSecret(str) asserts.AssertAuthenticateOidcActionClientSecret(str) return str end function asserts.AssertAuthenticateCognitoActionConditionalBehaviorEnum(str) assert(str) assert(type(str) == "string", "Expected AuthenticateCognitoActionConditionalBehaviorEnum to be of type 'string'") end -- function M.AuthenticateCognitoActionConditionalBehaviorEnum(str) asserts.AssertAuthenticateCognitoActionConditionalBehaviorEnum(str) return str end function asserts.AssertRuleArn(str) assert(str) assert(type(str) == "string", "Expected RuleArn to be of type 'string'") end -- function M.RuleArn(str) asserts.AssertRuleArn(str) return str end function asserts.AssertAuthenticateOidcActionScope(str) assert(str) assert(type(str) == "string", "Expected AuthenticateOidcActionScope to be of type 'string'") end -- function M.AuthenticateOidcActionScope(str) asserts.AssertAuthenticateOidcActionScope(str) return str end function asserts.AssertSecurityGroupId(str) assert(str) assert(type(str) == "string", "Expected SecurityGroupId to be of type 'string'") end -- function M.SecurityGroupId(str) asserts.AssertSecurityGroupId(str) return str end function asserts.AssertAuthenticateCognitoActionScope(str) assert(str) assert(type(str) == "string", "Expected AuthenticateCognitoActionScope to be of type 'string'") end -- function M.AuthenticateCognitoActionScope(str) asserts.AssertAuthenticateCognitoActionScope(str) return str end function asserts.AssertAuthenticateOidcActionAuthorizationEndpoint(str) assert(str) assert(type(str) == "string", "Expected AuthenticateOidcActionAuthorizationEndpoint to be of type 'string'") end -- function M.AuthenticateOidcActionAuthorizationEndpoint(str) asserts.AssertAuthenticateOidcActionAuthorizationEndpoint(str) return str end function asserts.AssertIpAddress(str) assert(str) assert(type(str) == "string", "Expected IpAddress to be of type 'string'") end -- function M.IpAddress(str) asserts.AssertIpAddress(str) return str end function asserts.AssertAllocationId(str) assert(str) assert(type(str) == "string", "Expected AllocationId to be of type 'string'") end -- function M.AllocationId(str) asserts.AssertAllocationId(str) return str end function asserts.AssertAuthenticateOidcActionConditionalBehaviorEnum(str) assert(str) assert(type(str) == "string", "Expected AuthenticateOidcActionConditionalBehaviorEnum to be of type 'string'") end -- function M.AuthenticateOidcActionConditionalBehaviorEnum(str) asserts.AssertAuthenticateOidcActionConditionalBehaviorEnum(str) return str end function asserts.AssertDescription(str) assert(str) assert(type(str) == "string", "Expected Description to be of type 'string'") end -- function M.Description(str) asserts.AssertDescription(str) return str end function asserts.AssertAuthenticateCognitoActionAuthenticationRequestParamName(str) assert(str) assert(type(str) == "string", "Expected AuthenticateCognitoActionAuthenticationRequestParamName to be of type 'string'") end -- function M.AuthenticateCognitoActionAuthenticationRequestParamName(str) asserts.AssertAuthenticateCognitoActionAuthenticationRequestParamName(str) return str end function asserts.AssertTargetId(str) assert(str) assert(type(str) == "string", "Expected TargetId to be of type 'string'") end -- function M.TargetId(str) asserts.AssertTargetId(str) return str end function asserts.AssertCanonicalHostedZoneId(str) assert(str) assert(type(str) == "string", "Expected CanonicalHostedZoneId to be of type 'string'") end -- function M.CanonicalHostedZoneId(str) asserts.AssertCanonicalHostedZoneId(str) return str end function asserts.AssertTargetHealthStateEnum(str) assert(str) assert(type(str) == "string", "Expected TargetHealthStateEnum to be of type 'string'") end -- function M.TargetHealthStateEnum(str) asserts.AssertTargetHealthStateEnum(str) return str end function asserts.AssertLoadBalancerTypeEnum(str) assert(str) assert(type(str) == "string", "Expected LoadBalancerTypeEnum to be of type 'string'") end -- function M.LoadBalancerTypeEnum(str) asserts.AssertLoadBalancerTypeEnum(str) return str end function asserts.AssertCipherName(str) assert(str) assert(type(str) == "string", "Expected CipherName to be of type 'string'") end -- function M.CipherName(str) asserts.AssertCipherName(str) return str end function asserts.AssertFixedResponseActionStatusCode(str) assert(str) assert(type(str) == "string", "Expected FixedResponseActionStatusCode to be of type 'string'") end -- function M.FixedResponseActionStatusCode(str) asserts.AssertFixedResponseActionStatusCode(str) return str end function asserts.AssertName(str) assert(str) assert(type(str) == "string", "Expected Name to be of type 'string'") end -- function M.Name(str) asserts.AssertName(str) return str end function asserts.AssertProtocolEnum(str) assert(str) assert(type(str) == "string", "Expected ProtocolEnum to be of type 'string'") end -- function M.ProtocolEnum(str) asserts.AssertProtocolEnum(str) return str end function asserts.AssertSslPolicyName(str) assert(str) assert(type(str) == "string", "Expected SslPolicyName to be of type 'string'") end -- function M.SslPolicyName(str) asserts.AssertSslPolicyName(str) return str end function asserts.AssertStateReason(str) assert(str) assert(type(str) == "string", "Expected StateReason to be of type 'string'") end -- function M.StateReason(str) asserts.AssertStateReason(str) return str end function asserts.AssertLoadBalancerStateEnum(str) assert(str) assert(type(str) == "string", "Expected LoadBalancerStateEnum to be of type 'string'") end -- function M.LoadBalancerStateEnum(str) asserts.AssertLoadBalancerStateEnum(str) return str end function asserts.AssertRedirectActionPort(str) assert(str) assert(type(str) == "string", "Expected RedirectActionPort to be of type 'string'") end -- function M.RedirectActionPort(str) asserts.AssertRedirectActionPort(str) return str end function asserts.AssertVpcId(str) assert(str) assert(type(str) == "string", "Expected VpcId to be of type 'string'") end -- function M.VpcId(str) asserts.AssertVpcId(str) return str end function asserts.AssertMax(str) assert(str) assert(type(str) == "string", "Expected Max to be of type 'string'") end -- function M.Max(str) asserts.AssertMax(str) return str end function asserts.AssertAuthenticateOidcActionSessionTimeout(long) assert(long) assert(type(long) == "number", "Expected AuthenticateOidcActionSessionTimeout to be of type 'number'") assert(long % 1 == 0, "Expected a whole integer number") end function M.AuthenticateOidcActionSessionTimeout(long) asserts.AssertAuthenticateOidcActionSessionTimeout(long) return long end function asserts.AssertAuthenticateCognitoActionSessionTimeout(long) assert(long) assert(type(long) == "number", "Expected AuthenticateCognitoActionSessionTimeout to be of type 'number'") assert(long % 1 == 0, "Expected a whole integer number") end function M.AuthenticateCognitoActionSessionTimeout(long) asserts.AssertAuthenticateCognitoActionSessionTimeout(long) return long end function asserts.AssertActionOrder(integer) assert(integer) assert(type(integer) == "number", "Expected ActionOrder to be of type 'number'") assert(integer % 1 == 0, "Expected a while integer number") assert(integer <= 50000, "Expected integer to be max 50000") assert(integer >= 1, "Expected integer to be min 1") end function M.ActionOrder(integer) asserts.AssertActionOrder(integer) return integer end function asserts.AssertHealthCheckThresholdCount(integer) assert(integer) assert(type(integer) == "number", "Expected HealthCheckThresholdCount to be of type 'number'") assert(integer % 1 == 0, "Expected a while integer number") assert(integer <= 10, "Expected integer to be max 10") assert(integer >= 2, "Expected integer to be min 2") end function M.HealthCheckThresholdCount(integer) asserts.AssertHealthCheckThresholdCount(integer) return integer end function asserts.AssertHealthCheckIntervalSeconds(integer) assert(integer) assert(type(integer) == "number", "Expected HealthCheckIntervalSeconds to be of type 'number'") assert(integer % 1 == 0, "Expected a while integer number") assert(integer <= 300, "Expected integer to be max 300") assert(integer >= 5, "Expected integer to be min 5") end function M.HealthCheckIntervalSeconds(integer) asserts.AssertHealthCheckIntervalSeconds(integer) return integer end function asserts.AssertPageSize(integer) assert(integer) assert(type(integer) == "number", "Expected PageSize to be of type 'number'") assert(integer % 1 == 0, "Expected a while integer number") assert(integer <= 400, "Expected integer to be max 400") assert(integer >= 1, "Expected integer to be min 1") end function M.PageSize(integer) asserts.AssertPageSize(integer) return integer end function asserts.AssertCipherPriority(integer) assert(integer) assert(type(integer) == "number", "Expected CipherPriority to be of type 'number'") assert(integer % 1 == 0, "Expected a while integer number") end function M.CipherPriority(integer) asserts.AssertCipherPriority(integer) return integer end function asserts.AssertHealthCheckTimeoutSeconds(integer) assert(integer) assert(type(integer) == "number", "Expected HealthCheckTimeoutSeconds to be of type 'number'") assert(integer % 1 == 0, "Expected a while integer number") assert(integer <= 60, "Expected integer to be max 60") assert(integer >= 2, "Expected integer to be min 2") end function M.HealthCheckTimeoutSeconds(integer) asserts.AssertHealthCheckTimeoutSeconds(integer) return integer end function asserts.AssertRulePriority(integer) assert(integer) assert(type(integer) == "number", "Expected RulePriority to be of type 'number'") assert(integer % 1 == 0, "Expected a while integer number") assert(integer <= 50000, "Expected integer to be max 50000") assert(integer >= 1, "Expected integer to be min 1") end function M.RulePriority(integer) asserts.AssertRulePriority(integer) return integer end function asserts.AssertPort(integer) assert(integer) assert(type(integer) == "number", "Expected Port to be of type 'number'") assert(integer % 1 == 0, "Expected a while integer number") assert(integer <= 65535, "Expected integer to be max 65535") assert(integer >= 1, "Expected integer to be min 1") end function M.Port(integer) asserts.AssertPort(integer) return integer end function asserts.AssertIsDefault(boolean) assert(boolean) assert(type(boolean) == "boolean", "Expected IsDefault to be of type 'boolean'") end function M.IsDefault(boolean) asserts.AssertIsDefault(boolean) return boolean end function asserts.AssertDefault(boolean) assert(boolean) assert(type(boolean) == "boolean", "Expected Default to be of type 'boolean'") end function M.Default(boolean) asserts.AssertDefault(boolean) return boolean end function asserts.AssertAuthenticateCognitoActionAuthenticationRequestExtraParams(map) assert(map) assert(type(map) == "table", "Expected AuthenticateCognitoActionAuthenticationRequestExtraParams to be of type 'table'") for k,v in pairs(map) do asserts.AssertAuthenticateCognitoActionAuthenticationRequestParamName(k) asserts.AssertAuthenticateCognitoActionAuthenticationRequestParamValue(v) end end function M.AuthenticateCognitoActionAuthenticationRequestExtraParams(map) asserts.AssertAuthenticateCognitoActionAuthenticationRequestExtraParams(map) return map end function asserts.AssertAuthenticateOidcActionAuthenticationRequestExtraParams(map) assert(map) assert(type(map) == "table", "Expected AuthenticateOidcActionAuthenticationRequestExtraParams to be of type 'table'") for k,v in pairs(map) do asserts.AssertAuthenticateOidcActionAuthenticationRequestParamName(k) asserts.AssertAuthenticateOidcActionAuthenticationRequestParamValue(v) end end function M.AuthenticateOidcActionAuthenticationRequestExtraParams(map) asserts.AssertAuthenticateOidcActionAuthenticationRequestExtraParams(map) return map end function asserts.AssertCreatedTime(timestamp) assert(timestamp) assert(type(timestamp) == "string", "Expected CreatedTime to be of type 'string'") end function M.CreatedTime(timestamp) asserts.AssertCreatedTime(timestamp) return timestamp end function asserts.AssertSslProtocols(list) assert(list) assert(type(list) == "table", "Expected SslProtocols to be of type ''table") for _,v in ipairs(list) do asserts.AssertSslProtocol(v) end end -- -- List of SslProtocol objects function M.SslProtocols(list) asserts.AssertSslProtocols(list) return list end function asserts.AssertTargetGroups(list) assert(list) assert(type(list) == "table", "Expected TargetGroups to be of type ''table") for _,v in ipairs(list) do asserts.AssertTargetGroup(v) end end -- -- List of TargetGroup objects function M.TargetGroups(list) asserts.AssertTargetGroups(list) return list end function asserts.AssertResourceArns(list) assert(list) assert(type(list) == "table", "Expected ResourceArns to be of type ''table") for _,v in ipairs(list) do asserts.AssertResourceArn(v) end end -- -- List of ResourceArn objects function M.ResourceArns(list) asserts.AssertResourceArns(list) return list end function asserts.AssertTargetHealthDescriptions(list) assert(list) assert(type(list) == "table", "Expected TargetHealthDescriptions to be of type ''table") for _,v in ipairs(list) do asserts.AssertTargetHealthDescription(v) end end -- -- List of TargetHealthDescription objects function M.TargetHealthDescriptions(list) asserts.AssertTargetHealthDescriptions(list) return list end function asserts.AssertLoadBalancers(list) assert(list) assert(type(list) == "table", "Expected LoadBalancers to be of type ''table") for _,v in ipairs(list) do asserts.AssertLoadBalancer(v) end end -- -- List of LoadBalancer objects function M.LoadBalancers(list) asserts.AssertLoadBalancers(list) return list end function asserts.AssertRuleConditionList(list) assert(list) assert(type(list) == "table", "Expected RuleConditionList to be of type ''table") for _,v in ipairs(list) do asserts.AssertRuleCondition(v) end end -- -- List of RuleCondition objects function M.RuleConditionList(list) asserts.AssertRuleConditionList(list) return list end function asserts.AssertLoadBalancerAddresses(list) assert(list) assert(type(list) == "table", "Expected LoadBalancerAddresses to be of type ''table") for _,v in ipairs(list) do asserts.AssertLoadBalancerAddress(v) end end -- -- List of LoadBalancerAddress objects function M.LoadBalancerAddresses(list) asserts.AssertLoadBalancerAddresses(list) return list end function asserts.AssertListeners(list) assert(list) assert(type(list) == "table", "Expected Listeners to be of type ''table") for _,v in ipairs(list) do asserts.AssertListener(v) end end -- -- List of Listener objects function M.Listeners(list) asserts.AssertListeners(list) return list end function asserts.AssertTagDescriptions(list) assert(list) assert(type(list) == "table", "Expected TagDescriptions to be of type ''table") for _,v in ipairs(list) do asserts.AssertTagDescription(v) end end -- -- List of TagDescription objects function M.TagDescriptions(list) asserts.AssertTagDescriptions(list) return list end function asserts.AssertTargetGroupArns(list) assert(list) assert(type(list) == "table", "Expected TargetGroupArns to be of type ''table") for _,v in ipairs(list) do asserts.AssertTargetGroupArn(v) end end -- -- List of TargetGroupArn objects function M.TargetGroupArns(list) asserts.AssertTargetGroupArns(list) return list end function asserts.AssertLoadBalancerNames(list) assert(list) assert(type(list) == "table", "Expected LoadBalancerNames to be of type ''table") for _,v in ipairs(list) do asserts.AssertLoadBalancerName(v) end end -- -- List of LoadBalancerName objects function M.LoadBalancerNames(list) asserts.AssertLoadBalancerNames(list) return list end function asserts.AssertListenerArns(list) assert(list) assert(type(list) == "table", "Expected ListenerArns to be of type ''table") for _,v in ipairs(list) do asserts.AssertListenerArn(v) end end -- -- List of ListenerArn objects function M.ListenerArns(list) asserts.AssertListenerArns(list) return list end function asserts.AssertSubnets(list) assert(list) assert(type(list) == "table", "Expected Subnets to be of type ''table") for _,v in ipairs(list) do asserts.AssertSubnetId(v) end end -- -- List of SubnetId objects function M.Subnets(list) asserts.AssertSubnets(list) return list end function asserts.AssertTargetGroupAttributes(list) assert(list) assert(type(list) == "table", "Expected TargetGroupAttributes to be of type ''table") for _,v in ipairs(list) do asserts.AssertTargetGroupAttribute(v) end end -- -- List of TargetGroupAttribute objects function M.TargetGroupAttributes(list) asserts.AssertTargetGroupAttributes(list) return list end function asserts.AssertSubnetMappings(list) assert(list) assert(type(list) == "table", "Expected SubnetMappings to be of type ''table") for _,v in ipairs(list) do asserts.AssertSubnetMapping(v) end end -- -- List of SubnetMapping objects function M.SubnetMappings(list) asserts.AssertSubnetMappings(list) return list end function asserts.AssertRules(list) assert(list) assert(type(list) == "table", "Expected Rules to be of type ''table") for _,v in ipairs(list) do asserts.AssertRule(v) end end -- -- List of Rule objects function M.Rules(list) asserts.AssertRules(list) return list end function asserts.AssertSslPolicies(list) assert(list) assert(type(list) == "table", "Expected SslPolicies to be of type ''table") for _,v in ipairs(list) do asserts.AssertSslPolicy(v) end end -- -- List of SslPolicy objects function M.SslPolicies(list) asserts.AssertSslPolicies(list) return list end function asserts.AssertTagKeys(list) assert(list) assert(type(list) == "table", "Expected TagKeys to be of type ''table") for _,v in ipairs(list) do asserts.AssertTagKey(v) end end -- -- List of TagKey objects function M.TagKeys(list) asserts.AssertTagKeys(list) return list end function asserts.AssertListOfString(list) assert(list) assert(type(list) == "table", "Expected ListOfString to be of type ''table") for _,v in ipairs(list) do asserts.AssertStringValue(v) end end -- -- List of StringValue objects function M.ListOfString(list) asserts.AssertListOfString(list) return list end function asserts.AssertLimits(list) assert(list) assert(type(list) == "table", "Expected Limits to be of type ''table") for _,v in ipairs(list) do asserts.AssertLimit(v) end end -- -- List of Limit objects function M.Limits(list) asserts.AssertLimits(list) return list end function asserts.AssertLoadBalancerAttributes(list) assert(list) assert(type(list) == "table", "Expected LoadBalancerAttributes to be of type ''table") assert(#list <= 20, "Expected list to be contain 20 elements") for _,v in ipairs(list) do asserts.AssertLoadBalancerAttribute(v) end end -- -- List of LoadBalancerAttribute objects function M.LoadBalancerAttributes(list) asserts.AssertLoadBalancerAttributes(list) return list end function asserts.AssertRuleArns(list) assert(list) assert(type(list) == "table", "Expected RuleArns to be of type ''table") for _,v in ipairs(list) do asserts.AssertRuleArn(v) end end -- -- List of RuleArn objects function M.RuleArns(list) asserts.AssertRuleArns(list) return list end function asserts.AssertSslPolicyNames(list) assert(list) assert(type(list) == "table", "Expected SslPolicyNames to be of type ''table") for _,v in ipairs(list) do asserts.AssertSslPolicyName(v) end end -- -- List of SslPolicyName objects function M.SslPolicyNames(list) asserts.AssertSslPolicyNames(list) return list end function asserts.AssertLoadBalancerArns(list) assert(list) assert(type(list) == "table", "Expected LoadBalancerArns to be of type ''table") for _,v in ipairs(list) do asserts.AssertLoadBalancerArn(v) end end -- -- List of LoadBalancerArn objects function M.LoadBalancerArns(list) asserts.AssertLoadBalancerArns(list) return list end function asserts.AssertCertificateList(list) assert(list) assert(type(list) == "table", "Expected CertificateList to be of type ''table") for _,v in ipairs(list) do asserts.AssertCertificate(v) end end -- -- List of Certificate objects function M.CertificateList(list) asserts.AssertCertificateList(list) return list end function asserts.AssertCiphers(list) assert(list) assert(type(list) == "table", "Expected Ciphers to be of type ''table") for _,v in ipairs(list) do asserts.AssertCipher(v) end end -- -- List of Cipher objects function M.Ciphers(list) asserts.AssertCiphers(list) return list end function asserts.AssertSecurityGroups(list) assert(list) assert(type(list) == "table", "Expected SecurityGroups to be of type ''table") for _,v in ipairs(list) do asserts.AssertSecurityGroupId(v) end end -- -- List of SecurityGroupId objects function M.SecurityGroups(list) asserts.AssertSecurityGroups(list) return list end function asserts.AssertTargetGroupNames(list) assert(list) assert(type(list) == "table", "Expected TargetGroupNames to be of type ''table") for _,v in ipairs(list) do asserts.AssertTargetGroupName(v) end end -- -- List of TargetGroupName objects function M.TargetGroupNames(list) asserts.AssertTargetGroupNames(list) return list end function asserts.AssertTargetDescriptions(list) assert(list) assert(type(list) == "table", "Expected TargetDescriptions to be of type ''table") for _,v in ipairs(list) do asserts.AssertTargetDescription(v) end end -- -- List of TargetDescription objects function M.TargetDescriptions(list) asserts.AssertTargetDescriptions(list) return list end function asserts.AssertActions(list) assert(list) assert(type(list) == "table", "Expected Actions to be of type ''table") for _,v in ipairs(list) do asserts.AssertAction(v) end end -- -- List of Action objects function M.Actions(list) asserts.AssertActions(list) return list end function asserts.AssertRulePriorityList(list) assert(list) assert(type(list) == "table", "Expected RulePriorityList to be of type ''table") for _,v in ipairs(list) do asserts.AssertRulePriorityPair(v) end end -- -- List of RulePriorityPair objects function M.RulePriorityList(list) asserts.AssertRulePriorityList(list) return list end function asserts.AssertAvailabilityZones(list) assert(list) assert(type(list) == "table", "Expected AvailabilityZones to be of type ''table") for _,v in ipairs(list) do asserts.AssertAvailabilityZone(v) end end -- -- List of AvailabilityZone objects function M.AvailabilityZones(list) asserts.AssertAvailabilityZones(list) return list end function asserts.AssertTagList(list) assert(list) assert(type(list) == "table", "Expected TagList to be of type ''table") assert(#list >= 1, "Expected list to be contain 1 elements") for _,v in ipairs(list) do asserts.AssertTag(v) end end -- -- List of Tag objects function M.TagList(list) asserts.AssertTagList(list) return list end local content_type = require "aws-sdk.core.content_type" local request_headers = require "aws-sdk.core.request_headers" local request_handlers = require "aws-sdk.core.request_handlers" local settings = {} local function endpoint_for_region(region, use_dualstack) if not use_dualstack then if region == "us-east-1" then return "elasticloadbalancing.amazonaws.com" end end local ss = { "elasticloadbalancing" } if use_dualstack then ss[#ss + 1] = "dualstack" end ss[#ss + 1] = region ss[#ss + 1] = "amazonaws.com" if region == "cn-north-1" then ss[#ss + 1] = "cn" end return table.concat(ss, ".") end function M.init(config) assert(config, "You must provide a config table") assert(config.region, "You must provide a region in the config table") settings.service = M.metadata.endpoint_prefix settings.protocol = M.metadata.protocol settings.region = config.region settings.endpoint = config.endpoint_override or endpoint_for_region(config.region, config.use_dualstack) settings.signature_version = M.metadata.signature_version settings.uri = (config.scheme or "https") .. "://" .. settings.endpoint end -- -- OPERATIONS -- --- Call RegisterTargets asynchronously, invoking a callback when done -- @param RegisterTargetsInput -- @param cb Callback function accepting three args: response, error_type, error_message function M.RegisterTargetsAsync(RegisterTargetsInput, cb) assert(RegisterTargetsInput, "You must provide a RegisterTargetsInput") local headers = { [request_headers.CONTENT_TYPE_HEADER] = content_type.from_protocol(M.metadata.protocol, M.metadata.json_version), [request_headers.AMZ_TARGET_HEADER] = ".RegisterTargets", } for header,value in pairs(RegisterTargetsInput.headers) do headers[header] = value end local request_handler, err = request_handlers.from_protocol_and_method("query", "POST") if request_handler then request_handler(settings.uri, "/", RegisterTargetsInput, headers, settings, cb) else cb(false, err) end end --- Call RegisterTargets synchronously, returning when done -- This assumes that the function is called from within a coroutine -- @param RegisterTargetsInput -- @return response -- @return error_type -- @return error_message function M.RegisterTargetsSync(RegisterTargetsInput, ...) local co = coroutine.running() assert(co, "You must call this function from within a coroutine") M.RegisterTargetsAsync(RegisterTargetsInput, function(response, error_type, error_message) assert(coroutine.resume(co, response, error_type, error_message)) end) return coroutine.yield() end --- Call DescribeSSLPolicies asynchronously, invoking a callback when done -- @param DescribeSSLPoliciesInput -- @param cb Callback function accepting three args: response, error_type, error_message function M.DescribeSSLPoliciesAsync(DescribeSSLPoliciesInput, cb) assert(DescribeSSLPoliciesInput, "You must provide a DescribeSSLPoliciesInput") local headers = { [request_headers.CONTENT_TYPE_HEADER] = content_type.from_protocol(M.metadata.protocol, M.metadata.json_version), [request_headers.AMZ_TARGET_HEADER] = ".DescribeSSLPolicies", } for header,value in pairs(DescribeSSLPoliciesInput.headers) do headers[header] = value end local request_handler, err = request_handlers.from_protocol_and_method("query", "POST") if request_handler then request_handler(settings.uri, "/", DescribeSSLPoliciesInput, headers, settings, cb) else cb(false, err) end end --- Call DescribeSSLPolicies synchronously, returning when done -- This assumes that the function is called from within a coroutine -- @param DescribeSSLPoliciesInput -- @return response -- @return error_type -- @return error_message function M.DescribeSSLPoliciesSync(DescribeSSLPoliciesInput, ...) local co = coroutine.running() assert(co, "You must call this function from within a coroutine") M.DescribeSSLPoliciesAsync(DescribeSSLPoliciesInput, function(response, error_type, error_message) assert(coroutine.resume(co, response, error_type, error_message)) end) return coroutine.yield() end --- Call SetSecurityGroups asynchronously, invoking a callback when done -- @param SetSecurityGroupsInput -- @param cb Callback function accepting three args: response, error_type, error_message function M.SetSecurityGroupsAsync(SetSecurityGroupsInput, cb) assert(SetSecurityGroupsInput, "You must provide a SetSecurityGroupsInput") local headers = { [request_headers.CONTENT_TYPE_HEADER] = content_type.from_protocol(M.metadata.protocol, M.metadata.json_version), [request_headers.AMZ_TARGET_HEADER] = ".SetSecurityGroups", } for header,value in pairs(SetSecurityGroupsInput.headers) do headers[header] = value end local request_handler, err = request_handlers.from_protocol_and_method("query", "POST") if request_handler then request_handler(settings.uri, "/", SetSecurityGroupsInput, headers, settings, cb) else cb(false, err) end end --- Call SetSecurityGroups synchronously, returning when done -- This assumes that the function is called from within a coroutine -- @param SetSecurityGroupsInput -- @return response -- @return error_type -- @return error_message function M.SetSecurityGroupsSync(SetSecurityGroupsInput, ...) local co = coroutine.running() assert(co, "You must call this function from within a coroutine") M.SetSecurityGroupsAsync(SetSecurityGroupsInput, function(response, error_type, error_message) assert(coroutine.resume(co, response, error_type, error_message)) end) return coroutine.yield() end --- Call AddListenerCertificates asynchronously, invoking a callback when done -- @param AddListenerCertificatesInput -- @param cb Callback function accepting three args: response, error_type, error_message function M.AddListenerCertificatesAsync(AddListenerCertificatesInput, cb) assert(AddListenerCertificatesInput, "You must provide a AddListenerCertificatesInput") local headers = { [request_headers.CONTENT_TYPE_HEADER] = content_type.from_protocol(M.metadata.protocol, M.metadata.json_version), [request_headers.AMZ_TARGET_HEADER] = ".AddListenerCertificates", } for header,value in pairs(AddListenerCertificatesInput.headers) do headers[header] = value end local request_handler, err = request_handlers.from_protocol_and_method("query", "POST") if request_handler then request_handler(settings.uri, "/", AddListenerCertificatesInput, headers, settings, cb) else cb(false, err) end end --- Call AddListenerCertificates synchronously, returning when done -- This assumes that the function is called from within a coroutine -- @param AddListenerCertificatesInput -- @return response -- @return error_type -- @return error_message function M.AddListenerCertificatesSync(AddListenerCertificatesInput, ...) local co = coroutine.running() assert(co, "You must call this function from within a coroutine") M.AddListenerCertificatesAsync(AddListenerCertificatesInput, function(response, error_type, error_message) assert(coroutine.resume(co, response, error_type, error_message)) end) return coroutine.yield() end --- Call DeleteListener asynchronously, invoking a callback when done -- @param DeleteListenerInput -- @param cb Callback function accepting three args: response, error_type, error_message function M.DeleteListenerAsync(DeleteListenerInput, cb) assert(DeleteListenerInput, "You must provide a DeleteListenerInput") local headers = { [request_headers.CONTENT_TYPE_HEADER] = content_type.from_protocol(M.metadata.protocol, M.metadata.json_version), [request_headers.AMZ_TARGET_HEADER] = ".DeleteListener", } for header,value in pairs(DeleteListenerInput.headers) do headers[header] = value end local request_handler, err = request_handlers.from_protocol_and_method("query", "POST") if request_handler then request_handler(settings.uri, "/", DeleteListenerInput, headers, settings, cb) else cb(false, err) end end --- Call DeleteListener synchronously, returning when done -- This assumes that the function is called from within a coroutine -- @param DeleteListenerInput -- @return response -- @return error_type -- @return error_message function M.DeleteListenerSync(DeleteListenerInput, ...) local co = coroutine.running() assert(co, "You must call this function from within a coroutine") M.DeleteListenerAsync(DeleteListenerInput, function(response, error_type, error_message) assert(coroutine.resume(co, response, error_type, error_message)) end) return coroutine.yield() end --- Call ModifyTargetGroup asynchronously, invoking a callback when done -- @param ModifyTargetGroupInput -- @param cb Callback function accepting three args: response, error_type, error_message function M.ModifyTargetGroupAsync(ModifyTargetGroupInput, cb) assert(ModifyTargetGroupInput, "You must provide a ModifyTargetGroupInput") local headers = { [request_headers.CONTENT_TYPE_HEADER] = content_type.from_protocol(M.metadata.protocol, M.metadata.json_version), [request_headers.AMZ_TARGET_HEADER] = ".ModifyTargetGroup", } for header,value in pairs(ModifyTargetGroupInput.headers) do headers[header] = value end local request_handler, err = request_handlers.from_protocol_and_method("query", "POST") if request_handler then request_handler(settings.uri, "/", ModifyTargetGroupInput, headers, settings, cb) else cb(false, err) end end --- Call ModifyTargetGroup synchronously, returning when done -- This assumes that the function is called from within a coroutine -- @param ModifyTargetGroupInput -- @return response -- @return error_type -- @return error_message function M.ModifyTargetGroupSync(ModifyTargetGroupInput, ...) local co = coroutine.running() assert(co, "You must call this function from within a coroutine") M.ModifyTargetGroupAsync(ModifyTargetGroupInput, function(response, error_type, error_message) assert(coroutine.resume(co, response, error_type, error_message)) end) return coroutine.yield() end --- Call CreateRule asynchronously, invoking a callback when done -- @param CreateRuleInput -- @param cb Callback function accepting three args: response, error_type, error_message function M.CreateRuleAsync(CreateRuleInput, cb) assert(CreateRuleInput, "You must provide a CreateRuleInput") local headers = { [request_headers.CONTENT_TYPE_HEADER] = content_type.from_protocol(M.metadata.protocol, M.metadata.json_version), [request_headers.AMZ_TARGET_HEADER] = ".CreateRule", } for header,value in pairs(CreateRuleInput.headers) do headers[header] = value end local request_handler, err = request_handlers.from_protocol_and_method("query", "POST") if request_handler then request_handler(settings.uri, "/", CreateRuleInput, headers, settings, cb) else cb(false, err) end end --- Call CreateRule synchronously, returning when done -- This assumes that the function is called from within a coroutine -- @param CreateRuleInput -- @return response -- @return error_type -- @return error_message function M.CreateRuleSync(CreateRuleInput, ...) local co = coroutine.running() assert(co, "You must call this function from within a coroutine") M.CreateRuleAsync(CreateRuleInput, function(response, error_type, error_message) assert(coroutine.resume(co, response, error_type, error_message)) end) return coroutine.yield() end --- Call SetRulePriorities asynchronously, invoking a callback when done -- @param SetRulePrioritiesInput -- @param cb Callback function accepting three args: response, error_type, error_message function M.SetRulePrioritiesAsync(SetRulePrioritiesInput, cb) assert(SetRulePrioritiesInput, "You must provide a SetRulePrioritiesInput") local headers = { [request_headers.CONTENT_TYPE_HEADER] = content_type.from_protocol(M.metadata.protocol, M.metadata.json_version), [request_headers.AMZ_TARGET_HEADER] = ".SetRulePriorities", } for header,value in pairs(SetRulePrioritiesInput.headers) do headers[header] = value end local request_handler, err = request_handlers.from_protocol_and_method("query", "POST") if request_handler then request_handler(settings.uri, "/", SetRulePrioritiesInput, headers, settings, cb) else cb(false, err) end end --- Call SetRulePriorities synchronously, returning when done -- This assumes that the function is called from within a coroutine -- @param SetRulePrioritiesInput -- @return response -- @return error_type -- @return error_message function M.SetRulePrioritiesSync(SetRulePrioritiesInput, ...) local co = coroutine.running() assert(co, "You must call this function from within a coroutine") M.SetRulePrioritiesAsync(SetRulePrioritiesInput, function(response, error_type, error_message) assert(coroutine.resume(co, response, error_type, error_message)) end) return coroutine.yield() end --- Call ModifyTargetGroupAttributes asynchronously, invoking a callback when done -- @param ModifyTargetGroupAttributesInput -- @param cb Callback function accepting three args: response, error_type, error_message function M.ModifyTargetGroupAttributesAsync(ModifyTargetGroupAttributesInput, cb) assert(ModifyTargetGroupAttributesInput, "You must provide a ModifyTargetGroupAttributesInput") local headers = { [request_headers.CONTENT_TYPE_HEADER] = content_type.from_protocol(M.metadata.protocol, M.metadata.json_version), [request_headers.AMZ_TARGET_HEADER] = ".ModifyTargetGroupAttributes", } for header,value in pairs(ModifyTargetGroupAttributesInput.headers) do headers[header] = value end local request_handler, err = request_handlers.from_protocol_and_method("query", "POST") if request_handler then request_handler(settings.uri, "/", ModifyTargetGroupAttributesInput, headers, settings, cb) else cb(false, err) end end --- Call ModifyTargetGroupAttributes synchronously, returning when done -- This assumes that the function is called from within a coroutine -- @param ModifyTargetGroupAttributesInput -- @return response -- @return error_type -- @return error_message function M.ModifyTargetGroupAttributesSync(ModifyTargetGroupAttributesInput, ...) local co = coroutine.running() assert(co, "You must call this function from within a coroutine") M.ModifyTargetGroupAttributesAsync(ModifyTargetGroupAttributesInput, function(response, error_type, error_message) assert(coroutine.resume(co, response, error_type, error_message)) end) return coroutine.yield() end --- Call DescribeLoadBalancerAttributes asynchronously, invoking a callback when done -- @param DescribeLoadBalancerAttributesInput -- @param cb Callback function accepting three args: response, error_type, error_message function M.DescribeLoadBalancerAttributesAsync(DescribeLoadBalancerAttributesInput, cb) assert(DescribeLoadBalancerAttributesInput, "You must provide a DescribeLoadBalancerAttributesInput") local headers = { [request_headers.CONTENT_TYPE_HEADER] = content_type.from_protocol(M.metadata.protocol, M.metadata.json_version), [request_headers.AMZ_TARGET_HEADER] = ".DescribeLoadBalancerAttributes", } for header,value in pairs(DescribeLoadBalancerAttributesInput.headers) do headers[header] = value end local request_handler, err = request_handlers.from_protocol_and_method("query", "POST") if request_handler then request_handler(settings.uri, "/", DescribeLoadBalancerAttributesInput, headers, settings, cb) else cb(false, err) end end --- Call DescribeLoadBalancerAttributes synchronously, returning when done -- This assumes that the function is called from within a coroutine -- @param DescribeLoadBalancerAttributesInput -- @return response -- @return error_type -- @return error_message function M.DescribeLoadBalancerAttributesSync(DescribeLoadBalancerAttributesInput, ...) local co = coroutine.running() assert(co, "You must call this function from within a coroutine") M.DescribeLoadBalancerAttributesAsync(DescribeLoadBalancerAttributesInput, function(response, error_type, error_message) assert(coroutine.resume(co, response, error_type, error_message)) end) return coroutine.yield() end --- Call SetIpAddressType asynchronously, invoking a callback when done -- @param SetIpAddressTypeInput -- @param cb Callback function accepting three args: response, error_type, error_message function M.SetIpAddressTypeAsync(SetIpAddressTypeInput, cb) assert(SetIpAddressTypeInput, "You must provide a SetIpAddressTypeInput") local headers = { [request_headers.CONTENT_TYPE_HEADER] = content_type.from_protocol(M.metadata.protocol, M.metadata.json_version), [request_headers.AMZ_TARGET_HEADER] = ".SetIpAddressType", } for header,value in pairs(SetIpAddressTypeInput.headers) do headers[header] = value end local request_handler, err = request_handlers.from_protocol_and_method("query", "POST") if request_handler then request_handler(settings.uri, "/", SetIpAddressTypeInput, headers, settings, cb) else cb(false, err) end end --- Call SetIpAddressType synchronously, returning when done -- This assumes that the function is called from within a coroutine -- @param SetIpAddressTypeInput -- @return response -- @return error_type -- @return error_message function M.SetIpAddressTypeSync(SetIpAddressTypeInput, ...) local co = coroutine.running() assert(co, "You must call this function from within a coroutine") M.SetIpAddressTypeAsync(SetIpAddressTypeInput, function(response, error_type, error_message) assert(coroutine.resume(co, response, error_type, error_message)) end) return coroutine.yield() end --- Call RemoveListenerCertificates asynchronously, invoking a callback when done -- @param RemoveListenerCertificatesInput -- @param cb Callback function accepting three args: response, error_type, error_message function M.RemoveListenerCertificatesAsync(RemoveListenerCertificatesInput, cb) assert(RemoveListenerCertificatesInput, "You must provide a RemoveListenerCertificatesInput") local headers = { [request_headers.CONTENT_TYPE_HEADER] = content_type.from_protocol(M.metadata.protocol, M.metadata.json_version), [request_headers.AMZ_TARGET_HEADER] = ".RemoveListenerCertificates", } for header,value in pairs(RemoveListenerCertificatesInput.headers) do headers[header] = value end local request_handler, err = request_handlers.from_protocol_and_method("query", "POST") if request_handler then request_handler(settings.uri, "/", RemoveListenerCertificatesInput, headers, settings, cb) else cb(false, err) end end --- Call RemoveListenerCertificates synchronously, returning when done -- This assumes that the function is called from within a coroutine -- @param RemoveListenerCertificatesInput -- @return response -- @return error_type -- @return error_message function M.RemoveListenerCertificatesSync(RemoveListenerCertificatesInput, ...) local co = coroutine.running() assert(co, "You must call this function from within a coroutine") M.RemoveListenerCertificatesAsync(RemoveListenerCertificatesInput, function(response, error_type, error_message) assert(coroutine.resume(co, response, error_type, error_message)) end) return coroutine.yield() end --- Call ModifyListener asynchronously, invoking a callback when done -- @param ModifyListenerInput -- @param cb Callback function accepting three args: response, error_type, error_message function M.ModifyListenerAsync(ModifyListenerInput, cb) assert(ModifyListenerInput, "You must provide a ModifyListenerInput") local headers = { [request_headers.CONTENT_TYPE_HEADER] = content_type.from_protocol(M.metadata.protocol, M.metadata.json_version), [request_headers.AMZ_TARGET_HEADER] = ".ModifyListener", } for header,value in pairs(ModifyListenerInput.headers) do headers[header] = value end local request_handler, err = request_handlers.from_protocol_and_method("query", "POST") if request_handler then request_handler(settings.uri, "/", ModifyListenerInput, headers, settings, cb) else cb(false, err) end end --- Call ModifyListener synchronously, returning when done -- This assumes that the function is called from within a coroutine -- @param ModifyListenerInput -- @return response -- @return error_type -- @return error_message function M.ModifyListenerSync(ModifyListenerInput, ...) local co = coroutine.running() assert(co, "You must call this function from within a coroutine") M.ModifyListenerAsync(ModifyListenerInput, function(response, error_type, error_message) assert(coroutine.resume(co, response, error_type, error_message)) end) return coroutine.yield() end --- Call DeleteLoadBalancer asynchronously, invoking a callback when done -- @param DeleteLoadBalancerInput -- @param cb Callback function accepting three args: response, error_type, error_message function M.DeleteLoadBalancerAsync(DeleteLoadBalancerInput, cb) assert(DeleteLoadBalancerInput, "You must provide a DeleteLoadBalancerInput") local headers = { [request_headers.CONTENT_TYPE_HEADER] = content_type.from_protocol(M.metadata.protocol, M.metadata.json_version), [request_headers.AMZ_TARGET_HEADER] = ".DeleteLoadBalancer", } for header,value in pairs(DeleteLoadBalancerInput.headers) do headers[header] = value end local request_handler, err = request_handlers.from_protocol_and_method("query", "POST") if request_handler then request_handler(settings.uri, "/", DeleteLoadBalancerInput, headers, settings, cb) else cb(false, err) end end --- Call DeleteLoadBalancer synchronously, returning when done -- This assumes that the function is called from within a coroutine -- @param DeleteLoadBalancerInput -- @return response -- @return error_type -- @return error_message function M.DeleteLoadBalancerSync(DeleteLoadBalancerInput, ...) local co = coroutine.running() assert(co, "You must call this function from within a coroutine") M.DeleteLoadBalancerAsync(DeleteLoadBalancerInput, function(response, error_type, error_message) assert(coroutine.resume(co, response, error_type, error_message)) end) return coroutine.yield() end --- Call DeleteRule asynchronously, invoking a callback when done -- @param DeleteRuleInput -- @param cb Callback function accepting three args: response, error_type, error_message function M.DeleteRuleAsync(DeleteRuleInput, cb) assert(DeleteRuleInput, "You must provide a DeleteRuleInput") local headers = { [request_headers.CONTENT_TYPE_HEADER] = content_type.from_protocol(M.metadata.protocol, M.metadata.json_version), [request_headers.AMZ_TARGET_HEADER] = ".DeleteRule", } for header,value in pairs(DeleteRuleInput.headers) do headers[header] = value end local request_handler, err = request_handlers.from_protocol_and_method("query", "POST") if request_handler then request_handler(settings.uri, "/", DeleteRuleInput, headers, settings, cb) else cb(false, err) end end --- Call DeleteRule synchronously, returning when done -- This assumes that the function is called from within a coroutine -- @param DeleteRuleInput -- @return response -- @return error_type -- @return error_message function M.DeleteRuleSync(DeleteRuleInput, ...) local co = coroutine.running() assert(co, "You must call this function from within a coroutine") M.DeleteRuleAsync(DeleteRuleInput, function(response, error_type, error_message) assert(coroutine.resume(co, response, error_type, error_message)) end) return coroutine.yield() end --- Call DeleteTargetGroup asynchronously, invoking a callback when done -- @param DeleteTargetGroupInput -- @param cb Callback function accepting three args: response, error_type, error_message function M.DeleteTargetGroupAsync(DeleteTargetGroupInput, cb) assert(DeleteTargetGroupInput, "You must provide a DeleteTargetGroupInput") local headers = { [request_headers.CONTENT_TYPE_HEADER] = content_type.from_protocol(M.metadata.protocol, M.metadata.json_version), [request_headers.AMZ_TARGET_HEADER] = ".DeleteTargetGroup", } for header,value in pairs(DeleteTargetGroupInput.headers) do headers[header] = value end local request_handler, err = request_handlers.from_protocol_and_method("query", "POST") if request_handler then request_handler(settings.uri, "/", DeleteTargetGroupInput, headers, settings, cb) else cb(false, err) end end --- Call DeleteTargetGroup synchronously, returning when done -- This assumes that the function is called from within a coroutine -- @param DeleteTargetGroupInput -- @return response -- @return error_type -- @return error_message function M.DeleteTargetGroupSync(DeleteTargetGroupInput, ...) local co = coroutine.running() assert(co, "You must call this function from within a coroutine") M.DeleteTargetGroupAsync(DeleteTargetGroupInput, function(response, error_type, error_message) assert(coroutine.resume(co, response, error_type, error_message)) end) return coroutine.yield() end --- Call DescribeTargetGroupAttributes asynchronously, invoking a callback when done -- @param DescribeTargetGroupAttributesInput -- @param cb Callback function accepting three args: response, error_type, error_message function M.DescribeTargetGroupAttributesAsync(DescribeTargetGroupAttributesInput, cb) assert(DescribeTargetGroupAttributesInput, "You must provide a DescribeTargetGroupAttributesInput") local headers = { [request_headers.CONTENT_TYPE_HEADER] = content_type.from_protocol(M.metadata.protocol, M.metadata.json_version), [request_headers.AMZ_TARGET_HEADER] = ".DescribeTargetGroupAttributes", } for header,value in pairs(DescribeTargetGroupAttributesInput.headers) do headers[header] = value end local request_handler, err = request_handlers.from_protocol_and_method("query", "POST") if request_handler then request_handler(settings.uri, "/", DescribeTargetGroupAttributesInput, headers, settings, cb) else cb(false, err) end end --- Call DescribeTargetGroupAttributes synchronously, returning when done -- This assumes that the function is called from within a coroutine -- @param DescribeTargetGroupAttributesInput -- @return response -- @return error_type -- @return error_message function M.DescribeTargetGroupAttributesSync(DescribeTargetGroupAttributesInput, ...) local co = coroutine.running() assert(co, "You must call this function from within a coroutine") M.DescribeTargetGroupAttributesAsync(DescribeTargetGroupAttributesInput, function(response, error_type, error_message) assert(coroutine.resume(co, response, error_type, error_message)) end) return coroutine.yield() end --- Call DescribeLoadBalancers asynchronously, invoking a callback when done -- @param DescribeLoadBalancersInput -- @param cb Callback function accepting three args: response, error_type, error_message function M.DescribeLoadBalancersAsync(DescribeLoadBalancersInput, cb) assert(DescribeLoadBalancersInput, "You must provide a DescribeLoadBalancersInput") local headers = { [request_headers.CONTENT_TYPE_HEADER] = content_type.from_protocol(M.metadata.protocol, M.metadata.json_version), [request_headers.AMZ_TARGET_HEADER] = ".DescribeLoadBalancers", } for header,value in pairs(DescribeLoadBalancersInput.headers) do headers[header] = value end local request_handler, err = request_handlers.from_protocol_and_method("query", "POST") if request_handler then request_handler(settings.uri, "/", DescribeLoadBalancersInput, headers, settings, cb) else cb(false, err) end end --- Call DescribeLoadBalancers synchronously, returning when done -- This assumes that the function is called from within a coroutine -- @param DescribeLoadBalancersInput -- @return response -- @return error_type -- @return error_message function M.DescribeLoadBalancersSync(DescribeLoadBalancersInput, ...) local co = coroutine.running() assert(co, "You must call this function from within a coroutine") M.DescribeLoadBalancersAsync(DescribeLoadBalancersInput, function(response, error_type, error_message) assert(coroutine.resume(co, response, error_type, error_message)) end) return coroutine.yield() end --- Call DescribeListeners asynchronously, invoking a callback when done -- @param DescribeListenersInput -- @param cb Callback function accepting three args: response, error_type, error_message function M.DescribeListenersAsync(DescribeListenersInput, cb) assert(DescribeListenersInput, "You must provide a DescribeListenersInput") local headers = { [request_headers.CONTENT_TYPE_HEADER] = content_type.from_protocol(M.metadata.protocol, M.metadata.json_version), [request_headers.AMZ_TARGET_HEADER] = ".DescribeListeners", } for header,value in pairs(DescribeListenersInput.headers) do headers[header] = value end local request_handler, err = request_handlers.from_protocol_and_method("query", "POST") if request_handler then request_handler(settings.uri, "/", DescribeListenersInput, headers, settings, cb) else cb(false, err) end end --- Call DescribeListeners synchronously, returning when done -- This assumes that the function is called from within a coroutine -- @param DescribeListenersInput -- @return response -- @return error_type -- @return error_message function M.DescribeListenersSync(DescribeListenersInput, ...) local co = coroutine.running() assert(co, "You must call this function from within a coroutine") M.DescribeListenersAsync(DescribeListenersInput, function(response, error_type, error_message) assert(coroutine.resume(co, response, error_type, error_message)) end) return coroutine.yield() end --- Call RemoveTags asynchronously, invoking a callback when done -- @param RemoveTagsInput -- @param cb Callback function accepting three args: response, error_type, error_message function M.RemoveTagsAsync(RemoveTagsInput, cb) assert(RemoveTagsInput, "You must provide a RemoveTagsInput") local headers = { [request_headers.CONTENT_TYPE_HEADER] = content_type.from_protocol(M.metadata.protocol, M.metadata.json_version), [request_headers.AMZ_TARGET_HEADER] = ".RemoveTags", } for header,value in pairs(RemoveTagsInput.headers) do headers[header] = value end local request_handler, err = request_handlers.from_protocol_and_method("query", "POST") if request_handler then request_handler(settings.uri, "/", RemoveTagsInput, headers, settings, cb) else cb(false, err) end end --- Call RemoveTags synchronously, returning when done -- This assumes that the function is called from within a coroutine -- @param RemoveTagsInput -- @return response -- @return error_type -- @return error_message function M.RemoveTagsSync(RemoveTagsInput, ...) local co = coroutine.running() assert(co, "You must call this function from within a coroutine") M.RemoveTagsAsync(RemoveTagsInput, function(response, error_type, error_message) assert(coroutine.resume(co, response, error_type, error_message)) end) return coroutine.yield() end --- Call CreateListener asynchronously, invoking a callback when done -- @param CreateListenerInput -- @param cb Callback function accepting three args: response, error_type, error_message function M.CreateListenerAsync(CreateListenerInput, cb) assert(CreateListenerInput, "You must provide a CreateListenerInput") local headers = { [request_headers.CONTENT_TYPE_HEADER] = content_type.from_protocol(M.metadata.protocol, M.metadata.json_version), [request_headers.AMZ_TARGET_HEADER] = ".CreateListener", } for header,value in pairs(CreateListenerInput.headers) do headers[header] = value end local request_handler, err = request_handlers.from_protocol_and_method("query", "POST") if request_handler then request_handler(settings.uri, "/", CreateListenerInput, headers, settings, cb) else cb(false, err) end end --- Call CreateListener synchronously, returning when done -- This assumes that the function is called from within a coroutine -- @param CreateListenerInput -- @return response -- @return error_type -- @return error_message function M.CreateListenerSync(CreateListenerInput, ...) local co = coroutine.running() assert(co, "You must call this function from within a coroutine") M.CreateListenerAsync(CreateListenerInput, function(response, error_type, error_message) assert(coroutine.resume(co, response, error_type, error_message)) end) return coroutine.yield() end --- Call SetSubnets asynchronously, invoking a callback when done -- @param SetSubnetsInput -- @param cb Callback function accepting three args: response, error_type, error_message function M.SetSubnetsAsync(SetSubnetsInput, cb) assert(SetSubnetsInput, "You must provide a SetSubnetsInput") local headers = { [request_headers.CONTENT_TYPE_HEADER] = content_type.from_protocol(M.metadata.protocol, M.metadata.json_version), [request_headers.AMZ_TARGET_HEADER] = ".SetSubnets", } for header,value in pairs(SetSubnetsInput.headers) do headers[header] = value end local request_handler, err = request_handlers.from_protocol_and_method("query", "POST") if request_handler then request_handler(settings.uri, "/", SetSubnetsInput, headers, settings, cb) else cb(false, err) end end --- Call SetSubnets synchronously, returning when done -- This assumes that the function is called from within a coroutine -- @param SetSubnetsInput -- @return response -- @return error_type -- @return error_message function M.SetSubnetsSync(SetSubnetsInput, ...) local co = coroutine.running() assert(co, "You must call this function from within a coroutine") M.SetSubnetsAsync(SetSubnetsInput, function(response, error_type, error_message) assert(coroutine.resume(co, response, error_type, error_message)) end) return coroutine.yield() end --- Call DescribeTags asynchronously, invoking a callback when done -- @param DescribeTagsInput -- @param cb Callback function accepting three args: response, error_type, error_message function M.DescribeTagsAsync(DescribeTagsInput, cb) assert(DescribeTagsInput, "You must provide a DescribeTagsInput") local headers = { [request_headers.CONTENT_TYPE_HEADER] = content_type.from_protocol(M.metadata.protocol, M.metadata.json_version), [request_headers.AMZ_TARGET_HEADER] = ".DescribeTags", } for header,value in pairs(DescribeTagsInput.headers) do headers[header] = value end local request_handler, err = request_handlers.from_protocol_and_method("query", "POST") if request_handler then request_handler(settings.uri, "/", DescribeTagsInput, headers, settings, cb) else cb(false, err) end end --- Call DescribeTags synchronously, returning when done -- This assumes that the function is called from within a coroutine -- @param DescribeTagsInput -- @return response -- @return error_type -- @return error_message function M.DescribeTagsSync(DescribeTagsInput, ...) local co = coroutine.running() assert(co, "You must call this function from within a coroutine") M.DescribeTagsAsync(DescribeTagsInput, function(response, error_type, error_message) assert(coroutine.resume(co, response, error_type, error_message)) end) return coroutine.yield() end --- Call ModifyRule asynchronously, invoking a callback when done -- @param ModifyRuleInput -- @param cb Callback function accepting three args: response, error_type, error_message function M.ModifyRuleAsync(ModifyRuleInput, cb) assert(ModifyRuleInput, "You must provide a ModifyRuleInput") local headers = { [request_headers.CONTENT_TYPE_HEADER] = content_type.from_protocol(M.metadata.protocol, M.metadata.json_version), [request_headers.AMZ_TARGET_HEADER] = ".ModifyRule", } for header,value in pairs(ModifyRuleInput.headers) do headers[header] = value end local request_handler, err = request_handlers.from_protocol_and_method("query", "POST") if request_handler then request_handler(settings.uri, "/", ModifyRuleInput, headers, settings, cb) else cb(false, err) end end --- Call ModifyRule synchronously, returning when done -- This assumes that the function is called from within a coroutine -- @param ModifyRuleInput -- @return response -- @return error_type -- @return error_message function M.ModifyRuleSync(ModifyRuleInput, ...) local co = coroutine.running() assert(co, "You must call this function from within a coroutine") M.ModifyRuleAsync(ModifyRuleInput, function(response, error_type, error_message) assert(coroutine.resume(co, response, error_type, error_message)) end) return coroutine.yield() end --- Call CreateTargetGroup asynchronously, invoking a callback when done -- @param CreateTargetGroupInput -- @param cb Callback function accepting three args: response, error_type, error_message function M.CreateTargetGroupAsync(CreateTargetGroupInput, cb) assert(CreateTargetGroupInput, "You must provide a CreateTargetGroupInput") local headers = { [request_headers.CONTENT_TYPE_HEADER] = content_type.from_protocol(M.metadata.protocol, M.metadata.json_version), [request_headers.AMZ_TARGET_HEADER] = ".CreateTargetGroup", } for header,value in pairs(CreateTargetGroupInput.headers) do headers[header] = value end local request_handler, err = request_handlers.from_protocol_and_method("query", "POST") if request_handler then request_handler(settings.uri, "/", CreateTargetGroupInput, headers, settings, cb) else cb(false, err) end end --- Call CreateTargetGroup synchronously, returning when done -- This assumes that the function is called from within a coroutine -- @param CreateTargetGroupInput -- @return response -- @return error_type -- @return error_message function M.CreateTargetGroupSync(CreateTargetGroupInput, ...) local co = coroutine.running() assert(co, "You must call this function from within a coroutine") M.CreateTargetGroupAsync(CreateTargetGroupInput, function(response, error_type, error_message) assert(coroutine.resume(co, response, error_type, error_message)) end) return coroutine.yield() end --- Call AddTags asynchronously, invoking a callback when done -- @param AddTagsInput -- @param cb Callback function accepting three args: response, error_type, error_message function M.AddTagsAsync(AddTagsInput, cb) assert(AddTagsInput, "You must provide a AddTagsInput") local headers = { [request_headers.CONTENT_TYPE_HEADER] = content_type.from_protocol(M.metadata.protocol, M.metadata.json_version), [request_headers.AMZ_TARGET_HEADER] = ".AddTags", } for header,value in pairs(AddTagsInput.headers) do headers[header] = value end local request_handler, err = request_handlers.from_protocol_and_method("query", "POST") if request_handler then request_handler(settings.uri, "/", AddTagsInput, headers, settings, cb) else cb(false, err) end end --- Call AddTags synchronously, returning when done -- This assumes that the function is called from within a coroutine -- @param AddTagsInput -- @return response -- @return error_type -- @return error_message function M.AddTagsSync(AddTagsInput, ...) local co = coroutine.running() assert(co, "You must call this function from within a coroutine") M.AddTagsAsync(AddTagsInput, function(response, error_type, error_message) assert(coroutine.resume(co, response, error_type, error_message)) end) return coroutine.yield() end --- Call DescribeTargetGroups asynchronously, invoking a callback when done -- @param DescribeTargetGroupsInput -- @param cb Callback function accepting three args: response, error_type, error_message function M.DescribeTargetGroupsAsync(DescribeTargetGroupsInput, cb) assert(DescribeTargetGroupsInput, "You must provide a DescribeTargetGroupsInput") local headers = { [request_headers.CONTENT_TYPE_HEADER] = content_type.from_protocol(M.metadata.protocol, M.metadata.json_version), [request_headers.AMZ_TARGET_HEADER] = ".DescribeTargetGroups", } for header,value in pairs(DescribeTargetGroupsInput.headers) do headers[header] = value end local request_handler, err = request_handlers.from_protocol_and_method("query", "POST") if request_handler then request_handler(settings.uri, "/", DescribeTargetGroupsInput, headers, settings, cb) else cb(false, err) end end --- Call DescribeTargetGroups synchronously, returning when done -- This assumes that the function is called from within a coroutine -- @param DescribeTargetGroupsInput -- @return response -- @return error_type -- @return error_message function M.DescribeTargetGroupsSync(DescribeTargetGroupsInput, ...) local co = coroutine.running() assert(co, "You must call this function from within a coroutine") M.DescribeTargetGroupsAsync(DescribeTargetGroupsInput, function(response, error_type, error_message) assert(coroutine.resume(co, response, error_type, error_message)) end) return coroutine.yield() end --- Call DeregisterTargets asynchronously, invoking a callback when done -- @param DeregisterTargetsInput -- @param cb Callback function accepting three args: response, error_type, error_message function M.DeregisterTargetsAsync(DeregisterTargetsInput, cb) assert(DeregisterTargetsInput, "You must provide a DeregisterTargetsInput") local headers = { [request_headers.CONTENT_TYPE_HEADER] = content_type.from_protocol(M.metadata.protocol, M.metadata.json_version), [request_headers.AMZ_TARGET_HEADER] = ".DeregisterTargets", } for header,value in pairs(DeregisterTargetsInput.headers) do headers[header] = value end local request_handler, err = request_handlers.from_protocol_and_method("query", "POST") if request_handler then request_handler(settings.uri, "/", DeregisterTargetsInput, headers, settings, cb) else cb(false, err) end end --- Call DeregisterTargets synchronously, returning when done -- This assumes that the function is called from within a coroutine -- @param DeregisterTargetsInput -- @return response -- @return error_type -- @return error_message function M.DeregisterTargetsSync(DeregisterTargetsInput, ...) local co = coroutine.running() assert(co, "You must call this function from within a coroutine") M.DeregisterTargetsAsync(DeregisterTargetsInput, function(response, error_type, error_message) assert(coroutine.resume(co, response, error_type, error_message)) end) return coroutine.yield() end --- Call ModifyLoadBalancerAttributes asynchronously, invoking a callback when done -- @param ModifyLoadBalancerAttributesInput -- @param cb Callback function accepting three args: response, error_type, error_message function M.ModifyLoadBalancerAttributesAsync(ModifyLoadBalancerAttributesInput, cb) assert(ModifyLoadBalancerAttributesInput, "You must provide a ModifyLoadBalancerAttributesInput") local headers = { [request_headers.CONTENT_TYPE_HEADER] = content_type.from_protocol(M.metadata.protocol, M.metadata.json_version), [request_headers.AMZ_TARGET_HEADER] = ".ModifyLoadBalancerAttributes", } for header,value in pairs(ModifyLoadBalancerAttributesInput.headers) do headers[header] = value end local request_handler, err = request_handlers.from_protocol_and_method("query", "POST") if request_handler then request_handler(settings.uri, "/", ModifyLoadBalancerAttributesInput, headers, settings, cb) else cb(false, err) end end --- Call ModifyLoadBalancerAttributes synchronously, returning when done -- This assumes that the function is called from within a coroutine -- @param ModifyLoadBalancerAttributesInput -- @return response -- @return error_type -- @return error_message function M.ModifyLoadBalancerAttributesSync(ModifyLoadBalancerAttributesInput, ...) local co = coroutine.running() assert(co, "You must call this function from within a coroutine") M.ModifyLoadBalancerAttributesAsync(ModifyLoadBalancerAttributesInput, function(response, error_type, error_message) assert(coroutine.resume(co, response, error_type, error_message)) end) return coroutine.yield() end --- Call DescribeRules asynchronously, invoking a callback when done -- @param DescribeRulesInput -- @param cb Callback function accepting three args: response, error_type, error_message function M.DescribeRulesAsync(DescribeRulesInput, cb) assert(DescribeRulesInput, "You must provide a DescribeRulesInput") local headers = { [request_headers.CONTENT_TYPE_HEADER] = content_type.from_protocol(M.metadata.protocol, M.metadata.json_version), [request_headers.AMZ_TARGET_HEADER] = ".DescribeRules", } for header,value in pairs(DescribeRulesInput.headers) do headers[header] = value end local request_handler, err = request_handlers.from_protocol_and_method("query", "POST") if request_handler then request_handler(settings.uri, "/", DescribeRulesInput, headers, settings, cb) else cb(false, err) end end --- Call DescribeRules synchronously, returning when done -- This assumes that the function is called from within a coroutine -- @param DescribeRulesInput -- @return response -- @return error_type -- @return error_message function M.DescribeRulesSync(DescribeRulesInput, ...) local co = coroutine.running() assert(co, "You must call this function from within a coroutine") M.DescribeRulesAsync(DescribeRulesInput, function(response, error_type, error_message) assert(coroutine.resume(co, response, error_type, error_message)) end) return coroutine.yield() end --- Call DescribeListenerCertificates asynchronously, invoking a callback when done -- @param DescribeListenerCertificatesInput -- @param cb Callback function accepting three args: response, error_type, error_message function M.DescribeListenerCertificatesAsync(DescribeListenerCertificatesInput, cb) assert(DescribeListenerCertificatesInput, "You must provide a DescribeListenerCertificatesInput") local headers = { [request_headers.CONTENT_TYPE_HEADER] = content_type.from_protocol(M.metadata.protocol, M.metadata.json_version), [request_headers.AMZ_TARGET_HEADER] = ".DescribeListenerCertificates", } for header,value in pairs(DescribeListenerCertificatesInput.headers) do headers[header] = value end local request_handler, err = request_handlers.from_protocol_and_method("query", "POST") if request_handler then request_handler(settings.uri, "/", DescribeListenerCertificatesInput, headers, settings, cb) else cb(false, err) end end --- Call DescribeListenerCertificates synchronously, returning when done -- This assumes that the function is called from within a coroutine -- @param DescribeListenerCertificatesInput -- @return response -- @return error_type -- @return error_message function M.DescribeListenerCertificatesSync(DescribeListenerCertificatesInput, ...) local co = coroutine.running() assert(co, "You must call this function from within a coroutine") M.DescribeListenerCertificatesAsync(DescribeListenerCertificatesInput, function(response, error_type, error_message) assert(coroutine.resume(co, response, error_type, error_message)) end) return coroutine.yield() end --- Call DescribeTargetHealth asynchronously, invoking a callback when done -- @param DescribeTargetHealthInput -- @param cb Callback function accepting three args: response, error_type, error_message function M.DescribeTargetHealthAsync(DescribeTargetHealthInput, cb) assert(DescribeTargetHealthInput, "You must provide a DescribeTargetHealthInput") local headers = { [request_headers.CONTENT_TYPE_HEADER] = content_type.from_protocol(M.metadata.protocol, M.metadata.json_version), [request_headers.AMZ_TARGET_HEADER] = ".DescribeTargetHealth", } for header,value in pairs(DescribeTargetHealthInput.headers) do headers[header] = value end local request_handler, err = request_handlers.from_protocol_and_method("query", "POST") if request_handler then request_handler(settings.uri, "/", DescribeTargetHealthInput, headers, settings, cb) else cb(false, err) end end --- Call DescribeTargetHealth synchronously, returning when done -- This assumes that the function is called from within a coroutine -- @param DescribeTargetHealthInput -- @return response -- @return error_type -- @return error_message function M.DescribeTargetHealthSync(DescribeTargetHealthInput, ...) local co = coroutine.running() assert(co, "You must call this function from within a coroutine") M.DescribeTargetHealthAsync(DescribeTargetHealthInput, function(response, error_type, error_message) assert(coroutine.resume(co, response, error_type, error_message)) end) return coroutine.yield() end --- Call CreateLoadBalancer asynchronously, invoking a callback when done -- @param CreateLoadBalancerInput -- @param cb Callback function accepting three args: response, error_type, error_message function M.CreateLoadBalancerAsync(CreateLoadBalancerInput, cb) assert(CreateLoadBalancerInput, "You must provide a CreateLoadBalancerInput") local headers = { [request_headers.CONTENT_TYPE_HEADER] = content_type.from_protocol(M.metadata.protocol, M.metadata.json_version), [request_headers.AMZ_TARGET_HEADER] = ".CreateLoadBalancer", } for header,value in pairs(CreateLoadBalancerInput.headers) do headers[header] = value end local request_handler, err = request_handlers.from_protocol_and_method("query", "POST") if request_handler then request_handler(settings.uri, "/", CreateLoadBalancerInput, headers, settings, cb) else cb(false, err) end end --- Call CreateLoadBalancer synchronously, returning when done -- This assumes that the function is called from within a coroutine -- @param CreateLoadBalancerInput -- @return response -- @return error_type -- @return error_message function M.CreateLoadBalancerSync(CreateLoadBalancerInput, ...) local co = coroutine.running() assert(co, "You must call this function from within a coroutine") M.CreateLoadBalancerAsync(CreateLoadBalancerInput, function(response, error_type, error_message) assert(coroutine.resume(co, response, error_type, error_message)) end) return coroutine.yield() end --- Call DescribeAccountLimits asynchronously, invoking a callback when done -- @param DescribeAccountLimitsInput -- @param cb Callback function accepting three args: response, error_type, error_message function M.DescribeAccountLimitsAsync(DescribeAccountLimitsInput, cb) assert(DescribeAccountLimitsInput, "You must provide a DescribeAccountLimitsInput") local headers = { [request_headers.CONTENT_TYPE_HEADER] = content_type.from_protocol(M.metadata.protocol, M.metadata.json_version), [request_headers.AMZ_TARGET_HEADER] = ".DescribeAccountLimits", } for header,value in pairs(DescribeAccountLimitsInput.headers) do headers[header] = value end local request_handler, err = request_handlers.from_protocol_and_method("query", "POST") if request_handler then request_handler(settings.uri, "/", DescribeAccountLimitsInput, headers, settings, cb) else cb(false, err) end end --- Call DescribeAccountLimits synchronously, returning when done -- This assumes that the function is called from within a coroutine -- @param DescribeAccountLimitsInput -- @return response -- @return error_type -- @return error_message function M.DescribeAccountLimitsSync(DescribeAccountLimitsInput, ...) local co = coroutine.running() assert(co, "You must call this function from within a coroutine") M.DescribeAccountLimitsAsync(DescribeAccountLimitsInput, function(response, error_type, error_message) assert(coroutine.resume(co, response, error_type, error_message)) end) return coroutine.yield() end return M
include( "admin_buttons.lua" ) local PANEL = {} /*--------------------------------------------------------- Name: PerformLayout ---------------------------------------------------------*/ function PANEL:Init() self.InfoLabels = {} self.InfoLabels[ 1 ] = {} self.InfoLabels[ 2 ] = {} self.btnBan = vgui.Create( "PlayerBanButton", self ) self.btnPBan = vgui.Create( "PlayerPermBanButton", self ) self.btnSpectate = vgui.Create( "PlayerSpectateButton", self ) self.btnBlacklist = vgui.Create( "PlayerBlacklistButton", self ) self.btnRename = vgui.Create( "PlayerForceRenameButton", self ) self.btnSlay = vgui.Create( "PlayerSlayButton", self ) self.btnBlacklistFromSerious = vgui.Create( "PlayerBlacklistFromSeriousButton", self ) self.scrollerTime = vgui.Create( "DNumSlider", self ) self.scrollerTime:SetDecimals(0); self.scrollerTime:SetValue(24); self.scrollerTime:SetMin(0); self.scrollerTime:SetMax(720); self.scrollerTime:SetText("Punishment Time ( Hours )"); end /*--------------------------------------------------------- Name: PerformLayout ---------------------------------------------------------*/ function PANEL:SetInfo( column, k, v ) if ( !v || v == "" ) then v = "N/A" end if ( !self.InfoLabels[ column ][ k ] ) then self.InfoLabels[ column ][ k ] = {} self.InfoLabels[ column ][ k ].Key = vgui.Create( "Label", self ) self.InfoLabels[ column ][ k ].Value = vgui.Create( "Label", self ) self.InfoLabels[ column ][ k ].Key:SetText( k ) self:InvalidateLayout() end self.InfoLabels[ column ][ k ].Value:SetText( v ) return true end /*--------------------------------------------------------- Name: UpdatePlayerData ---------------------------------------------------------*/ function PANEL:SetPlayer( ply ) self.Player = ply self:UpdatePlayerData() end /*--------------------------------------------------------- Name: UpdatePlayerData ---------------------------------------------------------*/ local titles = {}; titles[0] = "Owner"; titles[1] = "Super Admin"; titles[2] = "Admin"; titles[3] = "Mod"; titles[4] = "Administrator"; titles[10] = "Trial Administrator"; titles[97] = "Diamond VIP"; titles[98] = "Gold VIP"; titles[99] = "Silver VIP"; titles[100] = "Bronze VIP"; titles[200] = "Guest"; titles[255] = "Banned"; local IDsToClass = {}; IDsToClass[TEAM_CITIZEN] = "Citizen"; IDsToClass[TEAM_POLICE] = "Police Officer"; IDsToClass[TEAM_SECRET_SERVICE] = "SS Agent"; IDsToClass[TEAM_SWAT] = "SWAT Officer"; IDsToClass[TEAM_MAYOR] = "Mayor"; IDsToClass[TEAM_FIREMAN] = "Fireman"; IDsToClass[TEAM_MEDIC] = "Medic"; IDsToClass[TEAM_DISPATCHER] = "Dispatch"; IDsToClass[TEAM_ROADCREW] = "Road Crew"; IDsToClass[TEAM_BUSDRIVER] = "Bus Driver"; function PANEL:UpdatePlayerData() if (!self.Player) then return end if ( !self.Player:IsValid() ) then return end self:SetInfo( 1, "SteamID:", self.Player:SteamID()) self:SetInfo( 1, "UniqueID:", self.Player:UniqueID() ) self:SetInfo( 1, "Steam Name:", self.Player:Nick() ) self:SetInfo( 1, "RP Name:", self.Player:GetRPName() ) if (titles[self.Player:GetAccessLevel()]) then self:SetInfo(1, "Position: ", titles[self.Player:GetAccessLevel()]); if (self.Player:SteamID() == "STEAM_0:0") then self:SetInfo(1, "Position: ", "Programmer"); end; else self:SetInfo(1, "Position: ", "Unknown Access"); end if (self.Player:Team() && IDsToClass[self.Player:Team()]) then self:SetInfo(1, "Class: ", IDsToClass[self.Player:Team()]); else self:SetInfo(1, "Class: ", "Unknown Class"); end self:InvalidateLayout() end /*--------------------------------------------------------- Name: PerformLayout ---------------------------------------------------------*/ function PANEL:ApplySchemeSettings() for _k, column in pairs( self.InfoLabels ) do for k, v in pairs( column ) do v.Key:SetFGColor( 0, 0, 0, 100 ) v.Value:SetFGColor( 0, 70, 0, 200 ) end end end /*--------------------------------------------------------- Name: PerformLayout ---------------------------------------------------------*/ function PANEL:Think() if ( self.PlayerUpdate && self.PlayerUpdate > CurTime() ) then return end self.PlayerUpdate = CurTime() + 0.25 self:UpdatePlayerData() self.scrollerTime:SetText("Punishment Time ( Hours; 0 = Perm ) - " .. (self.scrollerTime:GetValue() / 24) .. " Days"); end /*--------------------------------------------------------- Name: PerformLayout ---------------------------------------------------------*/ function PANEL:PerformLayout() local x = 5 for colnum, column in pairs( self.InfoLabels ) do local y = 0 local RightMost = 0 for k, v in pairs( column ) do v.Key:SetPos( x, y ) v.Key:SizeToContents() v.Value:SetPos( x + 70 , y ) v.Value:SizeToContents() y = y + v.Key:GetTall() + 2 RightMost = math.max( RightMost, v.Value.x + v.Value:GetWide() ) end //x = RightMost + 10 x = x + 300 end if ( !self.Player || !LocalPlayer():IsAdmin() ) then self.btnBan:SetVisible( false ) self.btnPBan:SetVisible( false ) self.btnSpectate:SetVisible( false ) self.btnBlacklist:SetVisible( false ) self.btnBlacklistFromSerious:SetVisible( false ) self.btnRename:SetVisible( false ) else self.btnBan:SetVisible( true ) self.btnSpectate:SetVisible( true ) self.btnBlacklist:SetVisible( true ) self.btnBlacklistFromSerious:SetVisible( true ) self.btnRename:SetVisible( true ) local sizeOButton = 60; self.btnBlacklistFromSerious:SetPos( self:GetWide() - (sizeOButton + 4) * 5, 80 ) self.btnBlacklistFromSerious:SetSize( sizeOButton, 20 ) self.btnRename:SetPos( self:GetWide() - (sizeOButton + 4) * 6, 80 ) self.btnRename:SetSize( sizeOButton, 20 ) self.btnBlacklist:SetPos( self:GetWide() - (sizeOButton + 4) * 4, 80 ) self.btnBlacklist:SetSize( sizeOButton, 20 ) self.btnSpectate:SetPos( self:GetWide() - (sizeOButton + 4) * 3, 80 ) self.btnSpectate:SetSize( sizeOButton, 20 ) self.btnBan:SetPos( self:GetWide() - (sizeOButton + 4) * 2, 80 ) self.btnBan:SetSize( sizeOButton, 20 ) self.btnSlay:SetPos( self:GetWide() - (sizeOButton + 4) * 7, 80 ) self.btnSlay:SetSize( sizeOButton, 20 ) if (LocalPlayer():IsSuperAdmin()) then self.btnPBan:SetPos( self:GetWide() - (sizeOButton + 4) * 8, 80 ) self.btnPBan:SetSize( sizeOButton, 20 ) self.btnPBan:SetVisible( true ) else self.btnPBan:SetVisible( false ) end end self.scrollerTime:SetPos(self:GetWide() - 305, 5); self.scrollerTime:SetSize(300, 30); end function PANEL:Paint() return true end vgui.Register( "ScorePlayerInfoCard", PANEL, "Panel" )
require 'cutorch' require 'ctc' t = torch.randn(100000):cuda() t2 = torch.randn(100000) timer = torch.Timer() last = 0 for i = 1, (#t)[1] do t[i] = t[i] + 1 end now = timer:time().real print(now - last) last = now for i = 1, (#t2)[1] do t2[i] = t2[i] + 1 end now = timer:time().real print(now - last) last = now t3 = t:float() for i = 1, (#t3)[1] do t3[i] = t3[i] + 1 end now = timer:time().real print(now - last) last = now print(t3)
-- -- Licensed to the Apache Software Foundation (ASF) under one or more -- contributor license agreements. See the NOTICE file distributed with -- this work for additional information regarding copyright ownership. -- The ASF licenses this file to You under the Apache License, Version 2.0 -- (the "License"); you may not use this file except in compliance with -- the License. You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. -- local core = require("apisix.core") local binaryHeap = require("binaryheap") local ipairs = ipairs local pairs = pairs local _M = {} local function least_score(a, b) return a.score < b.score end function _M.new(up_nodes, upstream) local servers_heap = binaryHeap.minUnique(least_score) for server, weight in pairs(up_nodes) do local score = 1 / weight -- Note: the argument order of insert is different from others servers_heap:insert({ server = server, effect_weight = 1 / weight, score = score, }, server) end return { upstream = upstream, get = function (ctx) local server, info, err if ctx.balancer_tried_servers then local tried_server_list = {} while true do server, info = servers_heap:peek() if server == nil then err = "all upstream servers tried" break end if not ctx.balancer_tried_servers[server] then break end servers_heap:pop() core.table.insert(tried_server_list, info) end for _, info in ipairs(tried_server_list) do servers_heap:insert(info, info.server) end else server, info = servers_heap:peek() end if not server then return nil, err end info.score = info.score + info.effect_weight servers_heap:update(server, info) return server end, after_balance = function (ctx, before_retry) local server = ctx.balancer_server local info = servers_heap:valueByPayload(server) info.score = info.score - info.effect_weight servers_heap:update(server, info) if not before_retry then if ctx.balancer_tried_servers then core.tablepool.release("balancer_tried_servers", ctx.balancer_tried_servers) ctx.balancer_tried_servers = nil end return nil end if not ctx.balancer_tried_servers then ctx.balancer_tried_servers = core.tablepool.fetch("balancer_tried_servers", 0, 2) end ctx.balancer_tried_servers[server] = true end } end return _M
local GeometricEncoder = torch.class('unsup.GeometricEncoder','unsup.UnsupModule') function GeometricEncoder:__init(encoder, decoder, beta) self.encoder = encoder:cuda() self.decoder = decoder:cuda() self.beta = beta self.loss = nn.MSECriterion():cuda() self.loss.sizeAverage = false end function GeometricEncoder:parameters() local seq = nn.Sequential() seq:add(self.encoder) seq:add(self.decoder) return seq:parameters() end function GeometricEncoder:initDiagHessianParameters() self.encoder:initDiagHessianParameters() self.decoder:initDiagHessianParameters() end function GeometricEncoder:reset(stdv) self.decoder:reset(stdv) self.encoder:reset(stdv) end function GeometricEncoder:updateOutput(input,target) self.encoder:updateOutput(input) self.decoder:updateOutput(self.encoder.output) self.output = self.beta * self.loss:updateOutput(self.decoder.output, target) return self.output end function GeometricEncoder:updateGradInput(input,target) self.loss:updateGradInput(self.decoder.output, target) self.loss.gradInput:mul(self.beta) self.decoder:updateGradInput(self.encoder.output, self.loss.gradInput) self.encoder:updateGradInput(input, self.decoder.gradInput) self.gradInput = self.encoder.gradInput return self.gradInput end function GeometricEncoder:accGradParameters(input,target) self.decoder:accGradParameters(self.encoder.output, self.loss.gradInput) self.encoder:accGradParameters(input, self.decoder.gradInput) end function GeometricEncoder:zeroGradParameters() self.encoder:zeroGradParameters() self.decoder:zeroGradParameters() end function GeometricEncoder:updateDiagHessianInput(input, diagHessianOutput) self.loss:updateDiagHessianInput(self.decoder.output, target) self.loss.diagHessianInput:mul(self.beta) self.decoder:updateDiagHessianInput(self.encoder.output, self.loss.diagHessianInput) self.encoder:updateDiagHessianInput(input, self.decoder.diagHessianInput) self.diagHessianInput = self.encoder.diagHessianInput return self.diagHessianInput end function GeometricEncoder:accDiagHessianParameters(input, diagHessianOutput) self.decoder:accDiagHessianParameters(self.encoder.output, self.loss.diagHessianInput) self.encoder:accDiagHessianParameters(input, self.decoder.diagHessianInput) end function GeometricEncoder:updateParameters(learningRate) local eta = {} if type(learningRate) ~= 'number' then eta = learningRate else eta[1] = learningRate eta[2] = learningRate end self.encoder:updateParameters(eta[1]) self.decoder:updateParameters(eta[2]) end function GeometricEncoder:normalize() if not self.normalized then return end -- normalize the dictionary local w = self.decoder.weight if not w or w:dim() < 2 then return end if w:dim() == 5 then for i=1,w:size(1) do local keri = w:select(1,i) for j=1,w:size(2) do local kerj = keri:select(1,j) for k=1,w:size(3) do local ker = kerj:select(1,k) ker:div(ker:norm()+1e-12) end end end elseif w:dim() == 4 then for i=1,w:size(1) do for j=1,w:size(2) do local k=w:select(1,i):select(1,j) k:div(k:norm()+1e-12) end end elseif w:dim() == 3 then for i=1,w:size(1) do local k=w:select(1,i) k:div(k:norm()+1e-12) end elseif w:dim() == 2 then for i=1,w:size(2) do local k=w:select(2,i) k:div(k:norm()+1e-12) end else error('I do not know what kind of weight matrix this is') end end
local playsession = { {"teomarx", {69744}}, {"mad58max", {1819}} } return playsession
polyline = { color ="blue", thickness = 2, npoints = 4, -- polyline[ 1] {x = 0, y = 0}, -- polyline[ 2] {x =-10, y = 0}, -- polyline[ 3] {x =-10, y = 1}, -- polyline[ 4] {x = 0, y = 1} } print(polyline[2].x) --> -10 print(polyline[4].y) --> 1
-- Copyright (C) 2016 Luke San Antonio -- All rights reserved. -- Standard no-frills sandbox for the configuration file -- Making the sandbox environment in Lua is so much easier because we have to -- make sure we don't mutate the global environment and properly references -- variables that *are* in the global environment. -- Return a function that builds the sandbox return function () local require_cache = {} return { ipairs = ipairs, error = error, next = next, pairs = pairs, pcall = pcall, select = select, tonumber = tonumber, tostring = tostring, type = type, unpack = unpack, xpcall = xpcall, _VERSION = _VERSION, coroutine = { create = coroutine.create, resume = coroutine.resume, yield = coroutine.yield, running = coroutine.running, status = coroutine.status, wrap = coroutine.wrap }, string = { byte = string.byte, char = string.char, find = string.find, format = string.format, gmatch = string.gmatch, gsub = string.gsub, len = string.len, lower = string.lower, match = string.match, rep = string.rep, reverse = string.reverse, sub = string.sub, upper = string.upper }, table = { insert = table.insert, maxn = table.maxn, remove = table.remove, sort = table.sort }, math = { abs = math.abs, acos = math.acos, asin = math.asin, atan = math.atan, atan2 = math.atan2, ceil = math.ceil, cos = math.cos, cosh = math.cosh, deg = math.deg, exp = math.exp, floor = math.floor, fmod = math.fmod, frexp = math.frexp, huge = math.huge, ldexp = math.ldexp, log = math.log, log10 = math.log10, max = math.max, min = math.min, modf = math.modf, pi = math.pi, pow = math.pow, rad = math.rad, random = math.random, randomseed = math.randomseed, sin = math.sin, sinh = math.sinh, sqrt = math.sqrt, tan = math.tan, tanh = math.tanh }, os = { clock = os.clock, difftime = os.difftime, time = os.time }, require = function(name) -- Cache the file filename = name..".lua" if require_cache[filename] == nil then local func, err = loadfile(filename) if func == nil then error(err) else require_cache[filename] = func() end end return require_cache[filename] end } end
function love.conf(t) t.window.width = 368 t.window.height = 702 t.window.title = "Coco climber by kanatos 2016" t.identity = "clone rainbow island " end
-- device_list.lua -- _______ _____ _______ -- |__ __| | __ \__ __| -- | | ___ ___ _ __ _ _| | | | | | -- | |/ _ \/ _ \ '_ \| | | | | | | | | -- | | __/ __/ | | | |_| | |__| | | | -- |_|\___|\___|_| |_|\__, |_____/ |_| -- __/ | -- |___/ -- -- TeenyDT - GUI and command line tool to generate USB descriptors and drivers -- -- Copyright (c) 2019 XToolBox - admin@xtoolbox.org -- www.tusb.org -- -- Permission is hereby granted, free of charge, to any person obtaining a copy -- of this software and associated documentation files (the "Software"), to deal -- in the Software without restriction, including without limitation the rights -- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -- copies of the Software, and to permit persons to whom the Software is -- furnished to do so, subject to the following conditions: -- -- The above copyright notice and this permission notice shall be included in all -- copies or substantial portions of the Software. -- -- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -- SOFTWARE. return { {name = "STM32F0xx", maxEp = 7, maxMem = 1024, }, {name = "STM32F10x_FS", maxEp = 7, maxMem = 512, }, {name = "STM32F10x_OTG", maxEp = 4, maxMem = 1280, }, {name = "STM32F2xx_FS", maxEp = 4, maxMem = 1280, }, {name = "STM32F2xx_HS", maxEp = 6, maxMem = 4096, }, {name = "STM32F4xx_FS", maxEp = 4, maxMem = 1280, }, {name = "STM32F303_BC", maxEp = 7, maxMem = 512, }, {name = "STM32F373x", maxEp = 7, maxMem = 512, }, {name = "STM32F303_DE", maxEp = 7, maxMem = 1024, }, {name = "STM32F4xx_HS", maxEp = 6, maxMem = 4096, }, {name = "STM32F7xx_FS", maxEp = 6, maxMem = 1280, }, {name = "STM32F7xx_HS", maxEp = 9, maxMem = 4096, }, {name = "STM32H7xx_FS", maxEp = 9, maxMem = 1280, }, {name = "STM32H7xx_HS", maxEp = 9, maxMem = 4096, }, }
local helpers = require "spec.02-integration.02-dao.helpers" local Factory = require "kong.dao.factory" local utils = require "kong.tools.utils" local api_tbl = { name = "mockbin", request_host = "mockbin.com", request_path = "/mockbin", strip_request_path = true, upstream_url = "https://mockbin.com" } local plugin_tbl = { name = "key-auth" } helpers.for_each_dao(function(kong_config) describe("Model (Constraints) with DB: #"..kong_config.database, function() local plugin_fixture, api_fixture local factory, apis, plugins setup(function() factory = Factory(kong_config) apis = factory.apis plugins = factory.plugins assert(factory:run_migrations()) factory:truncate_tables() end) before_each(function() plugin_fixture = utils.shallow_copy(plugin_tbl) local api, err = apis:insert(api_tbl) assert.falsy(err) api_fixture = api end) after_each(function() factory:truncate_tables() end) -- Check behavior just in case describe("plugins insert()", function() it("insert a valid plugin", function() plugin_fixture.api_id = api_fixture.id local plugin, err = plugins:insert(plugin_fixture) assert.falsy(err) assert.is_table(plugin) assert.equal(api_fixture.id, plugin.api_id) assert.same({hide_credentials = false, key_names = {"apikey"}}, plugin.config) end) it("insert a valid plugin bis", function() plugin_fixture.api_id = api_fixture.id plugin_fixture.config = {key_names = {"api_key"}} local plugin, err = plugins:insert(plugin_fixture) assert.falsy(err) assert.is_table(plugin) assert.equal(api_fixture.id, plugin.api_id) assert.same({hide_credentials = false, key_names = {"api_key"}}, plugin.config) end) describe("unique per API/Consumer", function() it("API/Plugin", function() plugin_fixture.api_id = api_fixture.id local plugin, err = plugins:insert(plugin_fixture) assert.falsy(err) assert.truthy(plugin) plugin, err = plugins:insert(plugin_fixture) assert.truthy(err) assert.falsy(plugin) assert.True(err.unique) assert.matches("Plugin configuration already exists", tostring(err), nil, true) end) it("API/Consumer/Plugin", function() local consumer, err = factory.consumers:insert { username = "bob" } assert.falsy(err) assert.truthy(consumer) local plugin_tbl = { name = "rate-limiting", api_id = api_fixture.id, consumer_id = consumer.id, config = {minute = 1} } local plugin, err = plugins:insert(plugin_tbl) assert.falsy(err) assert.truthy(plugin) assert.equal(consumer.id, plugin.consumer_id) plugin, err = plugins:insert(plugin_tbl) assert.truthy(err) assert.falsy(plugin) assert.True(err.unique) assert.matches("Plugin configuration already exists", tostring(err), nil, true) end) end) end) describe("FOREIGN constraints", function() it("not insert plugin if invalid API foreign key", function() plugin_fixture.api_id = utils.uuid() local plugin, err = plugins:insert(plugin_fixture) assert.falsy(plugin) assert.truthy(err) assert.True(err.foreign) assert.matches("api_id=does not exist with value '"..plugin_fixture.api_id.."'", tostring(err), nil, true) end) it("not insert plugin if invalid Consumer foreign key", function() local plugin_tbl = { name = "rate-limiting", api_id = api_fixture.id, consumer_id = utils.uuid(), config = {minute = 1} } local plugin, err = plugins:insert(plugin_tbl) assert.falsy(plugin) assert.truthy(err) assert.True(err.foreign) assert.matches("consumer_id=does not exist with value '"..plugin_tbl.consumer_id.."'", tostring(err), nil, true) end) it("does not update plugin if invalid foreign key", function() plugin_fixture.api_id = api_fixture.id local plugin, err = plugins:insert(plugin_fixture) assert.falsy(err) assert.truthy(plugin) local fake_api_id = utils.uuid() plugin.api_id = fake_api_id plugin, err = plugins:update(plugin, {id = plugin.id}) assert.falsy(plugin) assert.truthy(err) assert.True(err.foreign) assert.matches("api_id=does not exist with value '"..fake_api_id.."'", tostring(err), nil, true) end) end) describe("CASCADE delete", function() local api_fixture, consumer_fixture before_each(function() local err api_fixture, err = apis:insert { name = "to-delete", request_host = "to-delete.com", request_path = "/to-delete", upstream_url = "https://mockbin.com" } assert.falsy(err) consumer_fixture, err = factory.consumers:insert { username = "bob" } assert.falsy(err) end) after_each(function() factory:truncate_tables() end) it("delete", function() local plugin, err = plugins:insert { name = "key-auth", api_id = api_fixture.id } assert.falsy(err) local res, err = apis:delete(api_fixture) assert.falsy(err) assert.is_table(res) -- no more API local api, err = apis:find(api_fixture) assert.falsy(err) assert.falsy(api) -- no more plugin local plugin, err = plugins:find(plugin) assert.falsy(err) assert.falsy(plugin) end) it("delete bis", function() local plugin, err = plugins:insert { name = "rate-limiting", api_id = api_fixture.id, consumer_id = consumer_fixture.id, config = {minute = 1} } assert.falsy(err) local res, err = factory.consumers:delete(consumer_fixture) assert.falsy(err) assert.is_table(res) local consumer, err = factory.consumers:find(consumer_fixture) assert.falsy(err) assert.falsy(consumer) plugin, err = plugins:find(plugin) assert.falsy(err) assert.falsy(plugin) end) end) end) -- describe end) -- for each db
local writeq = {} local delq = {} local von = include("lib/von.lua") menup.von = von if not sql.TableExists("menup_redux") then print("Creating SQL table.") sql.Query("CREATE TABLE IF NOT EXISTS menup_redux ( key TEXT NOT NULL PRIMARY KEY, value TEXT );") end local function dbget(key, default) return delq[key] and nil or writeq[key] or sql.QueryValue("SELECT value FROM menup_redux WHERE key = " .. SQLStr(key)) or default end local function dbset(key, value) writeq[key] = value end local function dbdel(key) delq[key] = true end local function dblist(query) return sql.Query("SELECT * FROM menup_redux WHERE key LIKE " .. SQLStr(query) .. "") end local function process() if table.IsEmpty(writeq) and table.IsEmpty(delq) then return end sql.Begin() for k, v in pairs(writeq) do sql.Query("INSERT OR REPLACE INTO menup_redux (key, value) VALUES ( " .. SQLStr(k) .. ", " .. SQLStr(v) .. " )") end for k, _ in pairs(delq) do sql.Query("DELETE FROM menup_redux WHERE key = " .. SQLStr(k)) end sql.Commit() table.Empty(writeq) table.Empty(delq) end menup.config = {} menup.config.set = function(id, key, value) local data = util.JSONToTable(dbget("data_" .. id, [[{"config": "{}", "store": ""}]])) if isstring(data.config) then data.config = util.JSONToTable(data.config) end local old = data.config[key] hook.Run("ConfigChange", id, key, value, old) data.config[key] = value dbset("data_" .. id, util.TableToJSON(data, false)) end menup.config.get = function(id, key, value) local data = util.JSONToTable(dbget("data_" .. id, [[{"config": "{}", "store": ""}]])) if isstring(data.config) then data.config = util.JSONToTable(data.config) end if key == nil then return data.config elseif data.config[key] == nil then return value else return data.config[key] end end menup.store = {} menup.store.set = function(id, str) local data = util.JSONToTable(dbget("data_" .. id, [[{"config": "{}", "store": ""}]])) data.store = str dbset("data_" .. id, util.TableToJSON(data, false)) end menup.store.get = function(id, default) local data = util.JSONToTable(dbget("data_" .. id, [[{"config": "{}", "store": ""}]])) return data.store or default end menup.options = {} -- compatiblity layer for menup.config function menup.options.addOption(id, key, default) id = "legacy." .. id local val = menup.config.get(id, key, default) menup.plugins[id].config[key] = val menup.config.set(id, key, val) end function menup.options.getOption(id, key, default) return menup.config.get("legacy." .. id, key, default) end function menup.options.setOption(id, key, value) menup.config.set("legacy." .. id, key, value) end function menup.options.getTable() local res = dblist("data_legacy.%") if not res then return {} end local out = {} for _, v in ipairs(res) do out[string.sub(v.key, 13)] = util.JSONToTable(v.value).config end return out end function menup.include(path) return include("menu_plugins/" .. path) end menup.db = {} -- please dont use this in a plugin menup.db.get = dbget menup.db.set = dbset menup.db.del = dbdel menup.db.list = dblist timer.Create("menup_db", 1, 0, process)
local jwt = require "resty.jwt" local cjson = require "cjson" local basexx = require "basexx" local secret = os.getenv("JWT_SECRET") assert(secret ~= nil, "Environment variable JWT_SECRET not set") if os.getenv("JWT_SECRET_IS_BASE64_ENCODED") == 'true' then -- convert from URL-safe Base64 to Base64 local r = #secret % 4 if r == 2 then secret = secret .. "==" elseif r == 3 then secret = secret .. "=" end secret = string.gsub(secret, "-", "+") secret = string.gsub(secret, "_", "/") -- convert from Base64 to UTF-8 string secret = basexx.from_base64(secret) end local M = {} function M.auth(claim_specs) -- require Authorization request header local auth_header = ngx.var.http_Authorization if auth_header == nil then ngx.log(ngx.WARN, "No Authorization header") ngx.exit(ngx.HTTP_UNAUTHORIZED) end ngx.log(ngx.INFO, "Authorization: " .. auth_header) -- require Bearer token local _, _, token = string.find(auth_header, "Bearer%s+(.+)") if token == nil then ngx.log(ngx.WARN, "Missing token") ngx.exit(ngx.HTTP_UNAUTHORIZED) end ngx.log(ngx.INFO, "Token: " .. token) -- require valid JWT local jwt_obj = jwt:verify(secret, token, 0) if jwt_obj.verified == false then ngx.log(ngx.WARN, "Invalid token: ".. jwt_obj.reason) ngx.exit(ngx.HTTP_UNAUTHORIZED) end ngx.log(ngx.INFO, "JWT: " .. cjson.encode(jwt_obj)) -- optionally require specific claims if claim_specs ~= nil then --TODO: test -- make sure they passed a Table if type(claim_specs) ~= 'table' then ngx.log(ngx.STDERR, "Configuration error: claim_specs arg must be a table") ngx.exit(ngx.HTTP_INTERNAL_SERVER_ERROR) end -- process each claim local blocking_claim = "" for claim, spec in pairs(claim_specs) do -- make sure token actually contains the claim local claim_value = jwt_obj.payload[claim] if claim_value == nil then blocking_claim = claim .. " (missing)" break end local spec_actions = { -- claim spec is a string (pattern) ["string"] = function (pattern, val) return string.match(val, pattern) ~= nil end, -- claim spec is a predicate function ["function"] = function (func, val) -- convert truthy to true/false if func(val) then return true else return false end end } local spec_action = spec_actions[type(spec)] -- make sure claim spec is a supported type -- TODO: test if spec_action == nil then ngx.log(ngx.STDERR, "Configuration error: claim_specs arg claim '" .. claim .. "' must be a string or a table") ngx.exit(ngx.HTTP_INTERNAL_SERVER_ERROR) end -- make sure token claim value satisfies the claim spec if not spec_action(spec, claim_value) then blocking_claim = claim break end end if blocking_claim ~= "" then ngx.log(ngx.WARN, "User did not satisfy claim: ".. blocking_claim) ngx.exit(ngx.HTTP_UNAUTHORIZED) end end -- write the X-Auth-UserId header ngx.header["X-Auth-UserId"] = jwt_obj.payload.sub end function escape (s) return string.gsub(s, '[.*+?^$()[%%-]', "%%%0") end function pattern_matcher(v, pattern) return string.match(v, pattern) end function match_roles(table, pattern) for _, value in pairs(table) do if pattern == pattern_matcher(value, '^' .. escape(pattern) .. '%f[%z.]') then return true end return false end end function M.table_contains_role(table, role, regex) for _, value in pairs(table) do -- value is from JWT token -- item is u.meta -- USAGE: -- -- jwt.table_contains_role({roles: 'u.meta.admin.system'}, '^u%.meta%f[\0.]') if role == print(string.match(value, regex)) then return true end end return false end function M.table_contains(table, item) for _, value in pairs(table) do if value == item then return true end end return false end return M
--- -- @module Queue -- @author Quenty local Queue = {} Queue.ClassName = "Queue" Queue.__index = Queue function Queue.new() return setmetatable({ _first = 0; _last = -1; }, Queue) end function Queue:PushLeft(value) self._first = self._first - 1 self[self._first] = value end function Queue:PushRight(value) self._last = self._last + 1 self[self._last] = value end function Queue:PopLeft() if self._first > self._last then error("Queue is empty") end local value = self[self._first] self[self._first] = nil self._first = self._first + 1 return value end function Queue:PopRight() if self._first > self._last then error("Queue is empty") end local value = self[self._last] self[self._last] = nil self._last = self._last - 1 return value end function Queue:IsEmpty() return self._first > self._last end return Queue
if (getMilestone(MS_KILLED_GOLEMS)) then music = "Flowey.ogg" end function start() add_downward_light(41, 28, 8, 32, 48, 255, 255, 150, 60) add_downward_light(73, 28, 8, 32, 48, 255, 255, 150, 60) add_downward_light(105, 28, 8, 32, 48, 255, 255, 150, 60) add_downward_light(233, 28, 8, 32, 48, 255, 255, 150, 60) add_downward_light(265, 28, 8, 32, 48, 255, 255, 150, 60) add_downward_light(297, 28, 8, 32, 48, 255, 255, 150, 60) down = Portal:new{x=9, y=3} if (not getMilestone(MS_BEAT_TODE)) then fat_old_guy = Object:new{x=2, y=9, anim_set="fat_old_guy", person=true} setObjectDirection(fat_old_guy.id, DIRECTION_EAST) babies_mother = Object:new{x=4, y=8, anim_set="babies_mother", person=true} setObjectDirection(babies_mother.id, DIRECTION_SOUTH) toddler = Object:new{x=4, y=6, anim_set="toddler", person=true, move_type=MOVE_WANDER} Kamwerere = Object:new{x=3, y=6, anim_set="Kamwerere", person=true, move_type=MOVE_FOLLOW, follow=toddler} Trent = Object:new{x=14, y=3, anim_set="Trent", person=true} setObjectDirection(Trent.id, DIRECTION_SOUTH) Mom = Object:new{x=18, y=9, anim_set="Mom", person=true} setObjectDirection(Mom.id, DIRECTION_WEST) Darryl = Object:new{x=14, y=9, anim_set="Darryl", person=true} setObjectDirection(Darryl.id, DIRECTION_EAST) end end function stop() end function update(step) down:update() if (down.go_time) then change_areas("inn1", 9, 3, DIRECTION_EAST) end toddler:move(step) Kamwerere:move(step) end function activate(activator, activated) if (not getMilestone(MS_BEAT_TODE)) then if (activated == fat_old_guy.id) then local _d = getObjectDirection(fat_old_guy.id) setObjectDirection(fat_old_guy.id, player_dir(fat_old_guy)) doDialogue("I used to be a warrior when I was young, but I can't fight anymore...\nI am blessed with a son, who may continue with my legacy.\n", true) setObjectDirection(fat_old_guy.id, _d) elseif (activated == babies_mother.id) then local _d = getObjectDirection(babies_mother.id) setObjectDirection(babies_mother.id, player_dir(babies_mother)) doDialogue("We led such a peaceful life until recently... The peace will return, one day.\n", true) setObjectDirection(babies_mother.id, _d) elseif (activated == Kamwerere.id) then doDialogue("I must watch over my brother, oh my!\n", true) elseif (activated == toddler.id) then local _d = getObjectDirection(toddler.id) setObjectDirection(toddler.id, player_dir(toddler)) doDialogue("Goo goo ga ga...\n", true) setObjectDirection(toddler.id, _d) elseif (activated == Trent.id) then local _d = getObjectDirection(Trent.id) setObjectDirection(Trent.id, player_dir(Trent)) doDialogue("Trying to sleep here...\n", true) setObjectDirection(Trent.id, _d) elseif (activated == Mom.id) then local _d = getObjectDirection(Mom.id) setObjectDirection(Mom.id, player_dir(Mom)) doDialogue("Hey, what 'ya doing?\n", true) setObjectDirection(Mom.id, _d) elseif (activated == Darryl.id) then local _d = getObjectDirection(Darryl.id) setObjectDirection(Darryl.id, player_dir(Darryl)) doDialogue("I need to get back to work, but it's so dangerous out there...\nThank goodness for you guys, this one safe place could have easily fallen.\n", true) setObjectDirection(Darryl.id, _d) end end end function collide(id1, id2) end
local ErrorBase = require "SelenScript.error_base" local Errors = {} Errors.INTERNAL = ErrorBase.generate("INTERNAL", "Internal Error %u@%u: %s") Errors.CONTINUE_MISSING_LOOP = ErrorBase.generate("CONTINUE_MISSING_LOOP", "Syntax %u@%u: `continue` is missing loop to continue.") return Errors
local version = 1.0 -- Prefix: sm.color. -- Commands: --match(rgba) - Matches the paint gun colors to numbers (1-40) --toRGB(hsv) - Turns HSV to RGB --toHSV(rgba) - Turns RGB to HSV -- Improved: --color:match() --color:toHSV() --[[ Copyright (c) 2019 Scrap Essentials Team ]]-- -- Version check if sm.__SE_Version.color and version <= sm.__SE_Version.color then return end --Matches any color with a group sm.color.match = function(rgba) assert(type(rgba) == "Color", "match: argument 1, Color expected! got: "..type(rgba)) local match = { ["eeeeeeff"] = 1, ["f5f071ff"] = 2, ["cbf66fff"] = 3, ["68ff88ff"] = 4, ["7eededff"] = 5, ["4c6fe3ff"] = 6, ["ae79f0ff"] = 7, ["ee7bf0ff"] = 8, ["f06767ff"] = 9, ["eeaf5cff"] = 10, ["7f7f7fff"] = 11, ["e2db13ff"] = 12, ["a0ea00ff"] = 13, ["19e753ff"] = 14, ["2ce6e6ff"] = 15, ["0a3ee2ff"] = 16, ["7514edff"] = 17, ["cf11d2ff"] = 18, ["d02525ff"] = 19, ["df7f00ff"] = 20, ["4a4a4aff"] = 21, ["817c00ff"] = 22, ["577d07ff"] = 23, ["0e8031ff"] = 24, ["118787ff"] = 25, ["0f2e91ff"] = 26, ["500aa6ff"] = 27, ["720a74ff"] = 28, ["7c0000ff"] = 29, ["673b00ff"] = 30, ["222222ff"] = 31, ["323000ff"] = 32, ["375000ff"] = 33, ["064023ff"] = 34, ["0a4444ff"] = 35, ["0a1d5aff"] = 36, ["35086cff"] = 37, ["520653ff"] = 38, ["560202ff"] = 39, ["472800ff"] = 40 } return match[tostring(rgba)] end --RGB to HSV converter function sm.color.toHSV( rgba ) assert(type(rgba) == "Color", "toHSV: argument 1, Color expected! got: "..type(rgba)) local __HSV_Cases = { ["r"] = function( rgb, delta ) return 60 * (((rgb.g - rgb.b) / delta) % 6) end, ["g"] = function( rgb, delta ) return 60 * (((rgb.b - rgb.r) / delta) + 2) end, ["b"] = function( rgb, delta ) return 60 * (((rgb.r - rgb.g) / delta) + 4) end } local rgb = { r = rgba.r, g = rgba.g, b = rgba.b } local max = math.maxIndex(rgb) local min = math.minIndex(rgb) local delta = rgb[max] - rgb[min] local hsv = { h, s, v } --Hue if(delta == 0) then hsv.h = 0 else hsv.h = __HSV_Cases[max](rgb, delta) end --Saturation if(rgb[max] == 0) then hsv.s = 0 else hsv.s = (delta / rgb[max]) end --Value hsv.v = rgb[max] return hsv end --HSV to RGB converter function sm.color.toRGB( hsv ) assert(type(hsv) == "table" and hsv.h ~= nil and hsv.s ~= nil and hsv.v ~= nil, "toRGB: argument 1, HSV expected! got: "..type(hsv)) local __RGB_Cases = { [0] = function( C, X ) return { r = C, g = X, b = 0 } end, [1] = function( C, X ) return { r = X, g = C, b = 0 } end, [2] = function( C, X ) return { r = 0, g = C, b = X } end, [3] = function( C, X ) return { r = 0, g = X, b = C } end, [4] = function( C, X ) return { r = X, g = 0, b = C } end, [5] = function( C, X ) return { r = C, g = 0, b = X } end } local C = hsv.v * hsv.s local X = C * ( 1 - math.abs( ((hsv.h / 60) % 2) - 1 ) ) local M = hsv.v - C local H = math.floor( hsv.h / 60 ) % 6 local rgb = __RGB_Cases[H]( C, X ) return sm.color.new(rgb.r + M, rgb.g + M, rgb.b + M) end sm.color.new(0,0,0).match = sm.color.match sm.color.new(0,0,0).toHSV = sm.color.toHSV sm.__SE_Version.color = version print("'color' library version "..tostring(version).." successfully loaded.")
resource_manifest_version "05cfa83c-a124-4cfa-a768-c24a5811d8f9" description 'AnimHotKey' client_scripts { "config.lua", "warmenu.lua", "client.lua" }
object_tangible_food_spice_spice_muon_gold_01 = object_tangible_food_spice_shared_spice_muon_gold_01:new { } ObjectTemplates:addTemplate(object_tangible_food_spice_spice_muon_gold_01, "object/tangible/food/spice/spice_muon_gold_01.iff")
local AceLocale = LibStub:GetLibrary("AceLocale-3.0") local L = AceLocale:NewLocale("RaidSummon", "frFR", true, true) if not L then return end L["RaidSummon"] = "RaidSummon" L["Language"] = "French" L["AddonEnabled"] = function(X,Y) return '|cff9482c9RaidSummon:|r version ' .. X .. ' by ' .. Y .. ' chargé' end L["AddonDisabled"] = "RaidSummon désactivé" L["FrameHeader"] = function(X) return 'RaidSummon v' .. X end L["Lockdown"] = "|cff9482c9RaidSummon:|r Vous êtes en combat, action abandonnée" L["noRaid"] = "|cff9482c9RaidSummon:|r Aucun raid trouvé, vous n'êtes pas en Raid" L["MemberRemoved"] = function(X,Y) return '|cff9482c9RaidSummon:|r Suppression du joueur' .. X .. ' de la liste des invocations , comme demandé par ' .. Y end L["MemberAdded"] = function(X,Y) return '|cff9482c9RaidSummon:|r Adding player ' .. X .. ' de la liste des invocations par ' .. Y end L["AddAllMessage"] = "|cff9482c9RaidSummon:|r Ajout de tous les joueurs" --Options L["OptionZoneName"] = "Zone" L["OptionZoneDesc"] = "activer zone (ex Orgrimmar) et subzone (ex Valley of Wisdom) dans les mantions d'annonce." L["OptionWhisperName"] = "Chuchotement /w" L["OptionWhisperDesc"] = "Activez l'avertissment en /w sur la cible invoquée" L["OptionHelpName"] = "Aide" L["OptionHelpDesc"] = "Affiche la liste des commandes et options prises en charge." L["OptionConfigName"] = "Configuration" L["OptionConfigDesc"] = "Ouvrir le menue de configuration." L["OptionGroupOptionsName"] = "Options" L["OptionGroupCommandsName"] = "Commandes" L["OptionHeaderProfileName"] = "Ace3 profiles" L["OptionListName"] = "Liste" L["OptionListDesc"] = "affiche la liste des joueurs qui ont demandé une invocation." L["OptionClearName"] = "Efface" L["OptionClearDesc"] = "Efface la liste des invocations." L["OptionToggleName"] = "Basculer" L["OptionToggleDesc"] = "Bascule la visibilité du cadre d'invocation." L["OptionAddName"] = "Ajouter un Joueur" L["OptionAddDesc"] = "Ajoute un joueur à la liste d'invocation (sensible à la casse)." L["OptionRemoveName"] = "Enlever Joueur" L["OptionRemoveDesc"] = "Enlever un joueur à la liste d'invocation (sensible à la casse)." L["OptionAddAllName"] = "Tout ajouter" L["OptionAddAllDesc"] = "Ajoutez tous les joueurs ne se trouvant pas dans la zone actuelle au cadre d'invocation." L["OptionGroupKeywordsName"] = "Mots clés pour les invocations" L["OptionKWListName"] = "Liste des mots clés" L["OptionKWListDesc"] = "Liste des mots clés." L["OptionKWAddName"] = "Ajout Mot clé" L["OptionKWAddDesc"] = "Ajoute un mot-clé pour les invocations. " L["OptionKWRemoveName"] = "Enlève un mot clés" L["OptionKWRemoveDesc"] = "Supprime un mot clé d'invocation." L["OptionKWDescription"] = [[|cffff0000Les mots clés sont des expressions régulières, à utiliser avec précaution!|r Les mots clés sont mis en correspondance via le chat say / yell / raid / party / whisper. Seul l'expéditeur du message de discussion sera ajouté à la liste d'invocation. Pour réinitialiser les mots clés, vous pouvez utiliser le gestionnaire de profils Ace3 et réinitialiser votre profil. Basic examples: |cff9482c9^tp|r - Will match "summon" as the first word of a chat message |cff9482c9tp|r - Will match "summon" à n'importe quelle position d'un message de discussion, même à l'intérieur de mots comme |cff9482c9^tp$|r - correspondra que si un seul mot "tp" est reçu ]] --Slash Command Options L["OptionWhisperEnabled"] = "|cff9482c9RaidSummon:|r Option whisper |cff00ff00enabled|r" L["OptionWhisperDisabled"] = "|cff9482c9RaidSummon:|r Option whisper |cffff0000disabled|r" L["OptionZoneEnabled"] = "|cff9482c9RaidSummon:|r Option zone |cff00ff00enabled|r" L["OptionZoneDisabled"] = "|cff9482c9RaidSummon:|r Option zone |cffff0000disabled|r" L["OptionHelpPrint"] = [[ |cff9482c9RaidSummon usage:|r /rs or /raidsummon { clear | config | help | list | add | addall | remove | toggle | whisper | zone | kwlist | kwadd | kwremove } - | cff9482c9clear | r: efface la liste d'invocation. - | cff9482c9config | r: ouvre le menu de configuration. - | cff9482c9help | r: affiche une liste des options prises en charge. - | cff9482c9list | r: affiche une liste des joueurs qui ont demandé une invocation. - | cff9482c9add | r: ajoute un lecteur au cadre d'invocation (sensible à la casse). - | cff9482c9addall | r: ajoute tous les joueurs ne se trouvant pas dans la zone actuelle au cadre d'invocation. - | cff9482c9remove | r: supprime un joueur du cadre d'invocation (sensible à la casse). - | cff9482c9toggle | r: bascule la visibilité de la trame d'invocation. - | cff9482c9whisper | r: permet de chuchoter à la cible invoquée. - | cff9482c9zone | r: active la mention de zone dans les annonces. - | cff9482c9kwlist | r: répertorie tous les mots clés d'invocation actifs. - | cff9482c9kwadd | r: ajoute un mot-clé d'invocation. - | cff9482c9kwremove | r: supprime un mot-clé d'invocation. Vous pouvez faire glisser le cadre avec le bouton SHIFT + GAUCHE de la souris. ]] L["OptionListEmpty"] = "|cff9482c9RaidSummon:|r La liste est vide" L["OptionList"] = "|cff9482c9RaidSummon:|r Membres du raid qui ont demandé une assignation:" L["OptionClear"] = "|cff9482c9RaidSummon:|r Effacé la liste d'invocation" --Summon Announce --W=Whisper/R=Raid Z=Zone S=Subzone T=Target Player L["SummonAnnounceRZS"] = function(T,Z,S) return 'RaidSummon: Invocation ' .. T .. ' à ' .. Z .. ' - ' .. S end L["SummonAnnounceWZS"] = function(Z,S) return 'RaidSummon: Invocation à ' .. Z .. ' - ' .. S end L["SummonAnnounceRZ"] = function(T,Z,S) return 'RaidSummon: Invocation ' .. T .. ' à ' .. Z end L["SummonAnnounceWZ"] = function(Z,S) return 'RaidSummon: Invocation en cours à ' .. Z end L["SummonAnnounceR"] = function(T) return 'RaidSummon: Invocation ' .. T end L["SummonAnnounceW"] = "RaidSummon: Invocation en cours" L["SummonAnnounceError"] = "|cff9482c9RaidSummon:|r Announce error" L["NotEnoughMana"] = "|cff9482c9RaidSummon:|r Pas assez de Mana!" L["TargetMissmatch"] = function(X,Y) return '|cff9482c9RaidSummon:|r Invocation Annulée. Votre cible ' .. X .. ' ne correspond pas au nom sur lequel vous avez cliqué ' .. Y end L["OptionKWList"] = "|cff9482c9RaidSummon:|r Invocation Mots clés liste:" L["OptionKWAddDuplicate"] = function(V) return '|cff9482c9RaidSummon:|r Keyword dupliqué: ' .. V end L["OptionKWAddAdded"] = function(V) return '|cff9482c9RaidSummon:|r Keyword ajouté ' .. V end L["OptionKWRemoveRemoved"] = function(V) return '|cff9482c9RaidSummon:|r Keyword supprimé: ' .. V end L["OptionKWRemoveNF"] = function(V) return '|cff9482c9RaidSummon:|r Keyword non trouvé: ' .. V end
function split_namespace (identifier) local ns = {} return identifier:gsub('([%w_]*)::', function (s) if s then ns[#ns + 1] = s end return '' end), ns end
require "babel" lang_zh=true -- 显示中文为真,否则假 function love.load() --初始化babel babel.init({ locale = "zh-CN",--这里的对应语言文件名,不要".lua"后缀 locales_folders = { "lang" --设置语言文件的存放的位置 } }) --设置字体,显示中文还是需要字体的, --这里没放字体,请到网上找YaHeiConsolas字体,或使用其它支持中文的字体 cnfont=love.graphics.newFont("YaHeiConsolas.ttf",18) love.graphics.setFont(cnfont) end function love.update(dt) end function love.draw() --“_()”实际是babel.translate函数的别名 love.graphics.print( _( "Hello world" ), 10, 10 ) --这句会把源字符串翻译为local对应的字符串 love.graphics.print( _( "My name is %name%", { name = "半山" } ), 10, 30 ) end function love.keypressed(key, unicode) --动态语言切换 if key=="c" then lang_zh= not lang_zh end if not lang_zh then babel.switchLocale("en-US") else babel.switchLocale("zh-CN") end end
function copy(e) rule { ins = e.ins, outs = e.outs, cmd = "cp @1 &1" } end
local AGENT = "NodeMCU 0.9.5" local function configWIFI(name,pwd) local wifi = require"wifi" wifi.setmode(wifi.STATION) wifi.sta.config(name,pwd) return wifi.sta.getip() end --open telnet/http to debug local function openServer(port,timeout,contentHandle) local net = require"net" local http = require"http" if type(port)~='number' or type(timeout)~='number' then return nil end local s=net.createServer(net.TCP,timeout) s:listen(port,function(c) node.output(function(str) if(c~=nil) then c:send('\r'..str) end end, 1) local content = string.find(type(receive),'function') and receive(c) or "Welcom to "..AGENT c:send(http.response(content)) content = nil c:on("receive",function(c,l) node.input(l) end) c:on("disconnection",function(c) node.output(nil) end) end) return s end --get domain IP by DNS local function dns(domain,receive) local sk = net.createConnection(net.TCP, 0) sk:dns(domain, function(skconn, ip) sk:close() sk = nil if string.find(type(receive),'function') then receive(pl) else print(pl) end end) return sk end return { AGENT = AGENT, configWIFI = configWIFI, openServer = openServer, dns = dns }
function Drifter:GetIsCamouflaged() return self.camouflaged and self.hasCamouflage end if Server then Drifter.kRegenHealRate = 0.03 local oldOnUpdate = Drifter.OnUpdate function Drifter:OnUpdate(deltaTime) oldOnUpdate(self, deltaTime) self.hasCamouflage = GetHasTech(self, kTechId.ShadeHive) self.hasCelerity = GetHasTech(self, kTechId.ShiftHive) self.hasRegeneration = GetHasTech(self, kTechId.CragHive) if self.hasRegeneration then if self:GetIsHealable() and ( not self.timeLastAlienAutoHeal or self.timeLastAlienAutoHeal + kAlienRegenerationTime <= Shared.GetTime() ) then self:AddHealth(self.kRegenHealRate * self:GetMaxHealth()) self.timeLastAlienAutoHeal = Shared.GetTime() end end end end Drifter.kCelerityMoveSpeed = 13 Drifter.kMoveSpeed = 11 function Drifter:ModifyMaxSpeed(maxSpeedTable) if self.hasCelerity then maxSpeedTable.maxSpeed = maxSpeedTable.maxSpeed + 2 end end
local M = {} function M.add_cmp_source(source, priority) local cmp = require('cmp') local config = cmp.get_config() table.insert(config.sources, { name = source, priority = priority }) cmp.setup(config) end return M
object_tangible_furniture_all_frn_all_decorative_lg_s2 = object_tangible_furniture_all_shared_frn_all_decorative_lg_s2:new { } ObjectTemplates:addTemplate(object_tangible_furniture_all_frn_all_decorative_lg_s2, "object/tangible/furniture/all/frn_all_decorative_lg_s2.iff")
-- Enable this to do live debugging in ZeroBrane Studio -- local ZBS = "/Applications/ZeroBraneStudio.app/Contents/ZeroBraneStudio" -- package.path = package.path .. ";" .. ZBS .. "/lualibs/?/?.lua;" .. ZBS .. "/lualibs/?.lua" -- package.cpath = package.cpath .. ";" .. ZBS .. "/bin/?.dylib;" .. ZBS .. "/bin/clibs53/?.dylib" -- require("mobdebug").start() hyper = {"⌘", "⌥", "⌃", "⇧"} function reloadCommand() hs.console.clearConsole() hs.openConsole(true) print("Reloading configuration...") hs.reload() end -- Reload Hotkey hs.hotkey.bind( hyper, "r", "Reload Hammerspoon", reloadCommand ) -- hs.logger.defaultLogLevel = "info" -- MultiCountryMenubarClock -- hs.loadSpoon("MultiCountryMenubarClock") -- spoon.MultiCountryMenubarClock:start() hs.loadSpoon("Bretzel") local bretzelConfig = { Desktop = { archiveAge = (86400 * 12), sortRoot = false, tagsAndAge = { Orange = (86400 * 4), Rouge = (86400 * 8) }, path = os.getenv("HOME") .. "/Desktop" }, Downloads = { archiveAge = (86400 * 10), sortRoot = true, tagsAndAge = { Vert = 86400, Orange = 86400 }, path = os.getenv("HOME") .. "/Downloads" } } for _, conf in pairs(bretzelConfig) do spoon.Bretzel:boot(conf["path"], conf["tagsAndAge"], conf["archiveAge"], conf["sortRoot"]) end function show_notification(subtitle, infotext) local notification = hs.notify.new( nil, { title = "Hammerspoon", subtitle = subtitle, informativeText = infotext, autoWithdraw = true, hasActionButton = false } ) notification:send() hs.timer.delayed.new( 5, function() notification:withdraw() end ) end local toggleAudioOutput = require("audio_output_toggle") function toggleInputVolume() local currentInput = hs.audiodevice.defaultInputDevice() local v = currentInput:inputVolume() if v < 50 then currentInput:setInputVolume(66) else currentInput:setInputVolume(0) end end -- Plays an array of keystroke events. local function playKb(kbd) for _, v in pairs(kbd) do if #v == 2 then hs.eventtap.keyStroke(v[1], v[2], 10000) elseif #v == 1 then hs.eventtap.keyStrokes(v[1]) end end end -- https://github.com/asmagill/hammerspoon_asm local hasSpaces, spaces = pcall(require, "hs.spaces") -- Bring focus to the specified app, maybe launch it. -- Maybe bring up an alternate and focus or launch it. local function toggleApp(appinfo) local app = hs.appfinder.appFromName(appinfo.name) if not app then -- App isn't running. if appinfo.launch then if (appinfo.name == "iTerm2") then -- naming is weird here. hs.application.launchOrFocus("/Applications/iTerm.app") else hs.application.launchOrFocus(appinfo.name) end if appinfo.rect ~= nil or appinfo.kbd ~= nil then -- allow time app to start hs.timer.usleep(2000000) end if appinfo.rect ~= nil then local win = hs.window.focusedWindow() if win ~= nil then win:setFrame(appinfo.rect) end end if appinfo.kbd ~= nil then playKb(appinfo.kbd) end end return end -- App is running, let's focus it. local mainwin = app:mainWindow() if hasSpaces then if appinfo.moveToCurrentSpace then spaces.moveWindowToSpace(mainwin, spaces.focusedSpace()) end else print("unable to move window to current space: no Spaces extension available") end if mainwin then if mainwin ~= hs.window.focusedWindow() then mainwin:application():activate(true) mainwin:application():unhide() mainwin:frontmostWindow():unminimize() mainwin:focus() else mainwin:application():hide() end end end function applicationWatcher(appName, eventType, appObject) if (eventType == hs.application.watcher.activated) then if streamDeck then icon = hs.image.imageFromAppBundle(appObject:bundleID()) print(appObject:bundleID()) streamDeck:setButtonImage(6, icon) end end end appWatcher = hs.application.watcher.new(applicationWatcher) appWatcher:start() function changeVolume(diff) return function() local current = hs.audiodevice.defaultOutputDevice():volume() local new = math.min(100, math.max(0, math.floor(current + diff))) if new > 0 then hs.audiodevice.defaultOutputDevice():setMuted(false) end hs.alert.closeAll(0.0) hs.alert.show("Volume " .. new .. "%", {}, 0.5) hs.audiodevice.defaultOutputDevice():setVolume(new) end end hs.hotkey.bind(hyper, "[", nil, function() if hs.spotify.isPlaying() then hs.spotify.volumeDown() else changeVolume(-3) end end) hs.hotkey.bind(hyper, "]", nil, function() if hs.spotify.isPlaying() then hs.spotify.volumeUp() else changeVolume(3) end end) function consoleCommand() hs.toggleConsole() end --- Bind keys hs.hotkey.bind(hyper, "return", "Toggle Audio Output", toggleAudioOutput) hs.hotkey.bind( hyper, "c", "Toggle Console", consoleCommand ) hs.hotkey.bind( hyper, "v", "Edit Configuration", function() hs.execute("subl ~/.hammerspoon", true) end ) hs.hotkey.bind( hyper, "a", nil, function() toggleApp({name = "Slack", launch = true, kbd = nil, rect = nil}) end ) hs.hotkey.bind( hyper, "s", "Spotify", function() toggleApp({name = "Spotify", launch = true, kbd = nil, rect = nil}) end ) hs.hotkey.bind( hyper, "d", "Drafts", function() toggleApp({name = "Drafts", launch = true, kbd = nil, rect = nil, moveToCurrentSpace= true}) end ) hs.hotkey.bind( hyper, "q", "Telegram", function() toggleApp({name = "Telegram", launch = true, kbd = nil, rect = nil}) end ) hs.hotkey.bind( hyper, "w", "Keybase", function() toggleApp({name = "Keybase", launch = true, kbd = nil, rect = nil}) end ) hs.hotkey.bind( hyper, "m", "Coaster", function() toggleApp({name = "Coaster", launch = true, kbd = nil, rect = nil, moveToCurrentSpace= true}) end ) function toggleZoomMuteCommand() hs.osascript.applescript([[ if application "zoom.us" is running then tell application "System Events" to tell process "zoom.us" if menu item "Unmute Audio" of menu 1 of menu bar item "Meeting" of menu bar 1 exists then click menu item "Unmute Audio" of menu 1 of menu bar item "Meeting" of menu bar 1 else if menu item "Mute Audio" of menu 1 of menu bar item "Meeting" of menu bar 1 exists then click menu item "Mute Audio" of menu 1 of menu bar item "Meeting" of menu bar 1 end if end if end tell end if ]] ) end hs.hotkey.bind( hyper, "z", nil, toggleZoomMuteCommand ) local c = require("hs.canvas") function iconSized(text, size) local a = c.new {x = 0, y = 0, w = 80, h = 80} local delta = (80 - size) / 2 a[1] = { frame = {h = size, w = size, x = delta, y = delta}, text = hs.styledtext.new( text, { font = {name = ".AppleSystemUIFont", size = size}, color = hs.drawing.color.colorsFor("Apple")["White"], paragraphStyle = {alignment = "center"} } ), type = "text" } return a:imageFromCanvas() end function iconForDeck(text) return iconSized(text, 76) end function clickedIconForDeck(text) return iconSized(text, 60) end function streamButton(icons, command, autoAdvanceIcon) local b = {} b.icons = icons b.current = 1 b.command = command b.autoAdvanceIcon = autoAdvanceIcon function b:icon() return self.icons[self.current] end function b:clickedIcon() if self.clickedIcons then return self.clickedIcons[self.current] else return self:icon() end end function b:withAutoAdvanceIcon() self.autoAdvanceIcon = true return self end function b:withClickedIcons(i) self.clickedIcons = i return self end function b:pressed () if self.command then self.command(self) if self.autoAdvanceIcon then self.current = self.current + 1 if self.current > #self.icons then self.current = 1 end end end end return b end function isOn(what) output, status, t, rc = hs.execute("~pierre.baillet/bin/hue_get_all_groups FBXd8sQkm7c4fop3MxmEt1bqlZsT-PhT1nQCgZJu") local on = false if rc == 0 then for line in output:gmatch("([^\n]*)\n?") do if string.find(line, what) and string.find(line, " on ") then on = true end end else print("Failed calling hue controlling command:") print(output) print(status) print(t) print(rc) end return on end function lightsCommand(self) local on = isOn("Ordi") if on then output, status, t, rc = hs.execute("~pierre.baillet/bin/hue_set_group_state FBXd8sQkm7c4fop3MxmEt1bqlZsT-PhT1nQCgZJu 5 off") self.current = 1 else output, status, t, rc = hs.execute("~pierre.baillet/bin/hue_set_scene FBXd8sQkm7c4fop3MxmEt1bqlZsT-PhT1nQCgZJu OOhyOyaSQp2S77d") self.current = 2 end end local lightButton = streamButton({"🛋️", "💡"}, lightsCommand) local centerButton = streamButton({"🅲", "🅒"}, function () hs.window.focusedWindow():centerOnScreen(nil, true) end): withAutoAdvanceIcon(): withClickedIcons({"ⓒ", "🄲"}) if not isOn("Ordi") then lightButton.current = 2 end local deckConf = { lightButton, centerButton, streamButton({"♻️"}, reloadCommand), streamButton({"📜"}, consoleCommand), streamButton({"🔇"}, toggleZoomMuteCommand) } hs.streamdeck.init(function(connected, device) print("received streamdeck plugin event ".. device:serialNumber()) device:reset() for a = 1,6 do if #deckConf < a then print("we don't have info for button ".. a) else local dc = deckConf[a] device:setButtonImage(a, iconForDeck(dc:icon())) end end device:buttonCallback( function (userData, button, buttonPressed) dc = deckConf[button] if buttonPressed then device:setButtonImage(button, clickedIconForDeck(dc:clickedIcon())) dc:pressed() else device:setButtonImage(button, iconForDeck(dc:icon())) end end) end) -- Unsplash local status, secret = pcall(require, "secret") if(status) then hs.loadSpoon("Unsplash") spoon.Unsplash.logger.setLogLevel("debug") spoon.Unsplash:start(secret.UNSPLASH_CLIENT_ID, "/Users/pierrebaillet/.hammerspoon/wallpaper") else print("UNSPLASH secret is missing, not starting...") end -- MiroWindowsManager hs.loadSpoon("MiroWindowsManager") spoon.MiroWindowsManager:bindHotkeys( { up = {hyper, "up"}, down = {hyper, "down"}, right = {hyper, "right"}, left = {hyper, "left"}, fullscreen = {hyper, "f"}, } ) -- extra feature for the WM hs.hotkey.bind(hyper, "pagedown", "Center Window", function () hs.window.focusedWindow():centerOnScreen(nil, true) end) -- Emojis hs.loadSpoon("Emojis") spoon.Emojis:bindHotkeys( { toggle = {hyper, "e"} } ) -- hs.loadSpoon("URLDispatcher") u = spoon.URLDispatcher u.logger.setLogLevel("debug") u.url_patterns = { -- { "https?://github.com", "org.mozilla.firefox" } -- ,{ "https://www.youtube.com", "com.apple.Safari"} -- ,{ "https://youtube.com", "com.apple.Safari"} -- { "https?://trello.com","com.fluidapp.FluidApp2.Trello" } -- ,{ "https://datadoghq.atlassian.net", "com.brave.Browser"} } u.default_handler = "org.mozilla.firefox" u:start() hs.loadSpoon("AfterDark"):start({showMenu = true}) hs.hotkey.showHotkeys(hyper, "h") print("Reload Completed") hs.closeConsole() show_notification("Configuration", "Successfully Loaded!") hs.dockicon.hide()
--[[ /////// ////////////////// /////// PROJECT: MTA iLife - German Fun Reallife Gamemode /////// VERSION: 1.7.2 /////// DEVELOPERS: See DEVELOPERS.md in the top folder /////// LICENSE: See LICENSE.md in the top folder /////// ///////////////// ]] -- -- Created by IntelliJ IDEA. -- User: Noneatme -- Date: 26.01.2015 -- Time: 16:07 -- To change this template use File | Settings | File Templates. -- cHelicopterCam = {}; --[[ ]] -- /////////////////////////////// -- ///// New ////// -- ///// Returns: Object ////// -- /////////////////////////////// function cHelicopterCam:new(...) local obj = setmetatable({}, {__index = self}); if obj.constructor then obj:constructor(...); end return obj; end -- /////////////////////////////// -- ///// Enable ////// -- ///// Returns: void ////// -- /////////////////////////////// function cHelicopterCam:enable(uVehicle) if not(self.m_bEnabled) then clientBusy = true; self.m_bEnabled = true; self.m_uCurrentVehicle = uVehicle; addEventHandler("onClientRender", getRootElement(), self.m_funcRender); addEventHandler("onClientCursorMove", getRootElement(), self.m_funcMouseMove); bindKey("mouse_wheel_down", "down", self.m_zoomInFunc) bindKey("mouse_wheel_up", "down", self.m_zoomOutFunc) showChat(false); if(hud) then hud:Toggle(false); end end end -- /////////////////////////////// -- ///// Disablee ////// -- ///// Returns: void ////// -- /////////////////////////////// function cHelicopterCam:disable() if(self.m_bEnabled) then clientBusy = false; self.m_bEnabled = false; removeEventHandler("onClientRender", getRootElement(), self.m_funcRender); removeEventHandler("onClientCursorMove", getRootElement(), self.m_funcMouseMove); unbindKey("mouse_wheel_down", "down", self.m_zoomInFunc) unbindKey("mouse_wheel_up", "down", self.m_zoomOutFunc) setCameraTarget(localPlayer) showChat(true); if(hud) then hud:Toggle(true); end end end -- /////////////////////////////// -- ///// Render ////// -- ///// Returns: void ////// -- /////////////////////////////// -- state variables local speed = 0 local strafespeed = 0 local rotX, rotY = 0,0 local velocityX, velocityY, velocityZ function cHelicopterCam:render() if(self.m_bEnabled) then local camPosX, camPosY, camPosZ = getElementPosition(localPlayer) camPosZ = camPosZ-0.8 local angleZ = math.sin(self.rotY) local angleY = math.cos(self.rotY) * math.cos(self.rotX) local angleX = math.cos(self.rotY) * math.sin(self.rotX) local camTargetX = camPosX + ( angleX ) * 100 local camTargetY = camPosY + angleY * 100 local camTargetZ = camPosZ + angleZ * 100 local cameraAngleX = rotX local cameraAngleY = rotY local freeModeAngleZ = math.sin(cameraAngleY) local freeModeAngleY = math.cos(cameraAngleY) * math.cos(cameraAngleX) local freeModeAngleX = math.cos(cameraAngleY) * math.sin(cameraAngleX) if(self.m_bUseFreecam) then camPosX, camPosY, camPosZ = getCameraMatrix() angleZ = math.sin(self.rotY) angleY = math.cos(self.rotY) * math.cos(self.rotX) angleX = math.cos(self.rotY) * math.sin(self.rotX) camTargetX = camPosX + ( angleX ) * 100 camTargetY = camPosY + angleY * 100 camTargetZ = camPosZ + angleZ * 100 cameraAngleX = rotX cameraAngleY = rotY freeModeAngleZ = math.sin(cameraAngleY) freeModeAngleY = math.cos(cameraAngleY) * math.cos(cameraAngleX) freeModeAngleX = math.cos(cameraAngleY) * math.sin(cameraAngleX) local mspeed = self.options.normalMaxSpeed if getKeyState ( self.options.key_fastMove ) then mspeed = self.options.fastMaxSpeed elseif getKeyState ( self.options.key_slowMove ) then mspeed = self.options.slowMaxSpeed end if self.options.smoothMovement then local acceleration = self.options.acceleration local decceleration = self.options.decceleration -- Check to see if the forwards/backwards keys are pressed local speedKeyPressed = false if getKeyState ( self.options.key_forward ) then speed = speed + acceleration speedKeyPressed = true end if getKeyState ( self.options.key_backward ) then speed = speed - acceleration speedKeyPressed = true end -- Check to see if the strafe keys are pressed local strafeSpeedKeyPressed = false if getKeyState ( self.options.key_right ) then if strafespeed > 0 then -- for instance response strafespeed = 0 end strafespeed = strafespeed - acceleration / 2 strafeSpeedKeyPressed = true end if getKeyState ( self.options.key_left ) then if strafespeed < 0 then -- for instance response strafespeed = 0 end strafespeed = strafespeed + acceleration / 2 strafeSpeedKeyPressed = true end -- If no forwards/backwards keys were pressed, then gradually slow down the movement towards 0 if speedKeyPressed ~= true then if speed > 0 then speed = speed - decceleration elseif speed < 0 then speed = speed + decceleration end end -- If no strafe keys were pressed, then gradually slow down the movement towards 0 if strafeSpeedKeyPressed ~= true then if strafespeed > 0 then strafespeed = strafespeed - decceleration elseif strafespeed < 0 then strafespeed = strafespeed + decceleration end end -- Check the ranges of values - set the speed to 0 if its very close to 0 (stops jittering), and limit to the maximum speed if speed > -decceleration and speed < decceleration then speed = 0 elseif speed > mspeed then speed = mspeed elseif speed < -mspeed then speed = -mspeed end if strafespeed > -(acceleration / 2) and strafespeed < (acceleration / 2) then strafespeed = 0 elseif strafespeed > mspeed then strafespeed = mspeed elseif strafespeed < -mspeed then strafespeed = -mspeed end else speed = 0 strafespeed = 0 if getKeyState ( options.key_forward ) then speed = mspeed end if getKeyState ( options.key_backward ) then speed = -mspeed end if getKeyState ( options.key_left ) then strafespeed = mspeed end if getKeyState ( options.key_right ) then strafespeed = -mspeed end end -- Work out the distance between the target and the camera (should be 100 units) local camAngleX = camPosX - camTargetX local camAngleY = camPosY - camTargetY local camAngleZ = 0 -- we ignore this otherwise our vertical angle affects how fast you can strafe -- Calulcate the length of the vector local angleLength = math.sqrt(camAngleX*camAngleX+camAngleY*camAngleY+camAngleZ*camAngleZ) -- Normalize the vector, ignoring the Z axis, as the camera is stuck to the XY plane (it can't roll) local camNormalizedAngleX = camAngleX / angleLength local camNormalizedAngleY = camAngleY / angleLength local camNormalizedAngleZ = 0 -- We use this as our rotation vector local normalAngleX = 0 local normalAngleY = 0 local normalAngleZ = 1 -- Perform a cross product with the rotation vector and the normalzied angle local normalX = (camNormalizedAngleY * normalAngleZ - camNormalizedAngleZ * normalAngleY) local normalY = (camNormalizedAngleZ * normalAngleX - camNormalizedAngleX * normalAngleZ) local normalZ = (camNormalizedAngleX * normalAngleY - camNormalizedAngleY * normalAngleX) -- Update the camera position based on the forwards/backwards speed camPosX = camPosX + freeModeAngleX * speed camPosY = camPosY + freeModeAngleY * speed camPosZ = camPosZ + freeModeAngleZ * speed -- Update the camera position based on the strafe speed camPosX = camPosX + normalX * strafespeed camPosY = camPosY + normalY * strafespeed camPosZ = camPosZ + normalZ * strafespeed if(getKeyState("pgup")) then camPosZ = camPosZ+0.1 end if(getKeyState("pgdn")) then camPosZ = camPosZ-0.1 end end local veh = getPedOccupiedVehicle ( getLocalPlayer() ) if(self.currentMoveValueX ~= 0) or (self.currentMoveValueY ~= 0) then self.rotX = self.rotX + self.currentMoveValueX * self.mouseSensitivity * 0.01745 self.rotY = self.rotY - self.currentMoveValueY * self.mouseSensitivity * 0.01745 if self.rotX > self.PI then self.rotX = self.rotX - 2 * self.PI elseif self.rotX < -self.PI then self.rotX = self.rotX + 2 * self.PI end if self.rotY > self.PI then self.rotY = self.rotY - 2 * self.PI elseif self.rotY < -self.PI then self.rotY = self.rotY + 2 * self.PI end if self.rotY < -self.PI / 2.05 then self.rotY = -self.PI / 2.05 elseif self.rotY > self.PI / 2.05 then self.rotY = self.PI / 2.05 end local value = 0.1; if(self.currentMoveValueX > 0) then self.currentMoveValueX = self.currentMoveValueX-value; else self.currentMoveValueX = self.currentMoveValueX+value; end if(self.currentMoveValueY > 0) then self.currentMoveValueY = self.currentMoveValueY-value; else self.currentMoveValueY = self.currentMoveValueY+value; end -- ZOOM -- if(self.m_iCurZoomValue > 0.1) or (self.m_iCurZoomValue < -0.1) then self.m_iCurZoom = self.m_iCurZoom+self.m_iCurZoomValue; end if(self.m_iCurZoom > 100) then self.m_iCurZoom = 100; self.m_iCurZoomValue = 0; end if(self.m_iCurZoom < 10) then self.m_iCurZoom = 10; self.m_iCurZoomValue = 0; end if(self.m_iCurZoomValue >= 0) then self.m_iCurZoomValue = self.m_iCurZoomValue-0.01; else self.m_iCurZoomValue = self.m_iCurZoomValue+0.01; end end --[[ if(veh) then local rx, ry, curVehRot = getElementRotation ( veh ) local changedRotation = oldVehRot - curVehRot oldVehRot = curVehRot if not totalRot then totalRot = curVehRot end totalRot = changedRotation * 2 + totalRot local rotX = ( ( self.rotX * 360 / self.PI ) + totalRot ) / 360 * self.PI if rotX > self.PI then rotX = rotX - 2 * self.PI elseif rotX < -self.PI then rotX = rotX + 2 * self.PI end camTargetX = camPosX + ( math.cos(self.rotY) * math.sin(rotX) ) * 100 camTargetY = camPosY + ( math.cos(self.rotY) * math.cos(rotX) ) * 100 -- MOVE MOUSE VALUE -- end]] setCameraMatrix ( camPosX, camPosY, camPosZ, camTargetX, camTargetY, camTargetZ, 0, self.m_iCurZoom ) end end -- /////////////////////////////// -- ///// freecamMouse ////// -- ///// Returns: void ////// -- /////////////////////////////// function cHelicopterCam:mouseMove(cX,cY,aX,aY) if isCursorShowing() or isMTAWindowActive() then self.delay = 5 return elseif self.delay > 0 then self.delay = self.delay - 1 return end local width, height = guiGetScreenSize() local aX = aX - width / 2 local aY = aY - height / 2 self.currentMoveValueX = self.currentMoveValueX+(aX*self.mouseSensitivity); self.currentMoveValueY = self.currentMoveValueY+(aY*self.mouseSensitivity); if(self.currentMoveValueY > 100) then self.currentMoveValueY = 100; end if(self.currentMoveValueY < -100) then self.currentMoveValueY = -100; end if(self.currentMoveValueX > 100) then self.currentMoveValueX = 100; end if(self.currentMoveValueX < -100) then self.currentMoveValueX = -100; end -- Animation -- end -- /////////////////////////////// -- ///// ZoomIn ////// -- ///// Returns: void ////// -- /////////////////////////////// function cHelicopterCam:zoomIn() if(self.m_iCurZoomValue > 1) then self.m_iCurZoomValue = 1; else self.m_iCurZoomValue = self.m_iCurZoomValue+0.1; end end -- /////////////////////////////// -- ///// ZoomOut ////// -- ///// Returns: void ////// -- /////////////////////////////// function cHelicopterCam:zoomOut() if(self.m_iCurZoomValue < -1) then self.m_iCurZoomValue = -1; else self.m_iCurZoomValue = self.m_iCurZoomValue-0.1; end end -- /////////////////////////////// -- ///// bindKeys ////// -- ///// Returns: void ////// -- /////////////////////////////// function cHelicopterCam:bindKeys(bBool) if(bBool) then bindKey(self.m_sControlName, "down", self.m_funcToggleCam); else unbindKey(self.m_sControlName, "down", self.m_funcToggleCam); end end -- /////////////////////////////// -- ///// EnterVehicle ////// -- ///// Returns: void ////// -- /////////////////////////////// function cHelicopterCam:enterVehicle(uPlayer, iSeat) if(uPlayer == localPlayer) and (iSeat == 1) then if(self.m_tblValidModels[getElementModel(source)]) then outputChatBox("Benutze STRG um die Flugzeugkamera zu bedienen!", 0, 200, 0); self:bindKeys(true); end end end -- /////////////////////////////// -- ///// ExitVehicle ////// -- ///// Returns: void ////// -- /////////////////////////////// function cHelicopterCam:exitVehicle(uPlayer, iSeat) if(uPlayer == localPlayer) and (iSeat == 1) then if(self.m_tblValidModels[getElementModel(source)]) then self:bindKeys(false); self:disable(); end end end -- /////////////////////////////// -- ///// Constructor ////// -- ///// Returns: void ////// -- /////////////////////////////// function cHelicopterCam:constructor(...) -- Klassenvariablen -- self.m_bEnabled = false; self.m_funcRender = function(...) self:render(...) end self.m_funcMouseMove = function(...) self:mouseMove(...) end self.m_zoomInFunc = function(...) self:zoomIn(...) end self.m_zoomOutFunc = function(...) self:zoomOut(...) end self.m_funcEnterVehicle = function(...) self:enterVehicle(...) end self.m_funcExitVehicle = function(...) self:exitVehicle(...) end self.m_funcDisableFunc = function(...) self:bindKeys(false) self:disable() end; self.m_funcToggleCam = function(...) if(self.m_bEnabled) then self:disable() else self:enable(); end end -- Funktionen -- self.m_tblValidModels = {[497] = true, [488] = true}; self.rotX = 0; self.rotY = 0; self.rotZ = 0; self.m_iCurZoomValue = 0; self.m_iCurZoom = 80; self.currentMoveValueX = 0; self.currentMoveValueY = 0; self.delay = 5; self.mouseSensitivity = 0.025; self.PI = math.pi self.m_sControlName = "lctrl"; self.m_bUseFreecam = false; self.options = { invertMouseLook = false, normalMaxSpeed = 0.7, slowMaxSpeed = 0.2, fastMaxSpeed = 12, smoothMovement = true, acceleration = 0.05, decceleration = 0.01, mouseSensitivity = 0.3, maxYAngle = 188, key_fastMove = "lshift", key_slowMove = "lalt", key_forward = "w", key_backward = "s", key_left = "a", key_right = "d" } -- Events -- addEventHandler("onClientVehicleEnter", getRootElement(), self.m_funcEnterVehicle); addEventHandler("onClientVehicleExit", getRootElement(), self.m_funcExitVehicle); addEventHandler("onClientPlayerWasted", getLocalPlayer(), self.m_funcDisableFunc); addCommandHandler("freecam", function() if(getElementData(localPlayer, "Adminlevel") > 2) then self.m_funcToggleCam() self.m_bUseFreecam = not(self.m_bUseFreecam) end end) end -- EVENT HANDLER --
--imports local WIM = WIM; local _G = _G; local time = time; local date = date; --set namespace setfenv(1, WIM); local TimeStamps = WIM.CreateModule("TimeStamps", true); -- define available timeStamps local formats = { "%I:%M", -- HH:MM (12hr) "%I:%M %p", -- HH:MM AM/PM (12hr) "%H:%M", -- HH:MM (24hr) "%I:%M:%S", -- HH:MM:SS (12hr) "%I:%M:%S %p",-- HH:MM:SS AM/PM (12hr) "%H:%M:%S" -- HH:MM:SS (24hr) }; db_defaults.timeStampFormat = formats[3]; local function addTimeStamp(msg, chatDisplay) return GetTimeStamp(nil, chatDisplay).." "..msg; end function TimeStamps:OnEnable() RegisterStringModifier(addTimeStamp); end function TimeStamps:OnDisable() UnregisterStringModifier(addTimeStamp); end function TimeStamps:OnWindowDestroyed(win) win.lastDate = nil; end -- Global function GetTimeStamp(cTime, chatDisplay) local win = chatDisplay and chatDisplay.parentWindow or chatDisplay; cTime = cTime or (win and win.nextStamp) or time(); local cDate = _G.date(L["_DateFormat"], cTime); local color = win and win.nextStampColor or db.displayColors.sysMsg; if(win and win.lastDate ~= cDate) then chatDisplay:AddMessage(" "); chatDisplay:AddMessage("["..cDate.."]", color.r, color.g, color.b); end local stamp = "|cff"..RGBPercentToHex(color.r, color.g, color.b)..date(db.timeStampFormat, cTime).."|r"; if(win) then win.lastDate = cDate; win.nextChatDisplay = nil; win.nextStamp = nil; win.nextStampColor = nil; end return stamp; end function GetTimeStampFormats() return formats; end
local t = Def.ActorFrame{ } t[#t+1] = Def.Quad{ InitCommand=function(self) self:zoomto(60,60):diffuse(getMainColor("frame")):diffusealpha(0.7):rotationz(90) end } t[#t+1] = Def.Quad{ InitCommand=function(self) self:x(-10):zoomto(50,25):diffuse(color("#ffffff")):diffusealpha(0.5):rotationz(90) end } return t
--- MidTrackObjectSegmentBuilder --- Builder Pattern constructor for a MidTrackObjectSegment local MidTrackObjectSegment = require(script.Parent.MidTrackObjectSegment) local root = script.Parent.Parent local Builder = require(root.Builder) local util = root.Util local t = require(util.t) local IsModelWithPrimaryPart = require(util.IsModelWithPrimaryPart) local MidTrackObjectSegmentBuilder = { ClassName = "MidTrackObjectSegmentBuilder"; } MidTrackObjectSegmentBuilder.__index = MidTrackObjectSegmentBuilder setmetatable(MidTrackObjectSegmentBuilder, Builder) function MidTrackObjectSegmentBuilder.new() local self = setmetatable(Builder.new(), MidTrackObjectSegmentBuilder) self.Name = nil self.Object = nil self.Offset = CFrame.new() self.UseLookVector = false return self end -- makes sure everything is setup properly -- runs an "any" check on the following properties local BuilderCheck = Builder.Check({ "Object" }) function MidTrackObjectSegmentBuilder:Build() assert(BuilderCheck(self)) return MidTrackObjectSegment.fromData({ Name = self.Name, Object = self.Object, Offset = self.Offset, UseLookVector = self.UseLookVector, }) end local IsObject = t.union( t.instanceIsA("BasePart"), IsModelWithPrimaryPart ) function MidTrackObjectSegmentBuilder:WithObject(object) assert(IsObject(object)) self.Object = object return self end function MidTrackObjectSegmentBuilder:WithOffset(offset) assert(t.CFrame(offset)) self.Offset = offset return self end function MidTrackObjectSegmentBuilder:WithUseLookVector(value) assert(t.boolean(value)) self.UseLookVector = value return self end return MidTrackObjectSegmentBuilder
local hst = {} function hst.in_history(player, entity) if not (global.player_state[player.index].bp_method == "Auto-Mode") then return end if entity.unit_number then return (global.player_state[player.index].bp_entity_history[entity.unit_number] ~= nil) elseif entity.position then return (global.player_state[player.index].bp_entity_history[entity.position] ~= nil) else return false end end function hst.purge_history(event, player) local purge_time = global.player_state[player.index].bp_history_time for id, tick in pairs(global.player_state[player.index].bp_entity_history) do if tick < (event.tick - purge_time * 60) then global.player_state[player.index].bp_entity_history[id] = nil end end end function hst.add_to_history(event, player, entity) if not (global.player_state[player.index].bp_method == "Auto-Mode") then return end if entity.unit_number then global.player_state[player.index].bp_entity_history[entity.unit_number] = event.tick elseif entity.position then global.player_state[player.index].bp_entity_history[entity.position] = event.tick end end return hst
pg = pg or {} pg.enemy_data_statistics_205 = { [12300437] = { cannon = 75, reload = 150, speed_growth = 0, cannon_growth = 800, rarity = 1, air = 0, torpedo = 200, dodge = 5, durability_growth = 39000, antiaircraft = 0, luck = 18, reload_growth = 0, dodge_growth = 72, hit_growth = 210, star = 2, hit = 14, antisub_growth = 0, air_growth = 0, battle_unit_type = 90, base = 369, durability = 918, armor_growth = 0, torpedo_growth = 3600, luck_growth = 0, speed = 12, armor = 0, id = 12300437, antiaircraft_growth = 0, antisub = 0, scale = 150, equipment_list = { 611263, 611264, 611265 } }, [12300441] = { cannon = 280, reload = 150, speed_growth = 0, cannon_growth = 0, rarity = 5, air = 0, torpedo = 0, dodge = 22, durability_growth = 0, antiaircraft = 285, luck = 20, reload_growth = 0, dodge_growth = 312, hit_growth = 210, star = 6, hit = 30, antisub_growth = 0, air_growth = 0, battle_unit_type = 95, base = 363, durability = 78000, armor_growth = 0, torpedo_growth = 0, luck_growth = 0, speed = 18, armor = 0, id = 12300441, antiaircraft_growth = 0, antisub = 0, appear_fx = { "bossguangxiao", "appearQ" }, equipment_list = { 611171, 611172, 611173, 611174, 611175, 611176, 611177 } }, [12300443] = { cannon = 200, hit_growth = 210, rarity = 5, speed_growth = 0, pilot_ai_template_id = 10001, air = 300, luck = 20, dodge = 22, cannon_growth = 0, speed = 16, reload = 150, reload_growth = 0, dodge_growth = 312, id = 12300443, star = 6, hit = 40, antisub_growth = 0, air_growth = 0, torpedo = 0, base = 238, durability = 93200, armor_growth = 0, torpedo_growth = 0, luck_growth = 0, battle_unit_type = 95, armor = 0, durability_growth = 0, antiaircraft = 390, antisub = 0, antiaircraft_growth = 0, bound_bone = { cannon = { { 1.1, 1.3, 0 } }, vicegun = { { 1.1, 0.43, 0 } }, torpedo = { { 0.18, 0.27, 0 } }, antiaircraft = { { 1.1, 0.43, 0 } } }, appear_fx = { "bossguangxiao", "appearQ" }, equipment_list = { 611191, 611193, 611195, 611196, 611197, 611198, 611199 } }, [12300444] = { cannon = 300, reload = 150, speed_growth = 0, cannon_growth = 0, rarity = 5, air = 0, torpedo = 180, dodge = 16, durability_growth = 0, antiaircraft = 460, luck = 25, reload_growth = 0, dodge_growth = 228, hit_growth = 210, star = 6, hit = 40, antisub_growth = 0, air_growth = 0, battle_unit_type = 95, base = 364, durability = 115000, armor_growth = 0, torpedo_growth = 0, luck_growth = 0, speed = 18, armor = 0, id = 12300444, antiaircraft_growth = 0, antisub = 0, appear_fx = { "bossguangxiao", "appearQ" }, equipment_list = { 611221, 611222, 611223, 611224, 611225, 611226 } }, [12300445] = { cannon = 320, reload = 150, speed_growth = 0, cannon_growth = 0, rarity = 3, air = 0, torpedo = 200, dodge = 16, durability_growth = 0, antiaircraft = 460, luck = 35, reload_growth = 0, dodge_growth = 228, hit_growth = 210, star = 4, hit = 45, antisub_growth = 0, air_growth = 0, battle_unit_type = 95, base = 275, durability = 150000, armor_growth = 0, torpedo_growth = 0, luck_growth = 0, speed = 18, armor = 0, id = 12300445, antiaircraft_growth = 0, antisub = 0, equipment_list = { 611231, 611232, 611233, 611234, 611235, 611236, 611237 } }, [12300446] = { cannon = 120, reload = 150, speed_growth = 0, cannon_growth = 0, rarity = 4, air = 0, torpedo = 230, dodge = 34, durability_growth = 0, antiaircraft = 260, luck = 20, reload_growth = 0, dodge_growth = 222, hit_growth = 210, star = 4, hit = 32, antisub_growth = 0, air_growth = 0, battle_unit_type = 95, base = 297, durability = 52400, armor_growth = 0, torpedo_growth = 0, luck_growth = 0, speed = 32, armor = 0, id = 12300446, antiaircraft_growth = 0, antisub = 0, appear_fx = { "appearQ" }, equipment_list = { 611181, 611182, 611183, 611184, 611185 } }, [12300447] = { cannon = 220, reload = 150, speed_growth = 0, cannon_growth = 0, rarity = 4, air = 0, torpedo = 0, dodge = 22, durability_growth = 0, antiaircraft = 305, luck = 20, reload_growth = 0, dodge_growth = 162, hit_growth = 210, star = 4, hit = 38, antisub_growth = 0, air_growth = 0, battle_unit_type = 95, base = 370, durability = 80000, armor_growth = 0, torpedo_growth = 0, luck_growth = 0, speed = 25, armor = 0, id = 12300447, antiaircraft_growth = 0, antisub = 0, appear_fx = { "appearQ" }, equipment_list = { 611211, 611212, 611213, 611214, 611215 } }, [12300450] = { cannon = 8, prefab = "srDD2", reload = 150, cannon_growth = 560, speed_growth = 0, air = 0, rarity = 2, dodge = 0, torpedo = 36, durability_growth = 13200, antiaircraft = 80, reload_growth = 0, dodge_growth = 0, luck = 0, star = 2, hit = 10, antisub_growth = 0, air_growth = 0, hit_growth = 144, base = 123, durability = 640, armor_growth = 0, torpedo_growth = 3250, luck_growth = 0, speed = 15, armor = 0, battle_unit_type = 25, antisub = 0, id = 12300450, antiaircraft_growth = 1000, equipment_list = { 1000593, 1000598, 1000603 } }, [12300451] = { cannon = 16, prefab = "srCL2", reload = 150, cannon_growth = 880, speed_growth = 0, air = 0, rarity = 2, dodge = 0, torpedo = 28, durability_growth = 20800, antiaircraft = 160, reload_growth = 0, dodge_growth = 0, luck = 0, star = 2, hit = 10, antisub_growth = 0, air_growth = 0, hit_growth = 144, base = 124, durability = 890, armor_growth = 0, torpedo_growth = 2250, luck_growth = 0, speed = 15, armor = 0, battle_unit_type = 30, antisub = 0, id = 12300451, antiaircraft_growth = 2250, equipment_list = { 1000608, 1000613 } }, [12300452] = { cannon = 21, prefab = "srCA2", reload = 150, cannon_growth = 1800, speed_growth = 0, air = 0, rarity = 2, dodge = 0, torpedo = 18, durability_growth = 36800, antiaircraft = 125, reload_growth = 0, dodge_growth = 0, luck = 0, star = 2, hit = 10, antisub_growth = 0, air_growth = 0, hit_growth = 144, base = 125, durability = 1700, armor_growth = 0, torpedo_growth = 1250, luck_growth = 0, speed = 15, armor = 0, battle_unit_type = 35, antisub = 0, id = 12300452, antiaircraft_growth = 1400, equipment_list = { 1000617, 1000623, 1000628 } }, [12300453] = { cannon = 47, prefab = "srBB2", reload = 150, cannon_growth = 2200, speed_growth = 0, air = 0, rarity = 2, dodge = 0, torpedo = 0, durability_growth = 70400, antiaircraft = 135, reload_growth = 0, dodge_growth = 0, luck = 0, star = 2, hit = 10, antisub_growth = 0, air_growth = 0, hit_growth = 144, base = 126, durability = 5270, armor_growth = 0, torpedo_growth = 0, luck_growth = 0, speed = 15, armor = 0, battle_unit_type = 60, antisub = 0, id = 12300453, antiaircraft_growth = 1400, equipment_list = { 1000633, 1000637, 1000643 } }, [12300454] = { cannon = 0, prefab = "srCV2", reload = 150, cannon_growth = 0, speed_growth = 0, air = 55, rarity = 2, dodge = 0, torpedo = 0, durability_growth = 65600, antiaircraft = 150, reload_growth = 0, dodge_growth = 0, luck = 0, star = 2, hit = 10, antisub_growth = 0, air_growth = 2000, hit_growth = 144, base = 127, durability = 4680, armor_growth = 0, torpedo_growth = 0, luck_growth = 0, speed = 15, armor = 0, battle_unit_type = 65, antisub = 0, id = 12300454, antiaircraft_growth = 1800, bound_bone = { cannon = { { 1.8, 1.14, 0 } }, torpedo = { { 1.07, 0.24, 0 } }, antiaircraft = { { 1.8, 1.14, 0 } }, plane = { { 1.8, 1.14, 0 } } }, equipment_list = { 1000647, 1000653, 1000658, 1000663 } }, [12300455] = { cannon = 45, reload = 150, speed_growth = 0, cannon_growth = 640, rarity = 4, air = 0, torpedo = 135, dodge = 28, durability_growth = 23600, antiaircraft = 125, luck = 0, reload_growth = 0, dodge_growth = 450, hit_growth = 350, star = 4, hit = 30, antisub_growth = 0, air_growth = 0, battle_unit_type = 50, base = 248, durability = 4340, armor_growth = 0, torpedo_growth = 5200, luck_growth = 0, speed = 36, armor = 0, id = 12300455, antiaircraft_growth = 3000, antisub = 0, equipment_list = { 1000713, 1000717, 1000722 } }, [12300456] = { cannon = 74, reload = 150, speed_growth = 0, cannon_growth = 936, rarity = 4, air = 0, torpedo = 112, dodge = 11, durability_growth = 33600, antiaircraft = 255, luck = 0, reload_growth = 0, dodge_growth = 162, hit_growth = 210, star = 4, hit = 14, antisub_growth = 0, air_growth = 0, battle_unit_type = 55, base = 249, durability = 5270, armor_growth = 0, torpedo_growth = 3366, luck_growth = 0, speed = 24, armor = 0, id = 12300456, antiaircraft_growth = 3744, antisub = 0, equipment_list = { 1000683, 1000687, 1000693, 1000697 } }, [12300457] = { cannon = 102, reload = 150, speed_growth = 0, cannon_growth = 1750, rarity = 4, air = 0, torpedo = 84, dodge = 17, durability_growth = 43200, antiaircraft = 192, luck = 0, reload_growth = 0, dodge_growth = 170, hit_growth = 350, star = 4, hit = 30, antisub_growth = 0, air_growth = 0, battle_unit_type = 60, base = 250, durability = 6040, armor_growth = 0, torpedo_growth = 3200, luck_growth = 0, speed = 18, armor = 0, id = 12300457, antiaircraft_growth = 3880, antisub = 0, equipment_list = { 1000743, 1000747, 1000753, 1000757 } }, [12300458] = { cannon = 120, reload = 150, speed_growth = 0, cannon_growth = 3600, rarity = 3, air = 0, torpedo = 0, dodge = 17, durability_growth = 68000, antiaircraft = 212, luck = 0, reload_growth = 0, dodge_growth = 170, hit_growth = 350, star = 4, hit = 30, antisub_growth = 0, air_growth = 0, battle_unit_type = 65, base = 251, durability = 9010, armor_growth = 0, torpedo_growth = 0, luck_growth = 0, speed = 14, armor = 0, id = 12300458, antiaircraft_growth = 4680, antisub = 0, equipment_list = { 1000778, 1000782, 1000788 }, buff_list = { { ID = 50510, LV = 5 } } } } return
local term = require("term") print("testing term blink") term.setCursorBlink(true) io.write("this should blink for 1 second") term.pull(1, "adsfasdfA") print() io.write("this should not blink for 1 second") term.setCursorBlink(false) term.pull(1, "adsfasdfA") print() io.write("this should blink for input [ENTER]: ") term.setCursorBlink(true) term.read() io.write("this should not blink for input [ENTER]: ") term.setCursorBlink(false) term.read() print("time to blink the screen") print("moving with blinkyness on") term.setCursorBlink(true) for _=1,100 do io.write("x") term.pull(0,"adsfasdf") end print() print("moving with blinkyness off") term.setCursorBlink(false) for _=1,100 do io.write("-") term.pull(0,"adsfasdf") end print() print("shell should be blinking after this test finishes") term.setCursorBlink(true)
-- -*- lua -*- local pkgName = "cmplr/intel" local fn = myFileName():gsub("%.lua$","") local fullVersion = barefilename(fn) local pkgVersion = fullVersion:match("([0-9]+%.[0-9]+)%.?") local pkgNameVer = pathJoin(pkgName,pkgVersion) local modulepath_root = os.getenv("MODULEPATH_ROOT") whatis("Description: Intel Compiler Collection") prepend_path('MODULEPATH', pathJoin(modulepath_root,pkgNameVer)) family("compiler")
function distance ( x1, y1, x2, y2 ) local dx = x1 - x2 local dy = y1 - y2 return math.sqrt ( dx * dx + dy * dy ) end function sign(x) if x > 0 then return 1 elseif x < 0 then return -1 else return 0 end end function round(x) local floor = math.floor(x) if ((x - floor) >= 0.5) then return math.ceil(x) else return floor end end
local EaseUI = require(script:GetCustomProperty("EaseUI")) local mainPointer = script:GetCustomProperty("Main"):WaitForObject() local reticleUI = script:GetCustomProperty("ReticleUI"):WaitForObject() local truePointer = script:GetCustomProperty("TruePointer"):WaitForObject() local sniperView = script:GetCustomProperty("SniperView"):WaitForObject() local distanceReadout = script:GetCustomProperty("DistanceReadout"):WaitForObject() local reloadTimer = script:GetCustomProperty("ReloadTimer"):WaitForObject() local fireState = script:GetCustomProperty("FireState"):WaitForObject() local redDot = script:GetCustomProperty("RedDot"):WaitForObject() local zoom = script:GetCustomProperty("Zoom"):WaitForObject() local reloadColor = script:GetCustomProperty("ReloadColor") local activeColor = script:GetCustomProperty("ActiveColor") local tankGarage = World.FindObjectByName("TANK_VP_TankGarage") local localPlayer = Game.GetLocalPlayer() local reloadSpeed = 1 local reloading = false local accumulatedReloadingTime = 0 local turret = nil local defaultCamera = nil local sniperCamera = nil local bindingPressedListener = nil local cannon = nil local function RaycastResultFromPointRotationDistance(point, rotation, distance) local azimuth = rotation.z local altitude = rotation.y if azimuth < 0 then azimuth = azimuth + 360 end azimuth = azimuth * math.pi/180 if altitude < 0 then altitude = altitude + 360 end altitude = altitude * math.pi/180 local direction = Vector3.New(math.cos(azimuth) * math.cos(altitude), math.sin(azimuth) * math.cos(altitude), math.sin(altitude)) local destination = (direction * distance) + point local point = World.Raycast(point, destination) if point then destination = point:GetImpactPosition() end return destination end function ReloadAnimation(player, reloadTime) if player ~= localPlayer then return end reloadSpeed = reloadTime reloading = true end function FindTank() if not localPlayer.clientUserData.currentTankData or not Object.IsValid(localPlayer.clientUserData.currentTankData.skin) then return end local clientSkin = localPlayer.clientUserData.currentTankData.skin turret = clientSkin:FindDescendantByName("Turret") cannon = clientSkin:FindDescendantByName("Cannon") defaultCamera = clientSkin:FindDescendantByName("Tank Camera") sniperCamera = clientSkin:FindDescendantByName("Sniper Camera") Task.Wait(0.1) if Object.IsValid(defaultCamera) then localPlayer:SetOverrideCamera(defaultCamera) end end function UpdatePointer() local position = RaycastResultFromPointRotationDistance(cannon:GetWorldPosition(),cannon:GetWorldRotation(), 100000) local distance = math.ceil((position - cannon:GetWorldPosition()).size * 5 / 1000) distanceReadout.text = tostring(distance) .. " m" local uiPostion = UI.GetScreenPosition(position) if uiPostion then truePointer.visibility = Visibility.FORCE_ON EaseUI.EaseX(truePointer, uiPostion.x, 0.04, EaseUI.EasingEquation.CUBIC, EaseUI.EasingDirection.INOUT) EaseUI.EaseY(truePointer, uiPostion.y, 0.04, EaseUI.EasingEquation.CUBIC, EaseUI.EasingDirection.INOUT) else truePointer.visibility = Visibility.FORCE_OFF end end function TransitionCameras(oldCamera, newCamera) local newPitch = oldCamera.currentPitch local newYaw = oldCamera.currentYaw if newPitch > newCamera.maxPitch then newPitch = newCamera.maxPitch elseif newPitch < newCamera.minPitch then newPitch = newCamera.minPitch end if newCamera.isYawLimited and newYaw > newCamera.maxYaw then newYaw = newCamera.maxYaw elseif newCamera.isYawLimited and newYaw < newCamera.minYaw then newYaw = newCamera.minYaw end newCamera.currentPitch = newPitch newCamera.currentYaw = newYaw localPlayer:SetOverrideCamera(newCamera) end function OnBindingPressed(player, binding) if binding == "ability_extra_12" then if localPlayer:GetActiveCamera() == defaultCamera and turret then TransitionCameras(defaultCamera, sniperCamera) turret.visibility = Visibility.FORCE_OFF sniperView.visibility = Visibility.INHERIT elseif defaultCamera and turret then TransitionCameras(sniperCamera, defaultCamera) turret.visibility = Visibility.INHERIT sniperView.visibility = Visibility.FORCE_OFF end end end function Tick(dt) if not Object.IsValid(cannon) then reticleUI.visibility = Visibility.FORCE_OFF accumulatedReloadingTime = 0 reloading = false FindTank() Task.Wait(0.1) return end reticleUI.visibility = Visibility.INHERIT if reloading and reloadSpeed then accumulatedReloadingTime = accumulatedReloadingTime + dt if reloadSpeed - accumulatedReloadingTime > 0 then reloadTimer.text = string.format("%.2f",reloadSpeed - accumulatedReloadingTime) fireState.text = "Reloading" fireState:SetColor(reloadColor) redDot.visibility = Visibility.FORCE_OFF else accumulatedReloadingTime = 0 reloading = false redDot.visibility = Visibility.INHERIT if Object.IsValid(localPlayer.clientUserData.currentTankData.reloadSFX) then localPlayer.clientUserData.currentTankData.reloadSFX:Play() end end else fireState.text = "Ready" fireState:SetColor(activeColor) reloadTimer.text = "" end local currentCamera = localPlayer:GetActiveCamera() if currentCamera == sniperCamera then local currentZoom = currentCamera.currentDistance local maxZoom = currentCamera.minDistance local minZoom = currentCamera.maxDistance zoom.text = string.format("%.1f", (minZoom - currentZoom)/200) .. "xZoom" zoom.visibility = Visibility.INHERIT else zoom.visibility = Visibility.FORCE_OFF end UpdatePointer() end bindingPressedListener = localPlayer.bindingPressedEvent:Connect(OnBindingPressed) Events.Connect("ANIMATE_FIRING", ReloadAnimation)
LinkLuaModifier("modifier_old_lifestealer_feast", "heroes/old_lifestealer/old_lifestealer_modifiers.lua", LUA_MODIFIER_MOTION_NONE) LinkLuaModifier("modifier_old_lifestealer_anabolic_frenzy", "heroes/old_lifestealer/old_lifestealer_modifiers.lua", LUA_MODIFIER_MOTION_NONE) LinkLuaModifier("modifier_old_lifestealer_poison_sting", "heroes/old_lifestealer/old_lifestealer_modifiers.lua", LUA_MODIFIER_MOTION_NONE) LinkLuaModifier("modifier_old_lifestealer_poison_sting_slow", "heroes/old_lifestealer/old_lifestealer_modifiers.lua", LUA_MODIFIER_MOTION_NONE) LinkLuaModifier("modifier_old_lifestealer_rage_aura", "heroes/old_lifestealer/old_lifestealer_modifiers.lua", LUA_MODIFIER_MOTION_NONE) LinkLuaModifier("modifier_old_lifestealer_rage", "heroes/old_lifestealer/old_lifestealer_modifiers.lua", LUA_MODIFIER_MOTION_NONE) old_lifestealer_feast = class({}) function old_lifestealer_feast:OnUpgrade() self:GetCaster():AddNewModifier(self:GetCaster(), self, "modifier_old_lifestealer_feast", {}) end old_lifestealer_anabolic_frenzy = class({}) function old_lifestealer_anabolic_frenzy:OnUpgrade() self:GetCaster():AddNewModifier(self:GetCaster(), self, "modifier_old_lifestealer_anabolic_frenzy", {}) end old_lifestealer_poison_sting = class({}) function old_lifestealer_poison_sting:OnUpgrade() self:GetCaster():AddNewModifier(self:GetCaster(), self, "modifier_old_lifestealer_poison_sting", {}) end old_lifestealer_rage = class({}) function old_lifestealer_rage:GetCastRange() if self:GetCaster():HasScepter() then return self:GetSpecialValueFor("radius_scepter") else return 0 end end function old_lifestealer_rage:GetBehavior() if not self.bFoundSpecial then self.hSpecial = Entities:First() while self.hSpecial and (self.hSpecial:GetName() ~= "special_bonus_unique_old_lifestealer_3" or self.hSpecial:GetCaster() ~= self:GetCaster()) do self.hSpecial = Entities:Next(self.hSpecial) end self.bFoundSpecial = true end if self.hSpecial and self.hSpecial:GetLevel() > 0 then return DOTA_ABILITY_BEHAVIOR_NO_TARGET+DOTA_ABILITY_BEHAVIOR_IMMEDIATE+DOTA_ABILITY_BEHAVIOR_IGNORE_PSEUDO_QUEUE else return DOTA_ABILITY_BEHAVIOR_NO_TARGET+DOTA_ABILITY_BEHAVIOR_IMMEDIATE end end function old_lifestealer_rage:OnSpellStart() local hCaster = self:GetCaster() if not self.bFoundSpecial then self.hSpecial = Entities:First() while self.hSpecial and (self.hSpecial:GetName() ~= "special_bonus_unique_old_lifestealer_3" or self.hSpecial:GetCaster() ~= hCaster) do self.hSpecial = Entities:Next(self.hSpecial) end self.bFoundSpecial = true end StartAnimation(hCaster, {duration = 0.4, activity = ACT_DOTA_LIFESTEALER_RAGE}) if self.hSpecial and self.hSpecial:GetLevel() > 0 then hCaster:Purge(false, true, false, true, true) end hCaster:EmitSound("Hero_LifeStealer.Rage") hCaster:AddNewModifier(hCaster, self, "modifier_old_lifestealer_rage_aura", {Duration = self:GetSpecialValueFor("duration")}) end
local ColorMaskFX, super = Class(FXBase) function ColorMaskFX:init(color, amount, priority) super:init(self, priority or 0) self.color = color or {1, 1, 1} self.amount = amount or 1 end function ColorMaskFX:setColor(r,g,b) self.color = {r, g, b} end function ColorMaskFX:getColor() return self.color[1], self.color[2], self.color[3] end function ColorMaskFX:isActive() return super:isActive(self) and self.amount > 0 end function ColorMaskFX:draw(texture) local last_shader = love.graphics.getShader() local shader = Kristal.Shaders["AddColor"] love.graphics.setShader(shader) shader:send("inputcolor", {self:getColor()}) shader:send("amount", self.amount) love.graphics.drawCanvas(texture) shader:send("amount", 1) love.graphics.setShader(last_shader) end return ColorMaskFX
--[[@@@ @class BaseBuilding class overview... --]] DefineClass.BaseBuilding = { class_flags = { cfComponentSound = true }, __parents = { "Holder", "SyncObject" }, working = false, ui_working = true, ui_working_changed = 0, fx_working = "", suspended = false, -- thread or while the dust storm is active suspend_thread = false, frozen = false, ion_storms = false, destroyed = false, orig_state = false, bulldozed = false, -- running out of synonyms exceptional_circumstances = false, signs = false, --working/idle anim controls anim_control_thread = false, wait_working_anims_to_finish = false, --false for long start/end anims that can blend with eachother, true for short non blending anims --hit moment tracking track_multiple_hit_moments_in_work_state = false, track_multiple_hit_thread = false, force_fx_work_target = false, ui_interaction_state = true, --used by UpdateConsumption to avoid iskindof checks is_electricity_consumer = false, is_lifesupport_consumer = false, play_working_anim_on_this_attach = false, --"attachclassname", will force ChangeWorkingStateAnim to always pick this attach to control. refreshing_working_state = false, -- used when applying upgrades to force recalc of important values without affecting the visual state sign_spot = "Top", sign_offset = false, } function BaseBuilding:GameInit() self:AddToCityLabels() CreateGameTimeThread(function(self) -- delay until GameInit is completed if not IsValid(self) then return end self:UpdateWorking() end, self) end function BaseBuilding:Done() SetShapeMarkers(self, false) end function BaseBuilding:AddToCityLabels() --overwrite me end function GetBuildingsParamInNotification(displayed_in_notif) local building_counts = {} for _, bld in pairs(displayed_in_notif) do local name = bld.template_name if name and name ~= "" then local count = (building_counts[name] or 0) + 1 building_counts[name] = count end end local keys = table.keys(building_counts) table.stable_sort(keys, function(a,b) return building_counts[a] > building_counts[b] end) local rollover_text = {} for i = 1, #keys do local item = keys[i] local count = building_counts[item] local name = count > 1 and BuildingTemplates[item].display_name_pl or BuildingTemplates[item].display_name rollover_text[#rollover_text + 1] = T{10365, "<count> <name>", count = count, name = name} end rollover_text = table.concat(rollover_text, "\n") return rollover_text end local function NotWorkingBuildingsParamFunc(displayed_in_notif) local rollover_text = GetBuildingsParamInNotification(displayed_in_notif) or empty_table return {count = #displayed_in_notif, rollover_title = T(5648, "Buildings Not Working"), rollover_text = rollover_text} end GlobalVar("g_NotWorkingBuildings", {}) GlobalGameTimeThread("NotWorkingBuildingsNotif", function() HandleNewObjsNotif(g_NotWorkingBuildings, "NotWorkingBuildings", nil, NotWorkingBuildingsParamFunc) end) function BaseBuilding:ShouldShowNotWorkingNotification() return not self.destroyed and self:IsWorkPermitted() and not self:IsWorkPossible() end function BaseBuilding:UpdateNotWorkingBuildingsNotification() if self:ShouldShowNotWorkingNotification() then table.insert_unique(g_NotWorkingBuildings, self) else table.remove_entry(g_NotWorkingBuildings, self) end end --[[@@@ Will set the working state of the building with whatever CanWork returns. This means that if GetWorkNotPossibleReason and GetWorkNotPermittedReason are implemented correctly the building will automatically pick the correct state. This function needs to be called on state change. @function void BaseBuilding@UpdateWorking([bool expected_state]) @param bool expected_state - Optional. The expected state by the caller. If the actual state is different the function will helpfully assert. --]] function BaseBuilding:UpdateWorking(expected_state) local can_work = self:CanWork() assert(expected_state == nil or can_work == expected_state, "CanWork method inconsistency") self:SetWorking(can_work) end --[[@@@ Working state setter. Will set the new working state of the building directly. Use this only if you are absolutely certain what the new sate will be. For example, a factory lacking input materials cannot work therefore it is safe to call SetWorking(false) (unless some research says otherwise) for it to immidiately update its working state. Generally though, it is safer to call the UpdateWorking(working) method. This function will do work even if the new state is the same as the old one. OnSetWorking will only get called if the new state is different from the old one. @function void BaseBuilding@SetWorking(bool work) @param bool work - The new working state. --]] function BaseBuilding:SetWorking(work) work = not not work local old_working = self.working self.working = work self:UpdateNotWorkingBuildingsNotification() --rem/add consumption requests if self:DoesHaveConsumption() then self:UpdateRequestConnectivity() end --rem/add upgrade consumption requests if self:DoesHaveUpgradeConsumption() then self:UpdateUpgradeRequestsConnectivity() end if self.working == old_working then return end self:OnSetWorking(work) end function BaseBuilding:Setexceptional_circumstances(disabled) self.exceptional_circumstances = disabled self:UpdateWorking() self:AttachSign(disabled, "SignNotWorking") end function BaseBuilding:SetUIInteractionState(bState) self.ui_interaction_state = bState RebuildInfopanel(self) end function BaseBuilding:GetUIInteractionState() return self.ui_interaction_state end function BaseBuilding:DoesHaveConsumption() return false end function BaseBuilding:DoesHaveUpgradeConsumption() return false end function BaseBuilding:SetUIWorking(work) work = work or false if self.ui_working == work then return end self:Gossip("UIWorking", work ) self.ui_working = work self.ui_working_changed = GameTime() PlayFX("UIWorking", work and "start" or "end", self) self:UpdateWorking() self:OnSetUIWorking(work) self:AttachSign(not self.ui_working, "SignStopped") self:UpdateSignsVisibility() end function BaseBuilding:GetBroadcastLabel() return self.class end function BaseBuilding:BroadcastVerify(other) return true end function BroadcastAction(building, action, ...) local label = building:GetBroadcastLabel() local list = building.city and building.city.labels[label] or empty_table assert(table.find(list, building), "Object isn't present in its broadcast list!") local eval = type(action) == "string" for _, obj in ipairs(list) do if obj:GetBroadcastLabel() == label and building:BroadcastVerify(obj) and obj:GetUIInteractionState() then local func = eval and obj[action] or action func(obj, ...) end end end function BaseBuilding:ToggleWorking(broadcast) if not self.suspended then RebuildInfopanel(self) self:SetUIWorking(not self.ui_working) if broadcast then BroadcastAction(self, "SetUIWorking", self.ui_working) end end end function BaseBuilding:ToggleWorking_Update(button) button:SetEnabled(not self.suspended) local shortcuts = GetShortcuts("actionOnOff") local binding = "" if shortcuts and (shortcuts[1] or shortcuts[2]) then binding = T(10902, " / <em><ShortcutName('actionOnOff', 'keyboard')></em>") end if self.suspended then button:SetIcon("UI/Icons/IPButtons/turn_off.tga") button:SetRolloverHint(T{7611, "<left_click><binding> Deactivate <newline><em>Ctrl + <left_click></em> Deactivate all <display_name_pl>", binding = binding}) button:SetRolloverHintGamepad(T(7612, "<ButtonA> Deactivate <newline><ButtonX> Deactivate all <display_name_pl>")) elseif self.ui_working then if not self.working then button:SetIcon("UI/Icons/IPButtons/turn_warning.tga") else button:SetIcon("UI/Icons/IPButtons/turn_off.tga") end button:SetRolloverHint(T{7611, "<left_click><binding> Deactivate <newline><em>Ctrl + <left_click></em> Deactivate all <display_name_pl>", binding = binding}) button:SetRolloverHintGamepad(T(7612, "<ButtonA> Deactivate <newline><ButtonX> Deactivate all <display_name_pl>")) else button:SetIcon("UI/Icons/IPButtons/turn_on.tga") button:SetRolloverHint(T{7613, "<left_click><binding> Activate <newline><em>Ctrl + <left_click></em> Activate all <display_name_pl>", binding = binding}) button:SetRolloverHintGamepad(T(7614, "<ButtonA> Activate <newline><ButtonX> Activate all <display_name_pl>")) end end function BaseBuilding:GetUIWorkingStatus() if self.suspended then return T(379, "Suspended") end if self.ui_working then if not self.working then return T(7326, "Not Working") end return T(7327, "Turned On") end return T(7328, "Turned Off") end --[[@@@ Returns whether work is possible in terms of game rules for this building. @function bool BaseBuilding@IsWorkPossible() @result bool - Whether it is possible for the building to work in its current state according to the game rules. --]] function BaseBuilding:IsWorkPossible() -- by 'objective' factors, e.g. electricity supplied, output storage empty, workers present return not self:GetWorkNotPossibleReason() end --[[@@@ Returns a reason which makes it impossible (in terms of game rules) for the building to work. For example if the building requires workers but has none "NotEnoughWorkers" should be returned. This is an [auto resolve](LuaClasses.md.html#toc1.3) method. This needs to be implemented for building classes that have unique reasons for not working. @function string/nil BaseBuilding@GetWorkNotPossibleReason() @result string/nil - The reason because of work is impossible for this building or nil if it is. --]] function BaseBuilding:GetWorkNotPossibleReason() if not self:HasWorkforce() then return "NotEnoughWorkers" end if #(self.ion_storms or empty_table) > 0 then return "IonStorm" end if self.suspended then return self.suspended end if self.frozen then return "Frozen" end end --[[@@@ Returns whether the building is allowed to work by the user. @function bool BaseBuilding@IsWorkPermitted() @result bool - Wether the building is permitted to work by the user. --]] function BaseBuilding:IsWorkPermitted() -- by the user, e.g. building not disabled from infopanel, shift active etc. return not self:GetWorkNotPermittedReason() end --[[@@@ Returns the reason the building is not permitted to work. For example if the user turned it off with the infopanel button this func will return "TurnedOff". This is an [auto resolve](LuaClasses.md.html#toc1.3) method. This needs to be implemented for building classes that have unique reasons for not working. @function string/nil BaseBuilding@GetWorkNotPermittedReason() @result string/nil - The reason the building is not permitted to work or nil if it is. --]] function BaseBuilding:GetWorkNotPermittedReason() if not self.ui_working then return "TurnedOff" elseif self.exceptional_circumstances then return "ExceptionalCircumstancesDisabled" end end function BaseBuilding:HasWorkforce() --whether the building can currently has enough workers to work. return true end --[[@@@ Returns nil if the building can work, otherwise it returns a humanly readable non localized string representing the reason it cannot. @function string/nil BaseBuilding@GetNotWorkingReason() @result string/nil - Humanly readable string representing the reason a buildig is not working or nil if there is nothing preventing the building from working. --]] function BaseBuilding:GetNotWorkingReason() return self:GetWorkNotPermittedReason() or self:GetWorkNotPossibleReason() end --[[@@@ Returns wether work for this building is both possible and permitted. It uses GetWorkNotPossibleReason and GetWorkNotPermittedReason functions to determine this. Therefore, it is critical, if a new building class has unique reasons for not working, for it to implement these functions. @function bool BaseBuilding@CanWork() @result bool - Result. --]] function BaseBuilding:CanWork() return not self:GetNotWorkingReason() end function BaseBuilding:OnSetUIWorking(work) self:UpdateConsumption() end function BaseBuilding:IsSupplyGridDemandStoppedByGame() return self:IsMalfunctioned() or not self:HasWorkforce() or self.suspended or self.destroyed or (IsKindOf(self, "Demolishable") and self.demolishing) or self.frozen or (IsKindOf(self, "BuildingDepositExploiterComponent") and not self:HasNearbyDeposits() and not self.city:IsTechResearched("NanoRefinement")) or false end function BaseBuilding:UpdateConsumption(update) local is_electricity_consumer = self.is_electricity_consumer local is_lifesupport_consumer = self.is_lifesupport_consumer if is_electricity_consumer or is_lifesupport_consumer then --basically user can work local demand_stopped_by_user = not self:IsWorkPermitted() --this is the other can work, excluding electricity / ls canwork logic local demand_stopped_by_game = self:IsSupplyGridDemandStoppedByGame() if demand_stopped_by_user or demand_stopped_by_game then --turn everything off if is_electricity_consumer and self.electricity then self.electricity:SetConsumption(0) end if is_lifesupport_consumer then if self.water then self.water:SetConsumption(0) end if self.air then self.air:SetConsumption(0) end end else --we should consume stuff! if is_electricity_consumer and self.electricity then --always consume electricity. self.electricity:SetConsumption(self.electricity_consumption, update) end if is_lifesupport_consumer then local should_consume_ls = true if is_electricity_consumer then --should not consume lifesupport if el consumer and no el, exception is dome. should_consume_ls = self.electricity and self:HasPower() end if should_consume_ls then if self.water then self.water:SetConsumption(self.water_consumption) end if self.air then self.air:SetConsumption(self.air_consumption) end else if self.water then self.water:SetConsumption(0) end if self.air then self.air:SetConsumption(0) end end end end end end function BaseBuilding:SetSuspended(suspended, reason, duration) if IsValidThread(self.suspend_thread) and CurrentThread() ~= self.suspend_thread then if suspended or (not reason or self.suspended == reason) then --don't kill the thread if we'll leave the bld 4ever suspended DeleteThread(self.suspend_thread) end end if not IsValid(self) then return end if suspended then if not self.suspended then self:AttachSign(true, "SignNotWorking") PlayFX("Suspended", "start", self) end self.suspended = reason or "Suspended" if duration then self.suspend_thread = CreateGameTimeThread(function(self, duration, reason) Sleep(duration) self:SetSuspended(false, reason) end, self, duration, reason) end elseif self.suspended and (not reason or self.suspended == reason) then PlayFX("Suspended", "end", self) self:AttachSign(false, "SignNotWorking") self.suspended = false end self:UpdateConsumption() self:UpdateWorking() RebuildInfopanel(self) end function BaseBuilding:RefreshNightLightsState() end function BaseBuilding:AttachSign(bAttach, sign) assert(IsValid(self)) if bAttach and self.destroyed then return end --already dead. local signs = self.signs if bAttach then signs = signs or {} self.signs = signs if not signs[sign] then signs[sign] = true self:UpdateSignsVisibility() end elseif signs and signs[sign] then signs[sign] = nil self:UpdateSignsVisibility() end end function BaseBuilding:UpdateAttachedSigns() end function BaseBuilding:DetachAllSigns() self.signs = nil self:UpdateSignsVisibility() end function BaseBuilding:DoUpdateSignsVisibility() local max_priority, new_class = -1 for sign in pairs(self.signs or empty_table) do if type(sign)== "string" then local priority = g_Classes[sign].priority if priority > max_priority then max_priority = priority new_class = sign end end end if new_class and self:CountAttaches(new_class) > 0 then self:ForEachAttach("BuildingSign", function(attach) CObject.SetVisible(attach, g_SignsVisible) --also update sign offset attach:SetAttachOffset(self.sign_offset or point30) end) return end self:DestroyAttaches("BuildingSign") if new_class then local sign = AttachToObject(self, new_class, self.sign_spot) sign:SetScale(const.SignsOverviewCameraScaleDown) sign:SetVisible(g_SignsVisible) if self.sign_offset then sign:SetAttachOffset(self.sign_offset) end end end function BaseBuilding:UpdateSignsVisibility() self:Notify("DoUpdateSignsVisibility") end function BaseBuilding:UpdateWorkingStateAnim() self:ChangeWorkingStateAnim(self.working) end --controls animations function BaseBuilding:ChangeWorkingStateAnim(working) working = working or false if self.fx_working == working then return end if IsValidThread(self.anim_control_thread) then DeleteThread(self.anim_control_thread) end self.fx_working = working local fx_target if working then --also iterate attaches (for autoattached animated stuffs), assumes one obj with anims. local att_arr = self:GetAttaches() or {} table.insert(att_arr, 1, self) local idx = false if self.play_working_anim_on_this_attach then idx = table.find(att_arr, "class", self.play_working_anim_on_this_attach) end for i = idx or 1, idx or #(att_arr or "") do if att_arr[i]:HasEntity() then local obj = att_arr[i] if obj:HasState("start") then self.anim_control_thread = CreateGameTimeThread(function() local anim_phase = 0 local dur = GetAnimDuration(obj:GetEntity(), "start") if self.wait_working_anims_to_finish then --wait current to end, start next if obj:HasAnim("working") then return end --nothing to do, local wait_till_end = GetAnimDuration(obj:GetEntity(), obj:GetAnim(1)) - obj:GetAnimPhase(1) wait_till_end = MulDivRound(wait_till_end, 1000, obj:GetAnimSpeedModifier()) Sleep(wait_till_end) if not IsValid(obj) then return end elseif obj:HasAnim("end") then local his_dur = Min(GetAnimDuration(obj:GetEntity(), "end"), dur) anim_phase = Clamp(his_dur - obj:GetAnimPhase(1), 0, dur) dur = dur - anim_phase end if not self.wait_working_anims_to_finish or not obj:HasAnim("start") then obj:SetAnim(1, "start", const.eDontCrossfade) obj:SetAnimPhase(1, anim_phase) dur = MulDivRound(dur, 1000, obj:GetAnimSpeedModifier()) Sleep(dur) end if IsValid(obj) then obj:SetAnim(1, "working", const.eDontCrossfade) obj:SetAnimPhase(1, 0) if self.track_multiple_hit_moments_in_work_state then self:TrackMultipleHitMoments(obj, "Working", nil, type(self.track_multiple_hit_moments_in_work_state) == "table" and self.track_multiple_hit_moments_in_work_state or nil, true) end end end) fx_target = obj break elseif obj:HasState("working") then if not obj:HasAnim("working") then obj:SetAnim(1, "working", const.eDontCrossfade) obj:SetAnimPhase(1, 0) end obj:SetAnimSpeed(1, 1000) if self.track_multiple_hit_moments_in_work_state then self:TrackMultipleHitMoments(obj, "Working", nil, type(self.track_multiple_hit_moments_in_work_state) == "table" and self.track_multiple_hit_moments_in_work_state or nil, true) end fx_target = obj break end end end else if self.track_multiple_hit_moments_in_work_state then self:StopTrackingMultipleHitMoments() end local att_arr = self:GetAttaches() or {} table.insert(att_arr, 1, self) for i = 1, #(att_arr or "") do local obj = att_arr[i] if obj:HasEntity() then if obj:HasState("end") then self.anim_control_thread = CreateGameTimeThread(function() if not IsValid(obj) then return end local anim_phase = 0 local dur = GetAnimDuration(obj:GetEntity(), "end") if self.wait_working_anims_to_finish then --wait current to end, start next local wait_till_end = GetAnimDuration(obj:GetEntity(), obj:GetAnim(1)) - obj:GetAnimPhase(1) wait_till_end = MulDivRound(wait_till_end, 1000, obj:GetAnimSpeedModifier()) Sleep(wait_till_end) if not IsValid(obj) then return end elseif obj:HasAnim("start") then local his_dur = Min(GetAnimDuration(obj:GetEntity(), "start"), dur) anim_phase = Clamp(his_dur - obj:GetAnimPhase(1), 0, dur) dur = dur - anim_phase end if not self.wait_working_anims_to_finish or not obj:HasAnim("end") then obj:SetAnim(1, "end", const.eDontCrossfade) obj:SetAnimPhase(1, anim_phase) dur = MulDivRound(dur, 1000, obj:GetAnimSpeedModifier()) Sleep(dur) end if IsValid(obj) then obj:SetAnim(1, "idle", const.eDontCrossfade) obj:SetAnimPhase(1, 0) end end) fx_target = obj break elseif obj:HasAnim("working") then --is playing anim onb any channel obj:SetAnimSpeed(1, 0) --this way we don't blend/snap to idle --obj:SetAnim(1, "idle", const.eDontCrossfade) --this way we snap to idle. fx_target = obj break end end end end if self.force_fx_work_target then fx_target = self.force_fx_work_target elseif not fx_target then fx_target = self:GetEntity() end if type(fx_target) == "table" and self.force_fx_work_target ~= fx_target and not IsKindOf(fx_target, "Object") then --unpersistable target, ref it so gc does not kill it and hang the particle self.force_fx_work_target = fx_target end PlayFX("Working", working and "start" or "end", self, fx_target ~= self and fx_target or nil) --play breakdown sound if not working and self:IsWorkPermitted() and not self:IsWorkPossible() then PlayFX("Breakdown", "start", self) end end --from fvh local hit_moments = {} for i = 1, 2 do hit_moments[i] = "hit-moment" .. i end function OnMsg.GatherFXMoments(list) table.append(list, hit_moments) end function BaseBuilding:StopTrackingMultipleHitMoments() if IsValidThread(self.track_multiple_hit_thread) then DeleteThread(self.track_multiple_hit_thread) end end function BaseBuilding:TrackMultipleHitMoments(obj, actionFXClass, max, override_hit_moments, repeat_hit_table, repeat_anim) --use max for early termination (for example if you want to track less moments then the anim actually has, or if the anim is looping) --use override_hit_moments if you want a different list of hit moment enumaration then the one above. --use repeat_hit_table when you want the hit_moment_table to get repeated when i > #hit_moment_table, useful for left/right moments for example. --use repeat_anim when you have the animation looped (from code and not exported as looped) and want to process the hit moments as long as it plays self:StopTrackingMultipleHitMoments() self.track_multiple_hit_thread = CreateGameTimeThread(function(self, obj) local anim = obj:GetAnim(1) local number_of_hits = obj:GetAnimMomentsCount(anim, "Hit") if number_of_hits == 0 then print("<color 103 252 3>Trying to track multiple hit moments for obj " .. obj.class .. ", that does not have multiple hit moments!!!</color>") return end local i = 1 local hit_moment_table = override_hit_moments or hit_moments while max == nil or i <= max do local phase = obj:GetAnimMoment(obj:GetAnim(1), "Hit", i) i = ((i - 1) % number_of_hits) + 1 if not phase and repeat_anim then local dur = obj:GetAnimDuration() - 1 local to_wait = dur - obj:GetAnimPhase() assert(to_wait > 0) Sleep(to_wait) if not IsValid(obj) or obj:GetAnim(1) ~= anim then break end obj:SetAnimPhase(1, 0) i = 1 phase = obj:GetAnimMoment(obj:GetAnim(1), "Hit", i) -- recheck below in case the animation has no hit moments at all end if not phase then break end if phase >= obj:GetAnimPhase() then AnimMomentHook.WaitAnimMoment(obj, "Hit") --sleep if not IsValid(obj) or obj:GetAnim(1) ~= anim then break end PlayFX(actionFXClass, hit_moment_table[repeat_hit_table and ((i-1)%#hit_moment_table+1) or i], self, obj) end i = i + 1 end end, self, obj) end --[[@@@ Building event called when the working state of a building changes. This is an [auto resolve](LuaClasses.md.html#toc1.3) method. @function void BaseBuilding@OnSetWorking(bool working) @param bool working - The value of the new state of working ( it is == to self.working, but faster to access ). --]] function BaseBuilding:OnSetWorking(working) if working then self:AttachSign(false, "SignNotWorking") end if not self.refreshing_working_state then self:Notify("UpdateWorkingStateAnim") end RebuildInfopanel(self) end function BaseBuilding:Gossip(gossip, ...) if not netAllowGossip then return end NetGossip("BaseBuilding", self.class, self.handle, gossip, GameTime(), ...) end function BaseBuilding:GossipName() return self.class end
require 'nn' require('../../CDataLoader.lua') local exprSetting = require('./lSettings.lua') local cDataLoader = CDataLoader.new(exprSetting) local taX_Sparse = cDataLoader:loadSparseInput() --local teTarget = cDataLoader:loadTarget() --print(teTarget) ----[[ table.insert(taX_Sparse, torch.Tensor({{1, 0}})) local module = nn.SparseLinear(exprSetting.nInputWidth, 1, true) local teOut = module:forward(taX_Sparse) print(teOut) --]]
--[[ Author: Bude Date: 30.09.2015 Removes HP for using Burning Spear This is called everytime the ability is used (manual left-click or via auto-cast right-click) ]] function DoHealthCost( event ) -- Variables local caster = event.caster local ability = event.ability local health_cost = ability:GetLevelSpecialValueFor( "health_cost" , ability:GetLevel() - 1 ) local health = caster:GetHealth() local new_health = (health - health_cost) -- "do damage" -- aka set the casters HP to the new value -- ModifyHealth's third parameter lets us decide if the healthcost should be lethal caster:ModifyHealth(new_health, ability, false, 0) end --[[ Author: Bude Date: 30.09.2015 Increases stack count on the visual modifier This is called everytime an enemy is hit by burning_spear ]] function IncreaseStackCount( event ) -- Variables local caster = event.caster local target = event.target local ability = event.ability local modifier_name = event.modifier_counter_name local dur = ability:GetDuration() local modifier = target:FindModifierByName(modifier_name) local count = target:GetModifierStackCount(modifier_name, caster) -- if the unit does not already have the counter modifier we apply it with a stackcount of 1 -- else we increase the stack and refresh the counters duration if not modifier then ability:ApplyDataDrivenModifier(caster, target, modifier_name, {duration=dur}) target:SetModifierStackCount(modifier_name, caster, 1) else target:SetModifierStackCount(modifier_name, caster, count+1) modifier:SetDuration(dur, true) end end --[[ Author: Bude Date: 30.09.2015 Decreases stack count on the visual modifier This is called whenever the debuff modifier runs out ]] function DecreaseStackCount(event) --Variables local caster = event.caster local target = event.target local modifier_name = event.modifier_counter_name local modifier = target:FindModifierByName(modifier_name) local count = target:GetModifierStackCount(modifier_name, caster) -- just some saftey checks -just in case if modifier then -- if there is something to reduce reduce -- else just remove the modifier if count and count > 1 then target:SetModifierStackCount(modifier_name, caster, count-1) else target:RemoveModifierByName(modifier_name) end end end
-- 生成字牌表 local table_mgr = require "table_mgr" local gui_tested = {} local gui_eye_tested = {} for i = 0, 8 do gui_tested[i] = {} gui_eye_tested[i] = {} end local function check_add(encode_cards, gui_num, eye) local key = 0 for i = 1, 7 do key = key * 10 + encode_cards[i] end if key == 0 then return false end local m if not eye then m = gui_tested[gui_num] else m = gui_eye_tested[gui_num] end if m[key] then return false end m[key] = true for i = 1, 7 do if encode_cards[i] > 4 then return true end end table_mgr:add(key, gui_num, eye, false) return true end local function parse_table_sub(encode_cards, num, eye) for i=1,7 do repeat if encode_cards[i] == 0 then break end encode_cards[i] = encode_cards[i] - 1 if not check_add(encode_cards, num, eye) then encode_cards[i] = encode_cards[i] + 1 break end if num < 8 then parse_table_sub(encode_cards, num + 1, eye) end encode_cards[i] = encode_cards[i] + 1 until(true) end end local function parse_table(encode_cards, eye) if not check_add(encode_cards, 0, eye) then return end parse_table_sub(encode_cards, 1, eye) end local function gen_table_sub(encode_cards, level, eye) for i=1,7 do repeat if encode_cards[i] > 3 then break end encode_cards[i] = encode_cards[i] + 3 parse_table(encode_cards, eye) if level < 4 then gen_table_sub(encode_cards, level + 1, eye) end encode_cards[i] = encode_cards[i] - 3 until(true) end end local function gen_table() local t = { 0, 0, 0, 0, 0, 0, 0 } gen_table_sub(t, 1, false) end local function gen_eye_table() local t = { 0, 0, 0, 0, 0, 0, 0 } for i = 1, 7 do t[i] = 2 parse_table(t, true) gen_table_sub(t, 1, true) t[i] = 0 end end local function main() table_mgr:init() gen_table() gen_eye_table() table_mgr:dump_feng_table() end main()
--- --- Created by purcarea. --- DateTime: 30/03/2018 --- local cjson = require "cjson" local BaseValidatorMock, RedisConnectionProviderMock local EXPECTED_RESPONSES = { MISSING_KEY = { error_code = "403000", message = '{"message":"Api KEY is missing","error_code":"403000"}' }, UNKNOWN_ERROR = { error_code = "503000", message = '{"message":"Could not validate API KEY","error_code":"503000"}' }, INVALID_KEY = { error_code = "403003", message = '{"message":"Api KEY is invalid","error_code":"403003"}' } } beforeEach(function() BaseValidatorMock = mock("api-gateway.validation.validator", { "new", "exitFn", "getKeyFromLocalCache", "setContextProperties", "getKeyFromRedis", "setKeyInLocalCache" }) RedisConnectionProviderMock = mock("api-gateway.redis.redisConnectionProvider", { "new", "getConnection", "closeConnection" }) ngx.HTTP_SERVICE_UNAVAILABLE = 503 ngx.HTTP_NOT_FOUND = 404 BaseValidatorMock.__exitFn.doReturn = function(self, arg1, arg2) return arg1, arg2 end end) test('validateRequest: should return 403000 if api key is missing', function() -- given ngx.var.api_key = nil ngx.var.service_id = "test-service" -- when local classUnderTest = require('api-gateway.validation.key.redisApiKeyValidator'):new() local error_code, response_body = classUnderTest:validateRequest() -- then assertEquals(error_code, EXPECTED_RESPONSES.MISSING_KEY.error_code) assertEquals(response_body, EXPECTED_RESPONSES.MISSING_KEY.message) calls(BaseValidatorMock.__exitFn, 1, EXPECTED_RESPONSES.MISSING_KEY.error_code, EXPECTED_RESPONSES.MISSING_KEY.message) end) test('validateRequest: should return OK and skip searching in redis if api key is in local cache', function() -- given ngx.var.api_key = "test-api-key" ngx.var.service_id = "test-service" BaseValidatorMock.__getKeyFromLocalCache.doReturn = function() return '{"key": "test-api-key", "realm": "sandbox", "service_id": "test-service", "service_name": "test-service-name"}' end -- when local classUnderTest = require('api-gateway.validation.key.redisApiKeyValidator'):new() local response_code, response_body = classUnderTest:validateRequest() -- then assertEquals(ngx.HTTP_OK, response_code) assertEquals('{"valid":true}', response_body) calls(BaseValidatorMock.__exitFn, 1, ngx.HTTP_OK, '{"valid":true}') calls(BaseValidatorMock.__getKeyFromLocalCache, 1, "test-api-key:test-service", "cachedkeys") calls(BaseValidatorMock.__getKeyFromRedis, 0) local expected_api_key_object = cjson.decode('{"key": "test-api-key", "realm": "sandbox", "service_id": "test-service", "service_name": "test-service-name"}') calls(BaseValidatorMock.__setContextProperties, 1, expected_api_key_object) end) test('validateRequest: should return OK and search in redis if api key is not in local cache and redis hash has metadata field', function() -- given ngx.var.api_key = "test-api-key" ngx.var.service_id = "test-service" BaseValidatorMock.__getKeyFromLocalCache.doReturn = function() return nil end BaseValidatorMock.__getKeyFromRedis.doReturn = function() return '{"key": "test-api-key", "realm": "sandbox", "service_id": "test-service", "service_name": "test-service-name"}' end -- when local classUnderTest = require('api-gateway.validation.key.redisApiKeyValidator'):new() local response_code, response_body = classUnderTest:validateRequest() -- then assertEquals(response_code, ngx.HTTP_OK) assertEquals(response_body, '{"valid":true}') calls(BaseValidatorMock.__exitFn, 1, ngx.HTTP_OK, '{"valid":true}') calls(BaseValidatorMock.__getKeyFromLocalCache, 1, "test-api-key:test-service", "cachedkeys") calls(BaseValidatorMock.__setKeyInLocalCache, 1) calls(BaseValidatorMock.__getKeyFromRedis, 1) local expected_api_key_object = cjson.decode('{"key": "test-api-key", "realm": "sandbox", "service_id": "test-service", "service_name": "test-service-name"}') calls(BaseValidatorMock.__setContextProperties, 1, expected_api_key_object) end) test('validateRequest: should return OK and search in redis for the old format if api key is not in local cache and redis hash does not have metadata field', function() -- given ngx.var.api_key = "test-api-key" ngx.var.service_id = "test-service" BaseValidatorMock.__getKeyFromLocalCache.doReturn = function() return nil end BaseValidatorMock.__getKeyFromRedis.doReturn = function() return nil end RedisConnectionProviderMock.__getConnection.doReturn = function() local redis = {} redis.hmget = function (redis_key, ...) return {"test-api-key", "sandbox", "test-service", "test-service-name"}, nil end return true, redis end -- when local classUnderTest = require('api-gateway.validation.key.redisApiKeyValidator'):new() local response_code, response_body = classUnderTest:validateRequest() -- then assertEquals(response_code, ngx.HTTP_OK) assertEquals(response_body, '{"valid":true}') calls(BaseValidatorMock.__exitFn, 1, ngx.HTTP_OK, '{"valid":true}') calls(BaseValidatorMock.__getKeyFromLocalCache, 1, "test-api-key:test-service", "cachedkeys") calls(BaseValidatorMock.__setKeyInLocalCache, 1) calls(BaseValidatorMock.__getKeyFromRedis, 1) calls(RedisConnectionProviderMock.__getConnection, 1) calls(RedisConnectionProviderMock.__closeConnection, 1) local expected_api_key_object = cjson.decode('{"key": "test-api-key", "realm": "sandbox", "service_id": "test-service", "service_name": "test-service-name"}') calls(BaseValidatorMock.__setContextProperties, 1, expected_api_key_object) end) test('validateRequest: should return 503000 if api key is not in local cache and connecting to redis fails', function() -- given ngx.var.api_key = "test-api-key" ngx.var.service_id = "test-service" BaseValidatorMock.__getKeyFromLocalCache.doReturn = function() return nil end BaseValidatorMock.__getKeyFromRedis.doReturn = function() return nil end RedisConnectionProviderMock.__getConnection.doReturn = function() local redis = {} redis.hmget = function (redis_key, ...) return {"test-api-key", "sandbox", "test-service", "test-service-name"}, nil end return false, redis end -- when local classUnderTest = require('api-gateway.validation.key.redisApiKeyValidator'):new() local response_code, response_body = classUnderTest:validateRequest() -- then assertEquals(response_code, EXPECTED_RESPONSES.UNKNOWN_ERROR.error_code) assertEquals(response_body, EXPECTED_RESPONSES.UNKNOWN_ERROR.message) calls(BaseValidatorMock.__exitFn, 1, EXPECTED_RESPONSES.UNKNOWN_ERROR.error_code, EXPECTED_RESPONSES.UNKNOWN_ERROR.message) calls(BaseValidatorMock.__getKeyFromLocalCache, 1, "test-api-key:test-service", "cachedkeys") calls(BaseValidatorMock.__getKeyFromRedis, 1) calls(RedisConnectionProviderMock.__getConnection, 1) calls(BaseValidatorMock.__setKeyInLocalCache, 0) calls(RedisConnectionProviderMock.__closeConnection, 0) calls(BaseValidatorMock.__setContextProperties, 0) end) test('validateRequest: should return 503000 if api key is not in local cache and redis operation returns an error', function() -- given ngx.var.api_key = "test-api-key" ngx.var.service_id = "test-service" BaseValidatorMock.__getKeyFromLocalCache.doReturn = function() return nil end BaseValidatorMock.__getKeyFromRedis.doReturn = function() return nil end RedisConnectionProviderMock.__getConnection.doReturn = function() local redis = {} redis.hmget = function (redis_key, ...) return nil, "error" end return true, redis end -- when local classUnderTest = require('api-gateway.validation.key.redisApiKeyValidator'):new() local response_code, response_body = classUnderTest:validateRequest() -- then assertEquals(response_code, EXPECTED_RESPONSES.UNKNOWN_ERROR.error_code) assertEquals(response_body, EXPECTED_RESPONSES.UNKNOWN_ERROR.message) calls(BaseValidatorMock.__exitFn, 1, EXPECTED_RESPONSES.UNKNOWN_ERROR.error_code, EXPECTED_RESPONSES.UNKNOWN_ERROR.message) calls(BaseValidatorMock.__getKeyFromLocalCache, 1, "test-api-key:test-service", "cachedkeys") calls(BaseValidatorMock.__getKeyFromRedis, 1) calls(RedisConnectionProviderMock.__getConnection, 1) calls(BaseValidatorMock.__setKeyInLocalCache, 0) calls(RedisConnectionProviderMock.__closeConnection, 1) calls(BaseValidatorMock.__setContextProperties, 0) end) test('validateRequest: should return 403003 if api key is not in local cache and redis operation returns a nil value', function() -- given ngx.var.api_key = "test-api-key" ngx.var.service_id = "test-service" BaseValidatorMock.__getKeyFromLocalCache.doReturn = function() return nil end BaseValidatorMock.__getKeyFromRedis.doReturn = function() return nil end RedisConnectionProviderMock.__getConnection.doReturn = function() local redis = {} redis.hmget = function (redis_key, ...) return nil, nil end return true, redis end -- when local classUnderTest = require('api-gateway.validation.key.redisApiKeyValidator'):new() local response_code, response_body = classUnderTest:validateRequest() -- then assertEquals(response_code, EXPECTED_RESPONSES.INVALID_KEY.error_code) assertEquals(response_body, EXPECTED_RESPONSES.INVALID_KEY.message) calls(BaseValidatorMock.__exitFn, 1, EXPECTED_RESPONSES.INVALID_KEY.error_code, EXPECTED_RESPONSES.INVALID_KEY.message) calls(BaseValidatorMock.__getKeyFromLocalCache, 1, "test-api-key:test-service", "cachedkeys") calls(BaseValidatorMock.__getKeyFromRedis, 1) calls(RedisConnectionProviderMock.__getConnection, 1) calls(RedisConnectionProviderMock.__closeConnection, 1) calls(BaseValidatorMock.__setKeyInLocalCache, 0) calls(BaseValidatorMock.__setContextProperties, 0) end) test('validateRequest: should return 403003 if api key is not in local cache and redis entry in an empty table', function() -- given ngx.var.api_key = "test-api-key" ngx.var.service_id = "test-service" BaseValidatorMock.__getKeyFromLocalCache.doReturn = function() return nil end BaseValidatorMock.__getKeyFromRedis.doReturn = function() return nil end RedisConnectionProviderMock.__getConnection.doReturn = function() local redis = {} redis.hmget = function (redis_key, ...) return {}, nil end return true, redis end -- when local classUnderTest = require('api-gateway.validation.key.redisApiKeyValidator'):new() local response_code, response_body = classUnderTest:validateRequest() -- then assertEquals(response_code, EXPECTED_RESPONSES.INVALID_KEY.error_code) assertEquals(response_body, EXPECTED_RESPONSES.INVALID_KEY.message) calls(BaseValidatorMock.__exitFn, 1, EXPECTED_RESPONSES.INVALID_KEY.error_code, EXPECTED_RESPONSES.INVALID_KEY.message) calls(BaseValidatorMock.__getKeyFromLocalCache, 1, "test-api-key:test-service", "cachedkeys") calls(BaseValidatorMock.__getKeyFromRedis, 1) calls(RedisConnectionProviderMock.__getConnection, 1) calls(RedisConnectionProviderMock.__closeConnection, 1) calls(BaseValidatorMock.__setKeyInLocalCache, 0) calls(BaseValidatorMock.__setContextProperties, 0) end)
-- @Scootworks SafeAddString(SI_JOGROUP_SLASH1, "Vielen Dank, dass du JoGroup verwendest!"); SafeAddString(SI_JOGROUP_SLASH2, "-- |cFAF0E6/jogroup unlock|r, damit du das Gruppenfenster verschieben kannst"); SafeAddString(SI_JOGROUP_SLASH3, "-- |cFAF0E6/jogroup lock|r, um das Gruppenfenster zu fixieren"); SafeAddString(SI_JOGROUP_UNLOCKED, "JoGroup entsperrt"); SafeAddString(SI_JOGROUP_LOCKED, "JoGroup gesperrt"); SafeAddString(SI_JOGROUP_GROUPFRAMES, "Gruppenfenster"); SafeAddString(SI_JOGROUP_UNLOCK, "Entsperre Gruppenfenster (zum Verschieben)"); SafeAddString(SI_JOGROUP_UNLOCKTIP, "Du kannst auch folgende verwenden: \'/jogroup unlock\' and \'/jogroup lock\'"); SafeAddString(SI_JOGROUP_SHOWDEFAULT, "Originale ESO Gruppenfenster anzeigen"); SafeAddString(SI_JOGROUP_NOTIFICATIONS, "Zeige Mitteilungen im Chat"); SafeAddString(SI_JOGROUP_OORALPHA, "Deckkraft ausserhalb Reichweite"); SafeAddString(SI_JOGROUP_UNITSPCOL, "Anzahl Charakter pro Spalte"); SafeAddString(SI_JOGROUP_UNITSX, "Horizontale Erweiterungsrichtung"); SafeAddString(SI_JOGROUP_UNITSY, "Vertikale Erweiterungsrichtung"); SafeAddString(SI_JOGROUP_GLOSSALPHA, "Glanzstärke der Lebensleisten"); SafeAddString(SI_JOGROUP_PADDING, "Raum zwischen Charakteranzeigen"); SafeAddString(SI_JOGROUP_SHOWHEALTHVALUES, "Ressourcenanzeige in Zahlen"); SafeAddString(SI_JOGROUP_SHOWFOOD, "Zeige Zustand der Mahlzeiten"); SafeAddString(SI_JOGROUP_SHOWREGEN, "Zeige Re-/Degeneration Pfeile"); SafeAddString(SI_JOGROUP_SHOWBOTH, "Zeige immer Magicka- & Ausdauerleisten"); SafeAddString(SI_JOGROUP_FONTFAM, "Schriftart"); SafeAddString(SI_JOGROUP_FONTSIZE, "Schrifthöhe / Höhe Charakteranzeigen"); SafeAddString(SI_JOGROUP_UNITWIDTH, "Breite Charakteranzeigen"); SafeAddString(SI_JOGROUP_TANKCOLOUR, "Verteidiger Lebensleistenfarbe"); SafeAddString(SI_JOGROUP_HEALERCOLOUR, "Heiler Lebensleistenfarbe"); SafeAddString(SI_JOGROUP_DPSCOLOUR, "Kämpfer Lebensleistenfarbe"); SafeAddString(SI_JOGROUP_REINCARNATING, "Erholung"); -- Limitierter Platz! SafeAddString(SI_JOGROUP_BEINGRESSED, "Bereit"); -- Limitierter Platz! SafeAddString(SI_JOGROUP_RESPENDING, "Wiederbeleben"); -- Limitierter Platz! SafeAddString(SI_JOGROUP_JOINED, "<<1>> ist der Gruppe beigetreten."); -- @Baertram SafeAddString(SI_JOGROUP_MARK, "Markieren"); SafeAddString(SI_JOGROUP_UNMARK, "Markierung entfernen");
----------------------------------- -- Area: Northern San d'Oria -- NPC: Attarena -- Only sells when San d'Oria controlls Li'Telor Region ----------------------------------- local ID = require("scripts/zones/Northern_San_dOria/IDs") require("scripts/globals/events/harvest_festivals") require("scripts/globals/npc_util") require("scripts/globals/conquest") require("scripts/globals/quests") require("scripts/globals/shop") function onTrade(player,npc,trade) if player:getQuestStatus(SANDORIA, tpz.quest.id.sandoria.FLYERS_FOR_REGINE) == QUEST_ACCEPTED and npcUtil.tradeHas(trade, 532) then player:messageSpecial(ID.text.FLYER_REFUSED) else onHalloweenTrade(player,trade,npc); end end; function onTrigger(player,npc) if GetRegionOwner(tpz.region.LITELOR) ~= tpz.nation.SANDORIA then player:showText(npc, ID.text.ATTARENA_CLOSED_DIALOG) else local stock = { 623, 119, -- Bay Leaves 4154, 6440, -- Holy Water } player:showText(npc, ID.text.ATTARENA_OPEN_DIALOG) tpz.shop.general(player, stock, SANDORIA) end end; function onEventUpdate(player,csid,option) end function onEventFinish(player,csid,option) end
--[[ Variables ]] --[[ Functions ]] function isChargeActive(pEntity, pContext) return exports["caue-base"]:getChar("job") == "bennys" end function isInGroup(pEntity, pContext) return exports["caue-groups"]:GroupRank("bennys") > 0 end --[[ Events ]] AddEventHandler("caue-mechanic:sign", function() TriggerEvent("caue-signin:peekAction", nil, nil, { zones = { job_sign_in = { job = "bennys_sign_in" } } }) end) AddEventHandler("caue-mechanic:storage", function() TriggerEvent("server-inventory-open", "1", "bennys_stash") end) --[[ Threads ]] Citizen.CreateThread(function() exports["caue-npcs"]:RegisterNPC({ id = "bennys", name = "bennys", pedType = 4, model = "ig_benny", networked = false, distance = 50.0, position = { coords = vector3(-196.71, -1319.82, 30.09), heading = 90.00, random = false, }, appearance = nil, settings = { { mode = "invincible", active = true }, { mode = "ignore", active = true }, { mode = "freeze", active = true }, }, flags = { ["isNPC"] = true, }, scenario = "WORLD_HUMAN_STAND_IMPATIENT_UPRIGHT_FACILITY", }) exports["caue-eye"]:AddPeekEntryByFlag({ "isNPC" }, { { id = "bennys_sign", label = "Entrar/Sair de serviço", icon = "pager", event = "caue-mechanic:sign", } }, { distance = { radius = 2.5 }, npcIds = { "bennys" }, isEnabled = isInGroup }) exports["caue-eye"]:AddPeekEntryByFlag({ "isNPC" }, { { id = "bennys_shop", label = "Peças de Veiculo", icon = "tools", event = "caue-npcs:ped:keeper", parameters = { "321" } } }, { distance = { radius = 2.5 }, npcIds = { "bennys" }, isEnabled = isChargeActive }) exports["caue-polytarget"]:AddBoxZone("caue-mechanic-storage", vector3(-199.45, -1319.17, 31.09), 0.65, 1.8, { heading=0, minZ=30.09, maxZ=31.14, }) exports["caue-eye"]:AddPeekEntryByPolyTarget("caue-mechanic-storage", {{ event = "caue-mechanic:storage", id = "bennys_storage", icon = "box-open", label = "Estoque", }}, { distance = { radius = 3.5 }, isEnabled = isChargeActive }) end)
object_tangible_quest_imperial_itp_emperor_datadisk = object_tangible_quest_imperial_shared_itp_emperor_datadisk:new { } ObjectTemplates:addTemplate(object_tangible_quest_imperial_itp_emperor_datadisk, "object/tangible/quest/imperial/itp_emperor_datadisk.iff")
local t = require(script.Parent.Parent.Parent.t) local ISubscription: (obj: any) -> (boolean, string?) = require(script.Parent.ISubscription) local IContext: (obj: any) -> (boolean, string?) = require(script.Parent.IContext) local IParticle: (obj: any) -> (boolean, string?) = require(script.Parent.IParticle) type ISubscription = ISubscription.ISubscription type IContext = IContext.IContext type IParticle = IParticle.IParticle local likeWormhole: (obj: any) -> (boolean, string?) = t.interface({ _Storage = t.instanceIsA("Folder"), _Contexts = t.map(t.string, IContext), Middleware = t.interface({}), }) --[=[ @interface IWormhole @within Portal ._Storage Folder -- The storage folder for Portal's RemoteEvents. ._Contexts {[string]: IContext} -- The Context managed by this Wormhole. .Middleware any -- The Middleware pipeline of this Wormhole. ]=] export type IWormhole = { _Storage: Folder, _Contexts: { [string]: IContext }, Middleware: { string }, __index: IWormhole, new: (middlewarre: any) -> IWormhole, like: (obj: any) -> (boolean, string?), addContext: (wormhole: IWormhole, context: string) -> IContext, makeSubscription: ( context: string, action: string, callback: (particle: IParticle, sender: Player?) -> nil? ) -> ISubscription, subscribe: ( wormhole: IWormhole, subscription: ISubscription, callback: (particle: IParticle, sender: Player?) -> nil ) -> () -> nil, applyMiddleware: (wormhole: IWormhole, portal: { [string]: string }, data: any) -> IParticle, dispatch: (wormhole: IWormhole, context: IContext, action: string, data: any, sender: Player?) -> nil, } return function(obj): (boolean, string?) return likeWormhole(obj) end
--[[-- by ALA @ 163UI/网易有爱, http://wowui.w.163.com/163ui/ CREDIT shagu/pfQuest(MIT LICENSE) @ https://github.com/shagu --]]-- ---------------------------------------------------------------------------------------------------- local __addon, __ns = ...; local _G = _G; local _ = nil; ---------------------------------------------------------------------------------------------------- --[=[dev]=] if __ns.__is_dev then __ns._F_devDebugProfileStart('module.util'); end --> variables local type = type; local next = next; local strsplit, strmatch, gsub, format = string.split, string.match, string.gsub, string.format; local tonumber = tonumber; local GetItemInfoInstant = GetItemInfoInstant; local UnitGUID = UnitGUID; local UnitIsPlayer = UnitIsPlayer; local GetFactionInfoByID = GetFactionInfoByID; local IsShiftKeyDown, IsControlKeyDown, IsAltKeyDown = IsShiftKeyDown, IsControlKeyDown, IsAltKeyDown; local GetQuestLogTitle = GetQuestLogTitle; local GetItemCount = GetItemCount; local GetMouseFocus = GetMouseFocus; local IsModifiedClick = IsModifiedClick; local Ambiguate = Ambiguate; local CreateFrame = CreateFrame; local ChatEdit_GetActiveWindow = ChatEdit_GetActiveWindow; local ChatEdit_InsertLink = ChatEdit_InsertLink; local ChatFrame_AddMessageEventFilter = ChatFrame_AddMessageEventFilter; local GameTooltip = GameTooltip; local GameTooltipTextLeft1 = GameTooltipTextLeft1; local ItemRefTooltip = ItemRefTooltip; local ChatFrame2 = ChatFrame2; local FauxScrollFrame_GetOffset = FauxScrollFrame_GetOffset; local QuestLogFrame = QuestLogFrame; local QuestLogDetailScrollChildFrame = QuestLogDetailScrollChildFrame; local QuestLogDescriptionTitle = QuestLogDescriptionTitle; local RAID_CLASS_COLORS = RAID_CLASS_COLORS; local CLASS_ICON_TCOORDS = CLASS_ICON_TCOORDS; local __db = __ns.db; local __db_quest = __db.quest; local __db_unit = __db.unit; local __db_item = __db.item; local __db_object = __db.object; local __db_refloot = __db.refloot; local __db_event = __db.event; local __db_level_quest_list = __db.level_quest_list; local __db_avl_quest_hash = __db.avl_quest_hash; local __db_blacklist_item = __db.blacklist_item; local __db_large_pin = __db.large_pin; local __db_item_related_quest = __db.item_related_quest; local __loc = __ns.L; local __loc_quest = __loc.quest; local __loc_unit = __loc.unit; local __loc_item = __loc.item; local __loc_object = __loc.object; local __loc_profession = __loc.profession; local __UILOC = __ns.UILOC; local __core = __ns.core; local _F_SafeCall = __core._F_SafeCall; local __eventHandler = __core.__eventHandler; local __const = __core.__const; local IMG_INDEX = __core.IMG_INDEX; local IMG_LIST = __core.IMG_LIST; local TIP_IMG_LIST = __core.TIP_IMG_LIST; local GetQuestStartTexture = __core.GetQuestStartTexture; local __core_meta = __ns.__core_meta; local __obj_lookup = __ns.__obj_lookup; local __core_quests_completed = __ns.__core_quests_completed; local __map_meta = __ns.__map_meta; local __comm_meta = __ns.__comm_meta; local __comm_obj_lookup = __ns.__comm_obj_lookup; local UnitHelpFac = __core.UnitHelpFac; local _log_ = __ns._log_; local TIP_IMG_S_NORMAL = TIP_IMG_LIST[IMG_INDEX.IMG_S_NORMAL]; local IMG_TAG_CPL = "\124T" .. __core.IMG_PATH .. "TAG_CPL" .. ":0\124t"; local IMG_TAG_PRG = "\124T" .. __core.IMG_PATH .. "TAG_PRG" .. ":0\124t"; local IMG_TAG_UNCPL = "\124T" .. __core.IMG_PATH .. "TAG_UNCPL" .. ":0\124t"; local SET = nil; --> if __ns.__is_dev then __ns:BuildEnv("util"); end --> MAIN --> methods local function GetLevelTag(quest, info, modifier, colored) local lvl_str = "["; local tag = __ns.GetQuestTagInfo(quest); if tag ~= nil then tag = __UILOC.QUEST_TAG[tag]; end local min = info.min; local lvl = info.lvl; if lvl <= 0 then lvl = min; end if colored ~= false then if lvl >= SET.quest_lvl_red then lvl_str = lvl_str .. "\124cffff0000" .. (tag ~= nil and (lvl .. tag) or lvl) .. "\124r"; elseif lvl >= SET.quest_lvl_orange then lvl_str = lvl_str .. "\124cffff7f7f" .. (tag ~= nil and (lvl .. tag) or lvl) .. "\124r"; elseif lvl >= SET.quest_lvl_yellow then lvl_str = lvl_str .. "\124cffffff00" .. (tag ~= nil and (lvl .. tag) or lvl) .. "\124r"; elseif lvl >= SET.quest_lvl_green then lvl_str = lvl_str .. "\124cff7fbf3f" .. (tag ~= nil and (lvl .. tag) or lvl) .. "\124r"; else lvl_str = lvl_str .. "\124cff7f7f7f" .. (tag ~= nil and (lvl .. tag) or lvl) .. "\124r"; end if modifier then lvl_str = lvl_str .. "/"; local diff = min - __ns.__player_level; if diff > 0 then if diff > 1 then lvl_str = lvl_str .. "\124cffff3f3f" .. min .. "\124r"; else lvl_str = lvl_str .. "\124cffff0f0f" .. min .. "\124r"; end else if min >= SET.quest_lvl_red then lvl_str = lvl_str .. "\124cffff0000" .. min .. "\124r"; elseif min >= SET.quest_lvl_orange then lvl_str = lvl_str .. "\124cffff7f7f" .. min .. "\124r"; elseif min >= SET.quest_lvl_yellow then lvl_str = lvl_str .. "\124cffffff00" .. min .. "\124r"; elseif min >= SET.quest_lvl_green then lvl_str = lvl_str .. "\124cff7fbf3f" .. min .. "\124r"; else lvl_str = lvl_str .. "\124cff7f7f7f" .. min .. "\124r"; end end end else if lvl >= SET.quest_lvl_red then lvl_str = lvl_str .. (tag ~= nil and (lvl .. tag) or lvl); elseif lvl >= SET.quest_lvl_orange then lvl_str = lvl_str .. (tag ~= nil and (lvl .. tag) or lvl); elseif lvl >= SET.quest_lvl_yellow then lvl_str = lvl_str .. (tag ~= nil and (lvl .. tag) or lvl); elseif lvl >= SET.quest_lvl_green then lvl_str = lvl_str .. (tag ~= nil and (lvl .. tag) or lvl); else lvl_str = lvl_str .. (tag ~= nil and (lvl .. tag) or lvl); end if modifier then lvl_str = lvl_str .. "/"; local diff = min - __ns.__player_level; if diff > 0 then if diff > 1 then lvl_str = lvl_str .. min; else lvl_str = lvl_str .. min; end else if min >= SET.quest_lvl_red then lvl_str = lvl_str .. min; elseif min >= SET.quest_lvl_orange then lvl_str = lvl_str .. min; elseif min >= SET.quest_lvl_yellow then lvl_str = lvl_str .. min; elseif min >= SET.quest_lvl_green then lvl_str = lvl_str .. min; else lvl_str = lvl_str .. min; end end end end lvl_str = lvl_str .. "]"; return lvl_str; end local function GetPlayerTag(name, class) if class == nil then return " > " .. name; else local color = RAID_CLASS_COLORS[class]; local coord = CLASS_ICON_TCOORDS[class]; return format(" > \124TInterface\\TargetingFrame\\UI-Classes-Circles:0:0:0:0:256:256:%d:%d:%d:%d\124t \124cff%.2x%.2x%.2x%s\124r", coord[1] * 255, coord[2] * 255, coord[3] * 255, coord[4] * 255, color.r * 255, color.g * 255, color.b * 255, name ); end end --> --> --> performance board -- display local function Create() local frame = CreateFrame("FRAME", nil, UIParent); frame:SetSize(256, 512); frame:SetPoint("CENTER"); end --> events and hooks local function GameTooltipSetQuestTip(tip, uuid, META) local modifier = IsShiftKeyDown(); local refs = uuid[4]; if next(refs) ~= nil then META = META or __core_meta; for quest, ref in next, refs do local meta = META[quest]; local info = __db_quest[quest]; local color = IMG_LIST[GetQuestStartTexture(info)]; --[[ local lvl_str = "\124cff000000**\124r[ "; local lvl = info.lvl; local min = info.min; lvl_str = lvl_str .. __UILOC.TIP_QUEST_LVL; if lvl >= SET.quest_lvl_red then lvl_str = lvl_str .. "\124cffff0000" .. lvl .. "\124r "; elseif lvl >= SET.quest_lvl_orange then lvl_str = lvl_str .. "\124cffff7f7f" .. lvl .. "\124r "; elseif lvl >= SET.quest_lvl_yellow then lvl_str = lvl_str .. "\124cffffff00" .. lvl .. "\124r "; elseif lvl >= SET.quest_lvl_green then lvl_str = lvl_str .. "\124cff7fbf3f" .. lvl .. "\124r "; else lvl_str = lvl_str .. "\124cff7f7f7f" .. lvl .. "\124r "; end lvl_str = lvl_str .. __UILOC.TIP_QUEST_MIN; if min >= SET.quest_lvl_red then lvl_str = lvl_str .. "\124cffff0000" .. min .. "\124r ]\124cff000000**\124r"; elseif min >= SET.quest_lvl_orange then lvl_str = lvl_str .. "\124cffff7f7f" .. min .. "\124r ]\124cff000000**\124r"; elseif min >= SET.quest_lvl_yellow then lvl_str = lvl_str .. "\124cffffff00" .. min .. "\124r ]\124cff000000**\124r"; elseif min >= SET.quest_lvl_green then lvl_str = lvl_str .. "\124cff7fbf3f" .. min .. "\124r ]\124cff000000**\124r"; else lvl_str = lvl_str .. "\124cff7f7f7f" .. min .. "\124r ]\124cff000000**\124r"; end if meta ~= nil then if line == 'start' then tip:AddLine(TIP_IMG_S_NORMAL .. meta.title .. "(" .. quest .. ")", color[2], color[3], color[4]); tip:AddLine(lvl_str, 1.0, 1.0, 1.0); if modifier then local loc = __loc_quest[quest]; if loc ~= nil and loc[3] ~= nil then for _, text in next, loc[3] do tip:AddLine("\124cff000000**\124r" .. text, 1.0, 0.75, 0.0); end end end elseif line == 'end' then if meta.completed == 1 then tip:AddLine(TIP_IMG_LIST[IMG_INDEX.IMG_E_COMPLETED] .. meta.title .. "(" .. quest .. ")", color[2], color[3], color[4]); tip:AddLine(lvl_str, 1.0, 1.0, 1.0); elseif meta.completed == 0 then tip:AddLine(TIP_IMG_LIST[IMG_INDEX.IMG_E_UNCOMPLETED] .. meta.title .. "(" .. quest .. ")", color[2], color[3], color[4]); tip:AddLine(lvl_str, 1.0, 1.0, 1.0); end if modifier then local loc = __loc_quest[quest]; if loc ~= nil and loc[3] ~= nil then for _, text in next, loc[3] do tip:AddLine("\124cff000000**\124r" .. text, 1.0, 0.75, 0.0); end end end elseif line == 'event' then tip:AddLine(TIP_IMG_S_NORMAL .. meta.title .. "(" .. quest .. ")", color[2], color[3], color[4]); tip:AddLine(lvl_str, 1.0, 1.0, 1.0); for index = 1, #meta do local meta_line = meta[index]; if meta_line[2] == 'event' or meta_line[2] == 'log' then tip:AddLine("\124cff000000**\124r" .. meta_line[4], 1.0, 0.5, 0.0); end end else tip:AddLine(TIP_IMG_S_NORMAL .. meta.title .. "(" .. quest .. ")", color[2], color[3], color[4]); tip:AddLine(lvl_str, 1.0, 1.0, 1.0); if line > 0 then local meta_line = meta[line]; if meta_line ~= nil then if meta_line[5] then tip:AddLine("\124cff000000**\124r" .. meta_line[4], 0.5, 1.0, 0.0); else tip:AddLine("\124cff000000**\124r" .. meta_line[4], 1.0, 0.5, 0.0); end end else line = - line; local meta_line = meta[line]; if meta_line ~= nil then if meta_line[5] then tip:AddLine("\124cff000000**\124r" .. meta_line[4], 0.5, 1.0, 0.0); else tip:AddLine("\124cff000000**\124r" .. meta_line[4], 1.0, 0.5, 0.0); end end end end else local loc = __loc_quest[quest]; if loc ~= nil then tip:AddLine(TIP_IMG_S_NORMAL .. loc[1] .. "(" .. quest .. ")", color[2], color[3], color[4]); if modifier and loc[3] then for _, text in next, loc[3] do tip:AddLine("\124cff000000**\124r" .. text, 1.0, 0.75, 0.0); end end else tip:AddLine(TIP_IMG_S_NORMAL .. "quest:" .. quest, color[2], color[3], color[4]); end tip:AddLine(lvl_str, 1.0, 1.0, 1.0); end --]] local lvl_str = GetLevelTag(quest, info, modifier); if meta ~= nil then if SET.show_id_in_tooltip then if ref['end'] then if meta.completed == 1 then tip:AddLine(TIP_IMG_LIST[IMG_INDEX.IMG_E_COMPLETED] .. lvl_str .. meta.title .. "(" .. quest .. ")", color[2], color[3], color[4]); elseif meta.completed == 0 then tip:AddLine(TIP_IMG_LIST[IMG_INDEX.IMG_E_UNCOMPLETED] .. lvl_str .. meta.title .. "(" .. quest .. ")", color[2], color[3], color[4]); end else tip:AddLine(TIP_IMG_S_NORMAL .. lvl_str .. meta.title .. "(" .. quest .. ")", color[2], color[3], color[4]); end else if ref['end'] then if meta.completed == 1 then tip:AddLine(TIP_IMG_LIST[IMG_INDEX.IMG_E_COMPLETED] .. lvl_str .. meta.title, color[2], color[3], color[4]); elseif meta.completed == 0 then tip:AddLine(TIP_IMG_LIST[IMG_INDEX.IMG_E_UNCOMPLETED] .. lvl_str .. meta.title, color[2], color[3], color[4]); end else tip:AddLine(TIP_IMG_S_NORMAL .. lvl_str .. meta.title, color[2], color[3], color[4]); end end for line, _ in next, ref do if line == 'start' or line == 'end' then if modifier then local loc = __loc_quest[quest]; if loc ~= nil and loc[3] ~= nil then for _, text in next, loc[3] do tip:AddLine("\124cff000000**\124r" .. text, 1.0, 0.75, 0.0); end end end elseif line == 'event' then for index = 1, #meta do local meta_line = meta[index]; if meta_line[2] == 'event' or meta_line[2] == 'log' then tip:AddLine("\124cff000000**\124r" .. meta_line[4], 1.0, 0.5, 0.0); end end else if line > 0 then local meta_line = meta[line]; if meta_line ~= nil then if meta_line[5] then tip:AddLine("\124cff000000**\124r" .. meta_line[4], 0.5, 1.0, 0.0); else tip:AddLine("\124cff000000**\124r" .. meta_line[4], 1.0, 0.5, 0.0); end end else line = - line; local meta_line = meta[line]; if meta_line ~= nil then if meta_line[5] then tip:AddLine("\124cff000000**\124r" .. meta_line[4], 0.5, 1.0, 0.0); else tip:AddLine("\124cff000000**\124r" .. meta_line[4], 1.0, 0.5, 0.0); end end end end end else local loc = __loc_quest[quest]; if loc ~= nil and loc[1] ~= nil then if SET.show_id_in_tooltip then tip:AddLine(TIP_IMG_S_NORMAL .. lvl_str .. loc[1] .. "(" .. quest .. ")", color[2], color[3], color[4]); else tip:AddLine(TIP_IMG_S_NORMAL .. lvl_str .. loc[1], color[2], color[3], color[4]); end if modifier and loc[3] then for _, text in next, loc[3] do tip:AddLine("\124cff000000**\124r" .. text, 1.0, 0.75, 0.0); end end else tip:AddLine(TIP_IMG_S_NORMAL .. lvl_str .. "quest:" .. quest, color[2], color[3], color[4]); end end end tip:Show(); end end local function OnTooltipSetUnit(self) if SET.objective_tooltip_info then local _, unit = self:GetUnit(); if unit and not UnitIsPlayer(unit) then local GUID = UnitGUID(unit); if GUID ~= nil then -- local _, _, _id = strfind(GUID, "Creature%-0%-%d+%-%d+%-%d+%-(%d+)%-%x+"); local _type, _, _, _, _, _id = strsplit("-", GUID); if _type == "Creature" and _id ~= nil then _id = tonumber(_id); if _id ~= nil then local uuid = __ns.CoreGetUUID('unit', _id); if uuid ~= nil then GameTooltipSetQuestTip(GameTooltip, uuid); end for name, val in next, __ns.__comm_group_members do local meta_table = __comm_meta[name]; if meta_table ~= nil then local uuid = __ns.CommGetUUID(name, 'unit', _id); if uuid ~= nil and next(uuid[4]) ~= nil then local info = __ns.__comm_group_members_info[name]; GameTooltip:AddLine(GetPlayerTag(name, info ~= nil and info[4])); GameTooltipSetQuestTip(GameTooltip, uuid, meta_table); end end end end end end end end end local function OnTooltipSetItem(tip) if SET.objective_tooltip_info then local name, link = tip:GetItem(); if link ~= nil then local id = GetItemInfoInstant(link); if id ~= nil then local QUESTS = __db_item_related_quest[id]; if QUESTS ~= nil and QUESTS[1] ~= nil then local modifier = IsShiftKeyDown(); for _, quest in next, QUESTS do local meta = __core_meta[quest]; if meta ~= nil then local qinfo = __db_quest[quest]; local color = IMG_LIST[GetQuestStartTexture(qinfo)]; local lvl_str = GetLevelTag(quest, qinfo, modifier); if modifier then if meta.completed == 1 then tip:AddLine(TIP_IMG_LIST[IMG_INDEX.IMG_E_COMPLETED] .. IMG_TAG_PRG .. lvl_str .. meta.title, 1.0, 0.9, 0.0); elseif meta.completed == 0 then tip:AddLine(TIP_IMG_LIST[IMG_INDEX.IMG_E_UNCOMPLETED] .. IMG_TAG_PRG .. lvl_str .. meta.title, 1.0, 0.9, 0.0); end else if meta.completed == 1 then tip:AddLine(TIP_IMG_LIST[IMG_INDEX.IMG_E_COMPLETED] .. lvl_str .. meta.title, 1.0, 0.9, 0.0); elseif meta.completed == 0 then tip:AddLine(TIP_IMG_LIST[IMG_INDEX.IMG_E_UNCOMPLETED] .. lvl_str .. meta.title, 1.0, 0.9, 0.0); end end for index = 1, #meta do local meta_line = meta[index]; if meta_line[2] == 'item' and meta_line[3] == id then if meta_line[5] then tip:AddLine("\124cff000000**\124r" .. meta_line[4], 0.5, 1.0, 0.0); else tip:AddLine("\124cff000000**\124r" .. meta_line[4], 1.0, 0.5, 0.0); end break; end end tip:Show(); end end if modifier then for _, quest in next, QUESTS do if __core_meta[quest] == nil and __db_avl_quest_hash[quest] ~= nil then local qinfo = __db_quest[quest]; local color = IMG_LIST[GetQuestStartTexture(qinfo)]; local lvl_str = GetLevelTag(quest, qinfo, true); local loc = __loc_quest[quest]; if loc ~= nil then if SET.show_id_in_tooltip then if __core_quests_completed[quest] ~= nil then tip:AddLine(TIP_IMG_S_NORMAL .. IMG_TAG_CPL .. lvl_str .. loc[1] .. "(" .. quest .. ")", color[2], color[3], color[4]); else tip:AddLine(TIP_IMG_S_NORMAL .. IMG_TAG_UNCPL .. lvl_str .. loc[1] .. "(" .. quest .. ")", color[2], color[3], color[4]); end else if __core_quests_completed[quest] ~= nil then tip:AddLine(TIP_IMG_S_NORMAL .. IMG_TAG_CPL .. lvl_str .. loc[1], color[2], color[3], color[4]); else tip:AddLine(TIP_IMG_S_NORMAL .. IMG_TAG_UNCPL .. lvl_str .. loc[1], color[2], color[3], color[4]); end end else if __core_quests_completed[quest] ~= nil then tip:AddLine(TIP_IMG_S_NORMAL .. IMG_TAG_CPL .. lvl_str .. "quest:" .. quest, color[2], color[3], color[4]); else tip:AddLine(TIP_IMG_S_NORMAL .. IMG_TAG_UNCPL .. lvl_str .. "quest:" .. quest, color[2], color[3], color[4]); end end tip:Show(); end end end for name, val in next, __ns.__comm_group_members do local meta_table = __comm_meta[name]; if meta_table ~= nil then local first_line_of_partner = true; for _, quest in next, QUESTS do local meta = meta_table[quest]; if meta ~= nil then if first_line_of_partner then first_line_of_partner = false; local info = __ns.__comm_group_members_info[name]; GameTooltip:AddLine(GetPlayerTag(name, info ~= nil and info[4])); end local qinfo = __db_quest[quest]; local color = IMG_LIST[GetQuestStartTexture(qinfo)]; local lvl_str = GetLevelTag(quest, qinfo, modifier); if meta.completed == 1 then tip:AddLine(TIP_IMG_LIST[IMG_INDEX.IMG_E_COMPLETED] .. lvl_str .. meta.title, 1.0, 0.9, 0.0); elseif meta.completed == 0 then tip:AddLine(TIP_IMG_LIST[IMG_INDEX.IMG_E_UNCOMPLETED] .. lvl_str .. meta.title, 1.0, 0.9, 0.0); end for index = 1, #meta do local meta_line = meta[index]; if meta_line[2] == 'item' and meta_line[3] == id then if meta_line[5] then tip:AddLine("\124cff000000**\124r" .. meta_line[4], 0.5, 1.0, 0.0); else tip:AddLine("\124cff000000**\124r" .. meta_line[4], 1.0, 0.5, 0.0); end break; end end tip:Show(); end end end end end end end end end __ns.GameTooltipSetQuestTip = GameTooltipSetQuestTip; -- object local GameTooltipTextLeft1Text = nil; local updateTimer = 0.0; local function GameTooltipOnUpdate(self, elasped) if SET.objective_tooltip_info then if updateTimer <= 0.0 then updateTimer = 0.1; local uname, unit = self:GetUnit(); local iname, link = self:GetItem(); if uname == nil and unit == nil and iname == nil and link == nil then local text = GameTooltipTextLeft1:GetText(); if text ~= nil and text ~= GameTooltipTextLeft1Text then GameTooltipTextLeft1Text = text; local oid = __obj_lookup[text]; if oid ~= nil then local uuid = __ns.CoreGetUUID('object', oid); if uuid ~= nil then GameTooltipSetQuestTip(GameTooltip, uuid); end for name, val in next, __ns.__comm_group_members do local meta_table = __comm_meta[name]; if meta_table ~= nil then local uuid = __ns.CommGetUUID(name, 'object', oid); if uuid ~= nil then local info = __ns.__comm_group_members_info[name]; GameTooltip:AddLine(GetPlayerTag(name, info ~= nil and info[4])); GameTooltipSetQuestTip(GameTooltip, uuid, meta_table); end end end end local oid = __comm_obj_lookup[text]; if oid ~= nil then end end end else updateTimer = updateTimer - elasped; end end end function __ns.MODIFIER_STATE_CHANGED() local focus = GetMouseFocus(); if focus ~= nil and focus.__PIN_TAG ~= nil then __ns.Pin_OnEnter(focus); end if GameTooltip:IsShown() then end end function __ns.GameTooltipSetInfo(type, id) if type == 'event' then GameTooltip:AddLine(__UILOC.TIP_WAYPOINT, 0.0, 1.0, 0.0); else local _loc = __loc[type]; if _loc ~= nil then if SET.show_id_in_tooltip then if type == 'unit' then local info = __db_unit[id]; if info ~= nil then if UnitHelpFac[info.fac] then GameTooltip:AddLine(_loc[id] .. "(" .. id .. ")", 0.0, 1.0, 0.0); else local facId = info.facId; if facId ~= nil then local _, _, standing_rank, _, _, val = GetFactionInfoByID(facId); if standing_rank == nil then GameTooltip:AddLine(_loc[id] .. "(" .. id .. ")", 1.0, 0.0, 0.0); elseif standing_rank == 4 then GameTooltip:AddLine(_loc[id] .. "(" .. id .. ")", 1.0, 1.0, 0.0); elseif standing_rank < 4 then GameTooltip:AddLine(_loc[id] .. "(" .. id .. ")", 1.0, (standing_rank - 1) * 0.25, 0.0); else GameTooltip:AddLine(_loc[id] .. "(" .. id .. ")", 0.5 - (standing_rank - 4) * 0.125, 1.0, 0.0); end else GameTooltip:AddLine(_loc[id] .. "(" .. id .. ")", 1.0, 0.0, 0.0); end end end else GameTooltip:AddLine(_loc[id] .. "(" .. id .. ")", 1.0, 1.0, 1.0); end else if type == 'unit' then local info = __db_unit[id]; if info ~= nil then if UnitHelpFac[info.fac] then GameTooltip:AddLine(_loc[id], 0.0, 1.0, 0.0); else local facId = info.facId; if facId ~= nil then local _, _, standing_rank, _, _, val = GetFactionInfoByID(facId); if standing_rank == nil then GameTooltip:AddLine(_loc[id], 1.0, 0.0, 0.0); elseif standing_rank == 4 then GameTooltip:AddLine(_loc[id], 1.0, 1.0, 0.0); elseif standing_rank < 4 then GameTooltip:AddLine(_loc[id], 1.0, (standing_rank - 1) * 0.25, 0.0); else GameTooltip:AddLine(_loc[id], 0.5 - (standing_rank - 4) * 0.125, 1.0, 0.0); end else GameTooltip:AddLine(_loc[id], 1.0, 0.0, 0.0); end end end else GameTooltip:AddLine(_loc[id], 1.0, 1.0, 1.0); end end end end local uuid = __ns.CoreGetUUID(type, id); if uuid ~= nil then __ns.GameTooltipSetQuestTip(GameTooltip, uuid); end for name, val in next, __ns.__comm_group_members do local meta_table = __comm_meta[name]; if meta_table ~= nil then local uuid = __ns.CommGetUUID(name, type, id); if uuid ~= nil and next(uuid[4]) ~= nil then local info = __ns.__comm_group_members_info[name]; GameTooltip:AddLine(GetPlayerTag(name, info ~= nil and info[4])); GameTooltipSetQuestTip(GameTooltip, uuid, meta_table); end end end end function __ns.button_info_OnEnter(self) GameTooltip:SetOwner(self, "ANCHOR_RIGHT"); local info_lines = self.info_lines; if info_lines then for index = 1, #info_lines do GameTooltip:AddLine(info_lines[index]); end end GameTooltip:Show(); end function __ns.OnLeave(self) if GameTooltip:IsOwned(self) then GameTooltip:Hide(); end end local function drop_handler_send(_, quest) local info = __db_quest[quest]; local loc = __loc_quest[quest]; local lvl = info.lvl; if lvl <= 0 then lvl = info.min; end local activeWindow = ChatEdit_GetActiveWindow(); if activeWindow ~= nil then activeWindow:Insert("[[" .. lvl .. "] " .. (loc ~= nil and loc[1] or "Quest: " .. quest) .. " (" .. quest .. ")]"); end -- ChatEdit_InsertLink("[[" .. lvl .. "] " .. (loc ~= nil and loc[1] or "Quest: " .. quest) .. " (" .. quest .. ")]"); end local function drop_handler_toggle(_, quest) __ns.MapPermanentlyToggleQuestNodes(quest); end local function GetQuestTitle(quest, modifier) local info = __db_quest[quest]; local color = IMG_LIST[GetQuestStartTexture(info)]; local lvl_str = GetLevelTag(quest, info, modifier); local loc = __loc_quest[quest]; return lvl_str .. "|c" .. color[5] .. (loc ~= nil and (loc[1] .. "(" .. quest .. ")") or "quest: " .. quest) .. "|r"; end function __ns.NodeOnModifiedClick(node, uuid) local refs = uuid[4]; if ChatEdit_GetActiveWindow() then local ele = { }; local data = { handler = drop_handler_send, elements = ele, }; for quest, val in next, refs do ele[#ele + 1] = { text = __UILOC.pin_menu_send_quest .. GetQuestTitle(quest, true); para = { quest, }, }; end ALADROP(node, "BOTTOMLEFT", data); return true; else for quest, val in next, refs do if val["start"] ~= nil then local ele = { }; local data = { handler = drop_handler_toggle, elements = ele, }; for quest, val in next, refs do if val["start"] ~= nil then if __ns.__quest_permanently_blocked[quest] then ele[#ele + 1] = { text = __UILOC.pin_menu_show_quest .. GetQuestTitle(quest, true); para = { quest, }, }; else ele[#ele + 1] = { text = __UILOC.pin_menu_hide_quest .. GetQuestTitle(quest, true); para = { quest, }, }; end end end ALADROP(node, "BOTTOMLEFT", data); return true; end end end end --> DBIcon local function CreateDBIcon() local LibStub = _G.LibStub; if LibStub ~= nil then local LDI = LibStub("LibDBIcon-1.0", true); if LDI then LDI:Register( "CodexLite", { icon = [[interface\icons\inv_misc_book_09]], OnClick = function(self, button) if __ns.__ui_setting:IsShown() then __ns.__ui_setting:Hide(); else __ns.__ui_setting:Show(); end end, text = "CodexLite", OnTooltipShow = function(tt) tt:AddLine("CodexLite"); tt:Show(); end, }, __ns.__svar.minimap ); LDI:Show(__addon); if SET.show_db_icon then LDI:Show(__addon); else LDI:Hide(__addon); end end end end --> --> Chat -- local function SendFilterRep(id, level, title) return "[[" .. gsub(level, "[^0-9]", "") .. "] " .. title .. " (" .. id .. ")]"; end local function SendFilter(msg) --"|Hcdxl:([0-9]+)|h|c[0-9a-f]+%[%[(.+)%](.+)%]|r|h" return gsub(msg, "|Hcdxl:([0-9]+)|h|c[0-9a-f]+%[%[(.+)%](.+)%]|r|h", SendFilterRep); end local __SendChatMessage = nil; local function CdxlSendChatMessage(text, ...) __SendChatMessage(SendFilter(text), ...); end local __BNSendWhisper = nil; local function CdxlBNSendWhisper(presenceID, text, ...) __BNSendWhisper(presenceID, SendFilter(text), ...); end local __BNSendConversationMessage = nil; local function CdxlBNSendConversationMessage(target, text, ...) __BNSendConversationMessage(target, SendFilter(text), ...); end local function ChatFilterReplacer(body, id) local quest = tonumber(id); local info = __db_quest[quest]; local loc = __loc_quest[quest]; if info ~= nil and loc ~= nil then local color = IMG_LIST[GetQuestStartTexture(info)]; return "|Hcdxl:" .. id .. "|h|c" .. color[5] .. "[" .. GetLevelTag(quest, info, false, false) .. (loc ~= nil and loc[1] or "Quest: " .. id) .. "]|r|h"; end return body; end local function ChatFilter(ChatFrame, event, arg1, ...) if ChatFrame ~= ChatFrame2 then return false, gsub(arg1, "(%[%[[0-9]+%] .- %(([0-9]+)%)%])", ChatFilterReplacer), ...; end end local ItemRefTooltip = ItemRefTooltip; local _ItemRefTooltip_SetHyperlink = ItemRefTooltip.SetHyperlink; function ItemRefTooltip:SetHyperlink(link, ...) local id = strmatch(link, "cdxl:(%d+)"); if id ~= nil then id = tonumber(id); if id ~= nil then local meta = __core_meta[id]; local info = __db_quest[id]; if meta ~= nil then ItemRefTooltip:SetOwner(UIParent, "ANCHOR_PRESERVE"); local color = IMG_LIST[GetQuestStartTexture(info)]; ItemRefTooltip:SetText("|c" .. color[5] .. GetLevelTag(id, info, true) .. meta.title .. "|r"); if meta.completed == 1 then ItemRefTooltip:AddLine(__UILOC.IN_PROGRESS .. " (" .. __UILOC.COMPLETED .. ")", 0.0, 1.0, 0.0); else ItemRefTooltip:AddLine(__UILOC.IN_PROGRESS, 0.75, 1.0, 0.0); end ItemRefTooltip:AddLine(" "); ItemRefTooltip:AddLine(meta.sdesc, 1.0, 1.0, 1.0, true); local num = #meta; if num > 0 then ItemRefTooltip:AddLine(" "); for index = 1, num do local line = meta[index]; if line[5] then ItemRefTooltip:AddLine(" - " .. line[4], 0.0, 1.0, 0.0); else ItemRefTooltip:AddLine(" - " .. line[4], 1.0, 0.5, 0.5); end end end ItemRefTooltip:Show(); return; else local loc = __loc_quest[id]; if info ~= nil and loc ~= nil then ItemRefTooltip:SetOwner(UIParent, "ANCHOR_PRESERVE"); local color = IMG_LIST[GetQuestStartTexture(info)]; ItemRefTooltip:SetText("|c" .. color[5] .. GetLevelTag(id, info, true) .. (loc ~= nil and loc[1] or "Quest: " .. id) .. "|r"); if __core_quests_completed[id] then -- 1 = completed, -1 = excl completed, -2 = next completed ItemRefTooltip:AddLine(__UILOC.COMPLETED, 0.0, 1.0, 0.0); end local lines = loc[3]; if lines ~= nil then ItemRefTooltip:AddLine(" "); for index = 1, #lines do ItemRefTooltip:AddLine(lines[index], 1.0, 1.0, 1.0, true); end end ItemRefTooltip:Show(); return; end end end end return _ItemRefTooltip_SetHyperlink(self, link, ...); end local Num_Hooked_QuestLogTitle = 0; local function HookQuestLogTitle() if Num_Hooked_QuestLogTitle < QUESTS_DISPLAYED then for index = Num_Hooked_QuestLogTitle + 1, QUESTS_DISPLAYED do local button = _G["QuestLogTitle" .. index]; local script = button:GetScript("OnClick"); button:SetScript("OnClick", function(self, button) if IsModifiedClick("CHATLINK") and ChatEdit_GetActiveWindow() then if self.isHeader then return; end local title, level, group, header, collapsed, completed, frequency, quest_id = GetQuestLogTitle(self:GetID() + FauxScrollFrame_GetOffset(QuestLogListScrollFrame)); local activeWindow = ChatEdit_GetActiveWindow(); if activeWindow ~= nil then activeWindow:Insert("[[" .. level .. "] " .. title .. " (" .. quest_id .. ")]"); end -- ChatEdit_InsertLink("[[" .. level .. "] " .. title .. " (" .. quest_id .. ")]"); return; end return script(self, button); end); Num_Hooked_QuestLogTitle = index; end end end local function InitMessageFactory() __SendChatMessage = _G.SendChatMessage; _G.SendChatMessage = CdxlSendChatMessage; __BNSendWhisper = _G.BNSendWhisper; _G.BNSendWhisper = CdxlBNSendWhisper; __BNSendConversationMessage = _G.BNSendConversationMessage; _G.BNSendConversationMessage = CdxlBNSendConversationMessage; QuestLogFrame:HookScript("OnShow", HookQuestLogTitle); ChatFrame_AddMessageEventFilter("CHAT_MSG_SAY", ChatFilter); ChatFrame_AddMessageEventFilter("CHAT_MSG_YELL", ChatFilter); ChatFrame_AddMessageEventFilter("CHAT_MSG_EMOTE", ChatFilter); ChatFrame_AddMessageEventFilter("CHAT_MSG_GUILD", ChatFilter); ChatFrame_AddMessageEventFilter("CHAT_MSG_OFFICER", ChatFilter); ChatFrame_AddMessageEventFilter("CHAT_MSG_WHISPER", ChatFilter); ChatFrame_AddMessageEventFilter("CHAT_MSG_WHISPER_INFORM", ChatFilter); ChatFrame_AddMessageEventFilter("CHAT_MSG_BN", ChatFilter); ChatFrame_AddMessageEventFilter("CHAT_MSG_BN_WHISPER", ChatFilter); ChatFrame_AddMessageEventFilter("CHAT_MSG_BN_WHISPER_INFORM", ChatFilter); ChatFrame_AddMessageEventFilter("CHAT_MSG_PARTY", ChatFilter); ChatFrame_AddMessageEventFilter("CHAT_MSG_PARTY_LEADER", ChatFilter); ChatFrame_AddMessageEventFilter("CHAT_MSG_RAID", ChatFilter); ChatFrame_AddMessageEventFilter("CHAT_MSG_RAID_LEADER", ChatFilter); ChatFrame_AddMessageEventFilter("CHAT_MSG_RAID_WARNING", ChatFilter); ChatFrame_AddMessageEventFilter("CHAT_MSG_INSTANCE_CHAT", ChatFilter); ChatFrame_AddMessageEventFilter("CHAT_MSG_INSTANCE_CHAT_LEADER", ChatFilter); ChatFrame_AddMessageEventFilter("CHAT_MSG_CHANNEL", ChatFilter); end --> QuestLogFrame local function CreateQuestLogFrameButton() local _ShowQuest = CreateFrame('BUTTON', nil, QuestLogDetailScrollChildFrame, "UIPanelButtonTemplate"); _ShowQuest:SetSize(85, 21); _ShowQuest:SetPoint("TOPLEFT", QuestLogDescriptionTitle, "TOPLEFT", 0, 0); _ShowQuest:SetScript("OnClick", function() __ns.MapTemporarilyShowQuestNodes(select(8, GetQuestLogTitle(GetQuestLogSelection()))); end); _ShowQuest:SetText(__UILOC.show_quest); local _HideQuest = CreateFrame('BUTTON', nil, QuestLogDetailScrollChildFrame, "UIPanelButtonTemplate"); _HideQuest:SetSize(85, 21); _HideQuest:SetPoint("LEFT", _ShowQuest, "RIGHT", 0, 0); _HideQuest:SetScript("OnClick", function() __ns.MapTemporarilyHideQuestNodes(select(8, GetQuestLogTitle(GetQuestLogSelection()))); end); _HideQuest:SetText(__UILOC.hide_quest); local _ResetButton = CreateFrame('BUTTON', nil, QuestLogDetailScrollChildFrame, "UIPanelButtonTemplate"); _ResetButton:SetSize(85, 21); _ResetButton:SetPoint("LEFT", _HideQuest, "RIGHT", 0, 0); _ResetButton:SetScript("OnClick", function() __ns.MapResetTemporarilyQuestNodesFilter(); end); _ResetButton:SetText(__UILOC.reset_filter); __ns._ShowQuest = _ShowQuest; __ns._HideQuest = _HideQuest; __ns._ResetQuest = _ResetButton; QuestLogDescriptionTitle.__defHeight = QuestLogDescriptionTitle:GetHeight(); if SET.show_buttons_in_log then QuestLogDescriptionTitle:SetHeight(QuestLogDescriptionTitle.__defHeight + 30); QuestLogDescriptionTitle:SetJustifyV("BOTTOM"); _ShowQuest:Show(); _HideQuest:Show(); _ResetButton:Show(); else _ShowQuest:Hide(); _HideQuest:Hide(); _ResetButton:Hide(); end end local function SetQuestLogFrameButtonShown(shown) if shown then QuestLogDescriptionTitle:SetHeight(QuestLogDescriptionTitle.__defHeight + 30); QuestLogDescriptionTitle:SetJustifyV("BOTTOM"); __ns._ShowQuest:Show(); __ns._HideQuest:Show(); __ns._ResetQuest:Show(); else QuestLogDescriptionTitle:SetHeight(QuestLogDescriptionTitle.__defHeight); __ns._ShowQuest:Hide(); __ns._HideQuest:Hide(); __ns._ResetQuest:Hide(); end end --> --> extern __ns.GetQuestTitle = GetQuestTitle; __ns.SetQuestLogFrameButtonShown = SetQuestLogFrameButtonShown; --> function __ns.util_setup() SET = __ns.__setting; GameTooltip:HookScript("OnTooltipSetUnit", OnTooltipSetUnit); GameTooltip:HookScript("OnTooltipSetItem", OnTooltipSetItem); ItemRefTooltip:HookScript("OnTooltipSetItem", OnTooltipSetItem); GameTooltip:HookScript("OnShow", function() GameTooltipTextLeft1Text = nil; updateTimer = 0.0; end); GameTooltip:HookScript("OnHide", function() GameTooltipTextLeft1Text = nil; updateTimer = 0.0; end); GameTooltip:HookScript("OnUpdate", GameTooltipOnUpdate); __eventHandler:RegEvent("MODIFIER_STATE_CHANGED"); -- CreateDBIcon(); CreateQuestLogFrameButton(); InitMessageFactory(); -- _F_SafeCall(__ns._checkConflicts); end --> --> CONFLICTS function __ns._checkConflicts() if SET ~= nil and SET._checkedConflicts then return; end __ns.After(4.0, function() local _conflicts = false; if GetAddOnEnableState(__core._PLAYER_NAME, "Questie") > 0 then _conflicts = true; end if GetAddOnEnableState(__core._PLAYER_NAME, "ClassicCodex") > 0 then _conflicts = true; end if _conflicts then StaticPopupDialogs['CODEX_LITE_CONFLICTS'] = { preferredIndex = 3, text = __UILOC["CODEX_LITE_CONFLICTS"], button1 = YES, button2 = NO, OnAccept = function(self, data) DisableAddOn("Questie"); DisableAddOn("ClassicCodex"); SaveAddOns(); ReloadUI(); end, hideOnEscape = 1, timeout = 0, exclusive = 1, whileDead = 1, }; StaticPopup_Show("CODEX_LITE_CONFLICTS"); end if SET ~= nil then SET._checkedConflicts = true; end end); end --> --[=[dev]=] if __ns.__is_dev then __ns.__performance_log_tick('module.util'); end
-------------------------------- -- @module FlipX3D -- @extend Grid3DAction -- @parent_module cc -------------------------------- -- brief Initializes an action with duration and grid size.<br> -- param gridSize Specify the grid size of the FlipX3D action.<br> -- param duration Specify the duration of the FlipX3D action. It's a value in seconds.<br> -- return If the initialization success, return true; otherwise, return false. -- @function [parent=#FlipX3D] initWithSize -- @param self -- @param #size_table gridSize -- @param #float duration -- @return bool#bool ret (return value: bool) -------------------------------- -- brief Initializes an action with duration.<br> -- param duration Specify the duration of the FlipX3D action. It's a value in seconds.<br> -- return If the initialization success, return true; otherwise, return false. -- @function [parent=#FlipX3D] initWithDuration -- @param self -- @param #float duration -- @return bool#bool ret (return value: bool) -------------------------------- -- brief Create the action with duration.<br> -- param duration Specify the duration of the FilpX3D action. It's a value in seconds.<br> -- return If the creation sucess, return a pointer of FilpX3D action; otherwise, return nil. -- @function [parent=#FlipX3D] create -- @param self -- @param #float duration -- @return FlipX3D#FlipX3D ret (return value: cc.FlipX3D) -------------------------------- -- -- @function [parent=#FlipX3D] clone -- @param self -- @return FlipX3D#FlipX3D ret (return value: cc.FlipX3D) -------------------------------- -- -- @function [parent=#FlipX3D] update -- @param self -- @param #float time -- @return FlipX3D#FlipX3D self (return value: cc.FlipX3D) -------------------------------- -- -- @function [parent=#FlipX3D] FlipX3D -- @param self -- @return FlipX3D#FlipX3D self (return value: cc.FlipX3D) return nil
local _M = require "alien_c" local alien = _M local io = require "io" local pairs, ipairs = pairs, ipairs local setmetatable = setmetatable local error = error local pcall = pcall local type = type local rawset = rawset local unpack = unpack local math = math local load, callback = alien.load, alien.callback _M.loaded = {} local load_library, find_library = {}, {} local function find_library_helper(libname, opt) local expr = '/[^() ]*lib' .. libname .. '%.so[^() ]*' local cmd = '/sbin/ldconfig ' .. opt .. ' 2>/dev/null | egrep -o "' .. expr .. '"' local pipe = io.popen(cmd) if pipe then local res = pipe:read() pipe:close() return res and res:match("([^%s]*)") end return nil end function find_library.linux(libname) return find_library_helper(libname, "-p") end function find_library.bsd(libname) return find_library_helper(libname, "-r") end function find_library.darwin(libname) local ok, lib = pcall(load, libname .. ".dylib") if ok then return lib end ok, lib = pcall(load, libname .. ".framework/" .. libname) if ok then return lib end return nil end local function load_library_helper(libname, libext) if libname:match("/") or libname:match("%" .. libext) then return load(libname) else local ok, lib = pcall(load, "lib" .. libname .. libext) if not ok then ok, lib = pcall(load, "./lib" .. libname .. libext) if not ok then local name = find_library[alien.platform](libname) if name then lib = load(name) else return nil, "library " .. libname .. " not found" end end end return lib end end function load_library.linux(libname) local lib, errmsg = load_library_helper(libname, ".so") if not lib then error (errmsg) end return lib end load_library.bsd = load_library.linux function load_library.darwin(libname) local lib, errmsg = load_library_helper(libname, ".dylib") if not lib then lib, errmsg = load_library_helper(libname, ".so") end if not lib then error (errmsg) end return lib end function load_library.windows(libname) return load(libname) end setmetatable(_M.loaded, { __index = function (t, libname) local lib = load_library[alien.platform](libname) t[libname] = lib return lib end, __mode = "kv" }) function _M.load(libname) return _M.loaded[libname] end function _M.callback(f, ...) local cb = callback(f) cb.types(cb, ...) return cb end local array_methods = {} local function array_next(arr, i) if i < arr.length then return i + 1, arr[i + 1] else return nil end end function array_methods:ipairs() return array_next, self, 0 end function array_methods:realloc(newlen) self.buffer:realloc(newlen * self.size) self.length = newlen end local function array_get(arr, key) if type(key) == "number" then if key < 1 or key > arr.length then error("array access out of bounds") end local offset = (key - 1) * arr.size + 1 return arr.buffer:get(offset, arr.type) else return array_methods[key] end end local function array_set(arr, key, val) if type(key) == "number" then if key < 1 or key > arr.length then error("array access out of bounds") end local offset = (key - 1) * arr.size + 1 arr.buffer:set(offset, val, arr.type) if arr.type == "pointer" then arr.pinned[key] = val end else rawset(arr, key, val) end end function _M.array(t, length, init) local ok, size = pcall(alien.sizeof, t) if not ok then error("type " .. t .. " does not exist") end if type(length) == "table" then init = length length = #length end local arr = { type = t, length = length, size = size, pinned = {} } -- FIXME: When Lua 5.1 support is dropped, add a __len metamethod setmetatable(arr, { __index = array_get, __newindex = array_set }) if type(init) == "userdata" then arr.buffer = init else arr.buffer = alien.buffer(size * length) if type(init) == "table" then for i = 1, length do if type(init[i]) == "string" then local offset = (i - 1) * size + 1 arr.pinned[i] = alien.buffer(#init[i] + 1) arr.buffer:set(offset, arr.pinned[i], "pointer") end arr[i] = init[i] end end end return arr end local function struct_new(s_proto, ptr) local buf = alien.buffer(ptr or s_proto.size) local function struct_get(_, key) if s_proto.offsets[key] then return buf:get(s_proto.offsets[key] + 1, s_proto.types[key]) else error("field " .. key .. " does not exist") end end local function struct_set(_, key, val) if s_proto.offsets[key] then buf:set(s_proto.offsets[key] + 1, val, s_proto.types[key]) else error("field " .. key .. " does not exist") end end return setmetatable({}, { __index = struct_get, __newindex = struct_set, __call = function () return buf end }) end local function struct_byval(s_proto) local types = {} local size = s_proto.size for i = 0, size - 1, 4 do if size - i == 1 then types[#types + 1] = "char" elseif size - i == 2 then types[#types + 1] = "short" else types[#types + 1] = "int" end end return unpack(types) end function _M.defstruct(t) local off = 0 local names, offsets, types = {}, {}, {} for _, field in ipairs(t) do local name, type = field[1], field[2] names[#names + 1] = name off = math.ceil(off / alien.align(type)) * alien.align(type) offsets[name] = off types[name] = type off = off + alien.sizeof(type) end return { names = names, offsets = offsets, types = types, size = off, new = struct_new, byval = struct_byval } end function _M.byval(buf) if buf.size then local size = buf.size local types = { "char", "short"} local vals = {} for i = 1, size, 4 do if size - i == 0 then vals[#vals + 1] = buf:get(i, "char") elseif size - i == 1 then vals[#vals + 1] = buf:get(i, "short") else vals[#vals + 1] = buf:get(i, "int") end end return unpack(vals) else error("this type of buffer can't be passed by value") end end return alien
local skynet = require "skynet" require "skynet.manager" local cluster = require "skynet.cluster" local runconf = require(skynet.getenv("runconfig")) local servconf = runconf.service local nodename = skynet.getenv("nodename") local function start_host() for k,v in pairs(servconf.host_common) do if nodename == v.node and v.name=="web" then ERROR("start "..v.name.." in port: " .. v.port.."...") skynet.uniqueservice(v.name,"host", v.port) end end ERROR("======start host server======= ") end local function start_console() for i,v in pairs(servconf.debug_console) do if nodename == v.node then skynet.uniqueservice("debug_console", v.port) ERROR("start debug_console in port: " .. v.port.."...") end end end local function start_setup() local p = skynet.newservice("setup", "setup", 0) ERROR("=========start setupd...======") end local function start_gateway() for i, v in pairs(servconf.gateway) do local name = string.format("gateway%d", i) if nodename == v.node then local p = skynet.newservice("gateway", "gateway", i) local c = servconf.gateway_common local g = servconf.gateway[i] skynet.name(name, p) skynet.call(p, "lua", "open", { port = g.port, maxclient = c.maxclient, nodelay = c.nodelay, name = name, }) ERROR("=====start ", name, "port:", g.port, "...======") else local proxy = cluster.proxy(v.node, name) skynet.name(name, proxy) end end end local function start_agentpool() --开启agentpool服务 for i,v in pairs(servconf.agentpool) do local name = string.format("agentpool%d", i) if nodename == v.node then local c = servconf.agentpool_common local agentname = runconf.prototype .. "agent" local p = skynet.newservice("agentpool", "agentpool", i) skynet.name(name, p) skynet.call(p, "lua", "init_pool", { agentname = agentname, maxnum = c.maxnum, recyremove = c.recyremove, brokecachelen = c.brokecachelen, }) else local proxy = cluster.proxy(v.node, name) skynet.name(name, proxy) end end end local function start_login() for i,v in pairs(servconf.login) do local name = string.format("login%d", i) if nodename == v.node then local p = skynet.newservice("login", "login", i) else local proxy = cluster.proxy(v.node, name) skynet.name(name, proxy) end end end local function start_dbproxy() for i,v in pairs(servconf.dbproxy) do local name = string.format("dbproxy%d", i) if nodename == v.node then local p = skynet.newservice("dbproxy", "dbproxy", i) else local proxy = cluster.proxy(v.node, name) skynet.name(name, proxy) end end end local function start_center() for i,v in pairs(servconf.center) do local name = string.format("center%d", i) if nodename == v.node then local p = skynet.newservice("center", "center", i) else local proxy = cluster.proxy(v.node, name) skynet.name(name, proxy) end end end local function start_global() for i,v in pairs(servconf.global) do local name = string.format("global%d", i) if nodename == v.node then local p = skynet.newservice("global", "global", i) else local proxy = cluster.proxy(v.node, name) skynet.name(name, proxy) end end end skynet.start(function() INFO("Server start version: " .. runconf.version) --集群信息 cluster.reload(runconf.cluster) cluster.open(nodename) --开启各个服务 start_agentpool() start_console() start_setup() start_global() start_login() start_dbproxy() start_center() start_gateway() --exit skynet.exit() end)
local Tunnel = module("vrp","lib/Tunnel") local Proxy = module("vrp","lib/Proxy") vRP = Proxy.getInterface("vRP") --[ CONEXÃO ]---------------------------------------------------------------------------------------------------------------------------- src = {} Tunnel.bindInterface("vrp_garages",src) vSERVER = Tunnel.getInterface("vrp_garages") --[ VARIAVEIS ]-------------------------------------------------------------------------------------------------------------------------- local workgarage = "" local vehicle = {} local vehblips = {} local pointspawn = 1 --[ SPAWN ]------------------------------------------------------------------------------------------------------------------------------ local spawn = { [1] = { ['x'] = 53.98, ['y'] = -878.08, ['z'] = 30.38, ['name'] = "Garagem", [1] = { ['x'] = 51.26, ['y'] = -892.13, ['z'] = 30.17, ['h'] = 336.98 }, [2] = { ['x'] = 47.94, ['y'] = -891.2, ['z'] = 30.17, ['h'] = 336.98 }, [3] = { ['x'] = 44.6, ['y'] = -889.82, ['z'] = 30.19, ['h'] = 336.98 }, [4] = { ['x'] = 41.35, ['y'] = -888.79, ['z'] = 30.19, ['h'] = 336.98 }, [5] = { ['x'] = 38.02, ['y'] = -887.63, ['z'] = 30.2, ['h'] = 336.98 }, [6] = { ['x'] = 39.57, ['y'] = -883.02, ['z'] = 30.27, ['h'] = 162.37 }, [7] = { ['x'] = 42.82, ['y'] = -884.19, ['z'] = 30.26, ['h'] = 162.37 }, [8] = { ['x'] = 46.21, ['y'] = -885.46, ['z'] = 30.25, ['h'] = 162.37 }, [9] = { ['x'] = 49.49, ['y'] = -886.7, ['z'] = 30.24, ['h'] = 162.37 }, [10] = { ['x'] = 52.67, ['y'] = -887.75, ['z'] = 30.24, ['h'] = 162.37 }, [11] = { ['x'] = 50.71, ['y'] = -873.18, ['z'] = 30.44, ['h'] = 336.98 }, [12] = { ['x'] = 47.53, ['y'] = -871.9, ['z'] = 30.46, ['h'] = 336.98 }, [13] = { ['x'] = 44.16, ['y'] = -870.61, ['z'] = 30.47, ['h'] = 336.98 }, [14] = { ['x'] = 47.48, ['y'] = -861.64, ['z'] = 30.61, ['h'] = 336.98 }, [15] = { ['x'] = 50.68, ['y'] = -862.98, ['z'] = 30.59, ['h'] = 336.98 }, [16] = { ['x'] = 54.03, ['y'] = -864.23, ['z'] = 30.58, ['h'] = 336.98 }, [17] = { ['x'] = 57.26, ['y'] = -865.43, ['z'] = 30.57, ['h'] = 336.98 }, [18] = { ['x'] = 60.42, ['y'] = -866.6, ['z'] = 30.56, ['h'] = 336.98 } }, [2] = { ['x'] = 1991.12, ['y'] = 3778.15, ['z'] = 32.19, ['name'] = "Garagem", [1] = { ['x'] = 1994.76, ['y'] = 3763.39, ['z'] = 32.19, ['h'] = 209.04 }, [2] = { ['x'] = 1992.44, ['y'] = 3762.03, ['z'] = 32.19, ['h'] = 209.04 }, [3] = { ['x'] = 1990.08, ['y'] = 3760.54, ['z'] = 32.18, ['h'] = 209.04 }, }, -- [3] = { ['x'] = 154.57, ['y'] = 6643.41, ['z'] = 31.61, ['name'] = "Garagem", [1] = { ['x'] = 147.51, ['y'] = 6639.8, ['z'] = 31.59, ['h'] = 319.17 }, [2] = { ['x'] = 150.55, ['y'] = 6635.8, ['z'] = 31.63, ['h'] = 319.17 } }, --[ DEPARTAMENTO DE POLÍCIA ]------------------------------------------------------------------------------------------------------------ [16] = { ['x'] = -1112.89, ['y'] = -843.43, ['z'] = 13.34, ['name'] = "DPLA", [1] = { ['x'] = -1114.07, ['y'] = -834.01, ['z'] = 13.34, ['h'] = 135.5 } }, [17] = { ['x'] = -1086.77, ['y'] = -843.62, ['z'] = 4.89, ['name'] = "DPLA", [1] = { ['x'] = -1076.42, ['y'] = -846.69, ['z'] = 4.89, ['h'] = 215.5 } }, [18] = { ['x'] = -1107.34, ['y'] = -832.34, ['z'] = 37.7, ['name'] = "DPLAH", [1] = { ['x'] = -1096.22, ['y'] = -832.21, ['z'] = 37.71, ['h'] = 137.5 } }, --[ DEPARTAMENTO MÉDICO ]---------------------------------------------------------------------------------------------------------------- [19] = { ['x'] = 291.83, ['y'] = -615.58, ['z'] = 43.44, ['name'] = "dmla", [1] = { ['x'] = 296.32, ['y'] = -606.21, ['z'] = 43.33, ['h'] = 71.54 }, [2] = { ['x'] = 294.49, ['y'] = -611.01, ['z'] = 43.36, ['h'] = 71.54 } }, --[ FORTHILLS ]-------------------------------------------------------------------------------------------------------------------------- [145] = { ['x'] = -864.47, ['y'] = 463.46, ['z'] = 88.22, ['name'] = "FH01", [1] = { ['x'] = -861.31, ['y'] = 462.66, ['z'] = 86.93, ['h'] = 276.73 } }, [148] = { ['x'] = -850.62, ['y'] = 522.18, ['z'] = 90.62, ['name'] = "FH04", [1] = { ['x'] = -851.05, ['y'] = 514.29, ['z'] = 90.15, ['h'] = 106.56 } }, [155] = { ['x'] = -938.56, ['y'] = 445.34, ['z'] = 80.42, ['name'] = "FH11", [1] = { ['x'] = -942.71, ['y'] = 443.81, ['z'] = 79.99, ['h'] = 198.88 } }, [159] = { ['x'] = -1074.27, ['y'] = 468.75, ['z'] = 77.82, ['name'] = "FH15", [1] = { ['x'] = -1079.10, ['y'] = 465.49, ['z'] = 76.79, ['h'] = 144.79 } }, [163] = { ['x'] = -971.31, ['y'] = 455.98, ['z'] = 79.82, ['name'] = "FH19", [1] = { ['x'] = -967.03, ['y'] = 450.03, ['z'] = 78.97, ['h'] = 199.58 } }, [167] = { ['x'] = -736.59, ['y'] = 439.85, ['z'] = 106.90, ['name'] = "FH23", [1] = { ['x'] = -736.19, ['y'] = 446.59, ['z'] = 105.88, ['h'] = 3.21 } }, [168] = { ['x'] = -716.59, ['y'] = 500.53, ['z'] = 109.27, ['name'] = "FH24", [1] = { ['x'] = -716.94, ['y'] = 495.36, ['z'] = 108.43, ['h'] = 206.78 } }, [170] = { ['x'] = -692.91, ['y'] = 507.84, ['z'] = 110.36, ['name'] = "FH26", [1] = { ['x'] = -688.85, ['y'] = 500.77, ['z'] = 109.21, ['h'] = 201.51 } }, [173] = { ['x'] = -574.21, ['y'] = 492.54, ['z'] = 106.97, ['name'] = "FH29", [1] = { ['x'] = -573.79, ['y'] = 498.15, ['z'] = 105.38, ['h'] = 9.46 } }, [175] = { ['x'] = -589.59, ['y'] = 531.83, ['z'] = 108.17, ['name'] = "FH31", [1] = { ['x'] = -586.67, ['y'] = 526.68, ['z'] = 106.72, ['h'] = 215.41 } }, [176] = { ['x'] = -574.01, ['y'] = 394.76, ['z'] = 100.67, ['name'] = "FH32", [1] = { ['x'] = -574.73, ['y'] = 401.65, ['z'] = 99.82, ['h'] = 19.61 } }, [189] = { ['x'] = -447.07, ['y'] = 376.54, ['z'] = 104.77, ['name'] = "FH45", [1] = { ['x'] = -456.49, ['y'] = 372.48, ['z'] = 103.93, ['h'] = 358.58 } }, [192] = { ['x'] = -523.67, ['y'] = 525.26, ['z'] = 112.44, ['name'] = "FH48", [1] = { ['x'] = -526.66, ['y'] = 530.68, ['z'] = 110.95, ['h'] = 44.11 } }, [193] = { ['x'] = -524.63, ['y'] = 573.16, ['z'] = 121.24, ['name'] = "FH49", [1] = { ['x'] = -519.47, ['y'] = 574.05, ['z'] = 120.61, ['h'] = 281.57 } }, [196] = { ['x'] = -470.24, ['y'] = 538.11, ['z'] = 121.46, ['name'] = "FH52", [1] = { ['x'] = -468.04, ['y'] = 542.62, ['z'] = 119.92, ['h'] = 355.06 } }, [198] = { ['x'] = -397.25, ['y'] = 512.34, ['z'] = 120.19, ['name'] = "FH54", [1] = { ['x'] = -398.63, ['y'] = 518.94, ['z'] = 119.68, ['h'] = 355.21 } }, [199] = { ['x'] = -356.43, ['y'] = 473.56, ['z'] = 112.52, ['name'] = "FH55", [1] = { ['x'] = -351.33, ['y'] = 474.70, ['z'] = 111.89, ['h'] = 299.59 } }, [202] = { ['x'] = -357.14, ['y'] = 517.38, ['z'] = 120.15, ['name'] = "FH58", [1] = { ['x'] = -362.62, ['y'] = 514.72, ['z'] = 118.67, ['h'] = 134.89 } }, [203] = { ['x'] = -312.45, ['y'] = 483.18, ['z'] = 113.46, ['name'] = "FH59", [1] = { ['x'] = -320.42, ['y'] = 480.85, ['z'] = 111.44, ['h'] = 118.55 } }, [212] = { ['x'] = -1371.63, ['y'] = 451.89, ['z'] = 105.34, ['name'] = "FH68", [1] = { ['x'] = -1376.73, ['y'] = 453.26, ['z'] = 104.04, ['h'] = 80.28 } }, [225] = { ['x'] = -463.57, ['y'] = 676.11, ['z'] = 148.54, ['name'] = "FH81", [1] = { ['x'] = -467.37, ['y'] = 673.46, ['z'] = 146.80, ['h'] = 148.40 } }, [235] = { ['x'] = -956.88, ['y'] = 804.188, ['z'] = 177.56, ['name'] = "FH91", [1] = { ['x'] = -958.62, ['y'] = 800.59, ['z'] = 176.76, ['h'] = 152.94 } }, [236] = { ['x'] = -921.15, ['y'] = 813.80, ['z'] = 184.33, ['name'] = "FH92", [1] = { ['x'] = -920.00, ['y'] = 806.38, ['z'] = 183.37, ['h'] = 189.06 } }, [237] = { ['x'] = -1004.00, ['y'] = 783.99, ['z'] = 171.38, ['name'] = "FH93", [1] = { ['x'] = -997.95, ['y'] = 786.76, ['z'] = 171.06, ['h'] = 293.50 } }, [238] = { ['x'] = -810.25, ['y'] = 803.55, ['z'] = 202.18, ['name'] = "FH94", [1] = { ['x'] = -811.60, ['y'] = 809.51, ['z'] = 201.24, ['h'] = 19.71 } }, --[ LUXURY ]----------------------------------------------------------------------------------------------------------------------------- [245] = { ['x'] = -876.54, ['y'] = -57.11, ['z'] = 38.05, ['name'] = "LX01", [1] = { ['x'] = -869.45, ['y'] = -54.25, ['z'] = 37.60, ['h'] = 281.38 } }, [246] = { ['x'] = -890.55, ['y'] = -17.35, ['z'] = 43.10, ['name'] = "LX02", [1] = { ['x'] = -885.98, ['y'] = -16.18, ['z'] = 42.15, ['h'] = 304.12 } }, [247] = { ['x'] = -872.28, ['y'] = 51.35, ['z'] = 48.78, ['name'] = "LX03", [1] = { ['x'] = -875.02, ['y'] = 46.86, ['z'] = 48.39, ['h'] = 195.46 } }, [248] = { ['x'] = -969.08, ['y'] = 107.74, ['z'] = 55.66, ['name'] = "LX04", [1] = { ['x'] = -960.77, ['y'] = 109.36, ['z'] = 55.49, ['h'] = 314.26 } }, [249] = { ['x'] = -1885.63, ['y'] = 629.92, ['z'] = 129.99, ['name'] = "LX05", [1] = { ['x'] = -1890.51, ['y'] = 626.00, ['z'] = 129.15, ['h'] = 136.16 } }, [250] = { ['x'] = -997.43, ['y'] = 142.37, ['z'] = 60.66, ['name'] = "LX06", [1] = { ['x'] = -992.02, ['y'] = 144.19, ['z'] = 59.81, ['h'] = 269.99 } }, [251] = { ['x'] = -1045.16, ['y'] = 224.98, ['z'] = 63.76, ['name'] = "LX07", [1] = { ['x'] = -1048.01, ['y'] = 219.47, ['z'] = 62.91, ['h'] = 184.73 } }, [252] = { ['x'] = -923.90, ['y'] = 212.70, ['z'] = 67.46, ['name'] = "LX08", [1] = { ['x'] = -933.57, ['y'] = 210.69, ['z'] = 66.61, ['h'] = 163.52 } }, [253] = { ['x'] = -905.04, ['y'] = 196.27, ['z'] = 69.50, ['name'] = "LX09", [1] = { ['x'] = -911.78, ['y'] = 190.68, ['z'] = 68.59, ['h'] = 179.92 } }, [254] = { ['x'] = -915.48, ['y'] = 114.68, ['z'] = 55.31, ['name'] = "LX10", [1] = { ['x'] = -920.41, ['y'] = 112.49, ['z'] = 54.47, ['h'] = 84.90 } }, [255] = { ['x'] = -931.72, ['y'] = 13.37, ['z'] = 47.91, ['name'] = "LX11", [1] = { ['x'] = -925.27, ['y'] = 9.31, ['z'] = 46.87, ['h'] = 214.83 } }, [256] = { ['x'] = -835.07, ['y'] = 119.47, ['z'] = 55.46, ['name'] = "LX12", [1] = { ['x'] = -839.12, ['y'] = 112.30, ['z'] = 54.43, ['h'] = 210.36 } }, [257] = { ['x'] = -1058.75, ['y'] = 299.58, ['z'] = 66.00, ['name'] = "LX13", [1] = { ['x'] = -1061.49, ['y'] = 305.25, ['z'] = 65.13, ['h'] = 353.81 } }, [258] = { ['x'] = -827.87, ['y'] = 267.95, ['z'] = 86.2, ['name'] = "LX14", [1] = { ['x'] = -824.72, ['y'] = 273.44, ['z'] = 85.68, ['h'] = 342.78 } }, [259] = { ['x'] = -869.56, ['y'] = 322.71, ['z'] = 83.97, ['name'] = "LX15", [1] = { ['x'] = -870.29, ['y'] = 317.83, ['z'] = 83.13, ['h'] = 186.23 } }, [260] = { ['x'] = -887.96, ['y'] = 360.73, ['z'] = 85.04, ['name'] = "LX16", [1] = { ['x'] = -888.36, ['y'] = 367.35, ['z'] = 84.55, ['h'] = 3.40 } }, [261] = { ['x'] = -1026.73, ['y'] = 363.75, ['z'] = 71.36, ['name'] = "LX17", [1] = { ['x'] = -1011.08, ['y'] = 360.01, ['z'] = 70.05, ['h'] = 331.43 } }, [262] = { ['x'] = -1555.85, ['y'] = 426.75, ['z'] = 109.62, ['name'] = "LX18", [1] = { ['x'] = -1547.98, ['y'] = 426.58, ['z'] = 109.09, ['h'] = 272.82 } }, [263] = { ['x'] = -1211.88, ['y'] = 274.79, ['z'] = 69.51, ['name'] = "LX19", [1] = { ['x'] = -1204.83, ['y'] = 267.12, ['z'] = 68.69, ['h'] = 284.35 } }, [264] = { ['x'] = -1101.71, ['y'] = 354.46, ['z'] = 68.48, ['name'] = "LX20", [1] = { ['x'] = -1096.63, ['y'] = 360.30, ['z'] = 67.69, ['h'] = 357.45 } }, [265] = { ['x'] = -1490.24, ['y'] = 18.76, ['z'] = 54.71, ['name'] = "LX21", [1] = { ['x'] = -1490.16, ['y'] = 23.07, ['z'] = 53.88, ['h'] = 354.88 } }, [266] = { ['x'] = -1457.65, ['y'] = -50.22, ['z'] = 54.65, ['name'] = "LX22", [1] = { ['x'] = -1455.68, ['y'] = -55.37, ['z'] = 52.6, ['h'] = 240.6 } }, [267] = { ['x'] = -1504.43, ['y'] = 19.84, ['z'] = 56.40, ['name'] = "LX23", [1] = { ['x'] = -1503.75, ['y'] = 26.86, ['z'] = 55.15, ['h'] = 8.38 } }, [268] = { ['x'] = -1581.46, ['y'] = -81.30, ['z'] = 54.20, ['name'] = "LX24", [1] = { ['x'] = -1577.19, ['y'] = -86.02, ['z'] = 53.29, ['h'] = 270.66 } }, [269] = { ['x'] = -1585.69, ['y'] = -55.63, ['z'] = 56.48, ['name'] = "LX25", [1] = { ['x'] = -1582.02, ['y'] = -61.06, ['z'] = 55.64, ['h'] = 270.18 } }, [270] = { ['x'] = -1558.52, ['y'] = 17.86, ['z'] = 58.83, ['name'] = "LX26", [1] = { ['x'] = -1552.69, ['y'] = 22.78, ['z'] = 57.70, ['h'] = 347.50 } }, [271] = { ['x'] = -1616.73, ['y'] = 14.71, ['z'] = 62.17, ['name'] = "LX27", [1] = { ['x'] = -1613.07, ['y'] = 20.02, ['z'] = 61.32, ['h'] = 335.94 } }, [272] = { ['x'] = -1892.99, ['y'] = 120.59, ['z'] = 81.64, ['name'] = "LX28", [1] = { ['x'] = -1887.23, ['y'] = 123.26, ['z'] = 80.86, ['h'] = 338.84 } }, [273] = { ['x'] = -1940.13, ['y'] = 179.1, ['z'] = 84.66, ['name'] = "LX29", [1] = { ['x'] = -1932.93, ['y'] = 182.84, ['z'] = 83.68, ['h'] = 307.83 } }, [276] = { ['x'] = -2000.65, ['y'] = 296.59, ['z'] = 91.76, ['name'] = "LX32", [1] = { ['x'] = -1994.21, ['y'] = 290.29, ['z'] = 90.85, ['h'] = 221.21 } }, [278] = { ['x'] = -2013.18, ['y'] = 453.64, ['z'] = 102.67, ['name'] = "LX34", [1] = { ['x'] = -2006.95, ['y'] = 454.86, ['z'] = 101.79, ['h'] = 276.63 } }, [279] = { ['x'] = -2016.62, ['y'] = 485.7, ['z'] = 107.18, ['name'] = "LX35", [1] = { ['x'] = -2011.39, ['y'] = 482.71, ['z'] = 106.07, ['h'] = 255.38 } }, [280] = { ['x'] = -1868.36, ['y'] = 192.09, ['z'] = 84.29, ['name'] = "LX36", [1] = { ['x'] = -1874.17, ['y'] = 194.45, ['z'] = 83.77, ['h'] = 126.46 } }, [281] = { ['x'] = -1899.62, ['y'] = 241.7, ['z'] = 86.26, ['name'] = "LX37", [1] = { ['x'] = -1904.45, ['y'] = 242.14, ['z'] = 85.6, ['h'] = 27.89 } }, [282] = { ['x'] = -1918.91, ['y'] = 285.25, ['z'] = 89.07, ['name'] = "LX38", [1] = { ['x'] = -1925.28, ['y'] = 283.01, ['z'] = 88.23, ['h'] = 182.84 } }, [283] = { ['x'] = -1935.69, ['y'] = 366.09, ['z'] = 93.82, ['name'] = "LX39", [1] = { ['x'] = -1940.58, ['y'] = 360.31, ['z'] = 92.55, ['h'] = 160.68 } }, [284] = { ['x'] = -1938.82, ['y'] = 386.17, ['z'] = 96.50, ['name'] = "LX40", [1] = { ['x'] = -1943.95, ['y'] = 385.19, ['z'] = 95.60, ['h'] = 96.89 } }, [285] = { ['x'] = -1937.40, ['y'] = 462.55, ['z'] = 102.42, ['name'] = "LX41", [1] = { ['x'] = -1947.37, ['y'] = 462.90, ['z'] = 101.12, ['h'] = 99.05 } }, [286] = { ['x'] = -1856.34, ['y'] = 322.60, ['z'] = 88.72, ['name'] = "LX42", [1] = { ['x'] = -1857.45, ['y'] = 328.42, ['z'] = 87.80, ['h'] = 11.41 } }, [287] = { ['x'] = -1789.94, ['y'] = 345.73, ['z'] = 88.55, ['name'] = "LX43", [1] = { ['x'] = -1790.72, ['y'] = 353.87, ['z'] = 87.72, ['h'] = 64.22 } }, [288] = { ['x'] = -1745.31, ['y'] = 368.33, ['z'] = 89.72, ['name'] = "LX44", [1] = { ['x'] = -1750.77, ['y'] = 365.56, ['z'] = 88.85, ['h'] = 114.91 } }, [289] = { ['x'] = -1665.21, ['y'] = 385.25, ['z'] = 89.49, ['name'] = "LX45", [1] = { ['x'] = -1663.42, ['y'] = 391.43, ['z'] = 88.39, ['h'] = 9.57 } }, [290] = { ['x'] = -1785.52, ['y'] = 456.14, ['z'] = 128.30, ['name'] = "LX46", [1] = { ['x'] = -1794.11, ['y'] = 459.40, ['z'] = 127.46, ['h'] = 98.09 } }, [291] = { ['x'] = -1991.66, ['y'] = 605.61, ['z'] = 117.90, ['name'] = "LX47", [1] = { ['x'] = -1985.63, ['y'] = 602.72, ['z'] = 117.28, ['h'] = 238.48 } }, [292] = { ['x'] = -1937.70, ['y'] = 529.39, ['z'] = 110.73, ['name'] = "LX48", [1] = { ['x'] = -1944.07, ['y'] = 521.99, ['z'] = 108.31, ['h'] = 71.00 } }, [294] = { ['x'] = -1977.58, ['y'] = 624.88, ['z'] = 122.53, ['name'] = "LX50", [1] = { ['x'] = -1971.35, ['y'] = 620.69, ['z'] = 121.14, ['h'] = 246.10 } }, [295] = { ['x'] = -165.40, ['y'] = 919.61, ['z'] = 235.65, ['name'] = "LX51", [1] = { ['x'] = -162.36, ['y'] = 926.68, ['z'] = 234.80, ['h'] = 234.16 } }, [296] = { ['x'] = -172.67, ['y'] = 966.12, ['z'] = 237.53, ['name'] = "LX52", [1] = { ['x'] = -167.03, ['y'] = 970.73, ['z'] = 235.79, ['h'] = 316.56 } }, [297] = { ['x'] = -124.76, ['y'] = 1010.75, ['z'] = 235.73, ['name'] = "LX53", [1] = { ['x'] = -127.89, ['y'] = 1001.16, ['z'] = 234.88, ['h'] = 198.68 } }, [298] = { ['x'] = -101.17, ['y'] = 823.95, ['z'] = 235.72, ['name'] = "LX54", [1] = { ['x'] = -105.63, ['y'] = 832.61, ['z'] = 234.86, ['h'] = 10.25 } }, [299] = { ['x'] = 220.71, ['y'] = 755.29, ['z'] = 204.85, ['name'] = "LX55", [1] = { ['x'] = 215.84, ['y'] = 759.38, ['z'] = 203.83, ['h'] = 47.56 } }, [302] = { ['x'] = 100.21, ['y'] = 563.99, ['z'] = 182.94, ['name'] = "LX58", [1] = { ['x'] = 93.13, ['y'] = 575.77, ['z'] = 182.13, ['h'] = 86.85 } }, [303] = { ['x'] = 52.84, ['y'] = 559.77, ['z'] = 180.21, ['name'] = "LX59", [1] = { ['x'] = 53.19, ['y'] = 563.71, ['z'] = 179.54, ['h'] = 21.70 } }, [304] = { ['x'] = -143.65, ['y'] = 593.14, ['z'] = 203.90, ['name'] = "LX60", [1] = { ['x'] = -142.21, ['y'] = 597.23, ['z'] = 203.12, ['h'] = 358.34 } }, [305] = { ['x'] = -196.60, ['y'] = 621.58, ['z'] = 197.91, ['name'] = "LX61", [1] = { ['x'] = -199.24, ['y'] = 615.31, ['z'] = 196.21, ['h'] = 178.98 } }, [306] = { ['x'] = -174.92, ['y'] = 590.04, ['z'] = 197.63, ['name'] = "LX62", [1] = { ['x'] = -178.23, ['y'] = 587.21, ['z'] = 197.03, ['h'] = 359.63 } }, [307] = { ['x'] = -224.87, ['y'] = 588.93, ['z'] = 190.02, ['name'] = "LX63", [1] = { ['x'] = -221.77, ['y'] = 593.25, ['z'] = 189.61, ['h'] = 331.22 } }, [308] = { ['x'] = -271.65, ['y'] = 599.10, ['z'] = 181.68, ['name'] = "LX64", [1] = { ['x'] = -272.26, ['y'] = 603.60, ['z'] = 181.15, ['h'] = 346.60 } }, [309] = { ['x'] = -241.91, ['y'] = 614.90, ['z'] = 187.77, ['name'] = "LX65", [1] = { ['x'] = -244.12, ['y'] = 610.79, ['z'] = 186.09, ['h'] = 149.22 } }, [310] = { ['x'] = -338.28, ['y'] = 630.36, ['z'] = 172.35, ['name'] = "LX66", [1] = { ['x'] = -343.97, ['y'] = 634.83, ['z'] = 171.43, ['h'] = 52.04 } }, [311] = { ['x'] = 312.70, ['y'] = 566.57, ['z'] = 154.53, ['name'] = "LX67", [1] = { ['x'] = 316.29, ['y'] = 568.06, ['z'] = 153.55, ['h'] = 220.69 } }, [312] = { ['x'] = 315.32, ['y'] = 493.62, ['z'] = 153.14, ['name'] = "LX68", [1] = { ['x'] = 321.07, ['y'] = 494.12, ['z'] = 151.61, ['h'] = 283.10 } }, [313] = { ['x'] = 326.54, ['y'] = 481.25, ['z'] = 151.26, ['name'] = "LX69", [1] = { ['x'] = 330.37, ['y'] = 482.12, ['z'] = 149.86, ['h'] = 195.82 } }, [314] = { ['x'] = 238.09, ['y'] = 526.58, ['z'] = 140.58, ['name'] = "LX70", [1] = { ['x'] = 236.21, ['y'] = 536.62, ['z'] = 139.88, ['h'] = 114.71 } }, --[ SAMIR ]------------------------------------------------------------------------------------------------------------------------------ [315] = { ['x'] = 1290.05, ['y'] = -585.69, ['z'] = 71.75, ['name'] = "LS01", [1] = { ['x'] = 1295.49, ['y'] = -567.62, ['z'] = 71.49, ['h'] = 344.65 } }, [316] = { ['x'] = 1311.03, ['y'] = -593.07, ['z'] = 72.93, ['name'] = "LS02", [1] = { ['x'] = 1319.19, ['y'] = -575.18, ['z'] = 73.25, ['h'] = 336.97 } }, [317] = { ['x'] = 1344.65, ['y'] = -609.86, ['z'] = 74.36, ['name'] = "LS03", [1] = { ['x'] = 1348.97, ['y'] = -603.76, ['z'] = 74.64, ['h'] = 334.73 } }, [318] = { ['x'] = 1359.91, ['y'] = -620.48, ['z'] = 74.34, ['name'] = "LS04", [1] = { ['x'] = 1360.55, ['y'] = -601.83, ['z'] = 74.62, ['h'] = 359.42 } }, [319] = { ['x'] = 1392.87, ['y'] = -607.72, ['z'] = 74.35, ['name'] = "LS05", [1] = { ['x'] = 1378.33, ['y'] = -596.21, ['z'] = 74.61, ['h'] = 52.88 } }, [320] = { ['x'] = 1404.84, ['y'] = -570.68, ['z'] = 74.35, ['name'] = "LS06", [1] = { ['x'] = 1387.73, ['y'] = -577.37, ['z'] = 74.62, ['h'] = 113.20 } }, [321] = { ['x'] = 1366.95, ['y'] = -544.46, ['z'] = 74.34, ['name'] = "LS07", [1] = { ['x'] = 1363.05, ['y'] = -551.94, ['z'] = 74.62, ['h'] = 157.25 } }, [322] = { ['x'] = 1360.66, ['y'] = -536.8, ['z'] = 73.78, ['name'] = "LS08", [1] = { ['x'] = 1352.89, ['y'] = -553.3, ['z'] = 74.31, ['h'] = 156.76 } }, [323] = { ['x'] = 1322.0, ['y'] = -524.9, ['z'] = 72.13, ['name'] = "LS09", [1] = { ['x'] = 1318.24, ['y'] = -532.96, ['z'] = 72.35, ['h'] = 160.86 } }, [324] = { ['x'] = 1314.79, ['y'] = -516.59, ['z'] = 71.41, ['name'] = "LS10", [1] = { ['x'] = 1307.96, ['y'] = -533.58, ['z'] = 71.56, ['h'] = 160.38 } }, [325] = { ['x'] = 1245.08, ['y'] = -518.7, ['z'] = 69.0, ['name'] = "LS11", [1] = { ['x'] = 1247.17, ['y'] = -522.7, ['z'] = 69.25, ['h'] = 257.36 } }, [326] = { ['x'] = 1251.25, ['y'] = -490.29, ['z'] = 69.5, ['name'] = "LS12", [1] = { ['x'] = 1260.63, ['y'] = -494.22, ['z'] = 69.59, ['h'] = 255.66 } }, [327] = { ['x'] = 1259.55, ['y'] = -477.81, ['z'] = 70.19, ['name'] = "LS13", [1] = { ['x'] = 1280.06, ['y'] = -472.81, ['z'] = 69.24, ['h'] = 170.02 } }, [328] = { ['x'] = 1268.56, ['y'] = -461.81, ['z'] = 69.84, ['name'] = "LS14", [1] = { ['x'] = 1270.98, ['y'] = -463.9, ['z'] = 69.87, ['h'] = 328.18 } }, [329] = { ['x'] = 1261.12, ['y'] = -426.7, ['z'] = 69.81, ['name'] = "LS15", [1] = { ['x'] = 1261.45, ['y'] = -419.35, ['z'] = 69.58, ['h'] = 297.04 } }, [330] = { ['x'] = 1234.75, ['y'] = -578.25, ['z'] = 69.49, ['name'] = "LS16", [1] = { ['x'] = 1243.86, ['y'] = -579.36, ['z'] = 69.64, ['h'] = 271.53 } }, [331] = { ['x'] = 1236.79, ['y'] = -589.55, ['z'] = 69.79, ['name'] = "LS17", [1] = { ['x'] = 1242.92, ['y'] = -586.85, ['z'] = 69.55, ['h'] = 269.57 } }, [332] = { ['x'] = 1250.47, ['y'] = -626.17, ['z'] = 69.35, ['name'] = "LS18", [1] = { ['x'] = 1259.06, ['y'] = -624.91, ['z'] = 69.58, ['h'] = 296.96 } }, [333] = { ['x'] = 1257.67, ['y'] = -660.38, ['z'] = 67.93, ['name'] = "LS19", [1] = { ['x'] = 1271.84, ['y'] = -659.12, ['z'] = 68.00, ['h'] = 293.69 } }, [334] = { ['x'] = 1267.25, ['y'] = -673.65, ['z'] = 65.75, ['name'] = "LS20", [1] = { ['x'] = 1276.75, ['y'] = -673.42, ['z'] = 66.25, ['h'] = 277.48 } }, [335] = { ['x'] = 1259.79, ['y'] = -711.08, ['z'] = 64.72, ['name'] = "LS21", [1] = { ['x'] = 1263.72, ['y'] = -716.66, ['z'] = 64.75, ['h'] = 239.07 } }, [336] = { ['x'] = 1225.19, ['y'] = -723.04, ['z'] = 60.64, ['name'] = "LS22", [1] = { ['x'] = 1223.46, ['y'] = -730.21, ['z'] = 60.40, ['h'] = 163.48 } }, [337] = { ['x'] = 1228.5, ['y'] = -703.47, ['z'] = 60.68, ['name'] = "LS23", [1] = { ['x'] = 1217.85, ['y'] = -704.09, ['z'] = 60.70, ['h'] = 97.24 } }, [338] = { ['x'] = 1220.91, ['y'] = -664.18, ['z'] = 63.13, ['name'] = "LS24", [1] = { ['x'] = 1214.36, ['y'] = -665.12, ['z'] = 62.85, ['h'] = 103.07 } }, [339] = { ['x'] = 1206.75, ['y'] = -614.0, ['z'] = 66.12, ['name'] = "LS25", [1] = { ['x'] = 1199.98, ['y'] = -612.47, ['z'] = 65.36, ['h'] = 94.40 } }, [340] = { ['x'] = 1192.48, ['y'] = -597.08, ['z'] = 64.01, ['name'] = "LS26", [1] = { ['x'] = 1188.28, ['y'] = -595.06, ['z'] = 64.23, ['h'] = 34.45 } }, [341] = { ['x'] = 1189.79, ['y'] = -573.78, ['z'] = 64.32, ['name'] = "LS27", [1] = { ['x'] = 1185.82, ['y'] = -569.96, ['z'] = 64.56, ['h'] = 25.68 } }, [342] = { ['x'] = 1191.61, ['y'] = -554.97, ['z'] = 64.71, ['name'] = "LS28", [1] = { ['x'] = 1187.47, ['y'] = -550.38, ['z'] = 64.83, ['h'] = 86.85 } }, [343] = { ['x'] = 1089.59, ['y'] = -495.42, ['z'] = 65.07, ['name'] = "LS29", [1] = { ['x'] = 1084.78, ['y'] = -493.34, ['z'] = 64.40, ['h'] = 79.01 } }, [344] = { ['x'] = 1101.7, ['y'] = -468.42, ['z'] = 67.06, ['name'] = "LS30", [1] = { ['x'] = 1091.28, ['y'] = -470.87, ['z'] = 65.47, ['h'] = 77.7 } }, [345] = { ['x'] = 1111.03, ['y'] = -417.0, ['z'] = 67.16, ['name'] = "LS31", [1] = { ['x'] = 1111.15, ['y'] = -419.57, ['z'] = 67.43, ['h'] = 83.31 } }, [346] = { ['x'] = 1112.77, ['y'] = -394.29, ['z'] = 68.74, ['name'] = "LS32", [1] = { ['x'] = 1106.07, ['y'] = -399.24, ['z'] = 68.20, ['h'] = 78.01 } }, [347] = { ['x'] = 1057.42, ['y'] = -384.09, ['z'] = 67.86, ['name'] = "LS33", [1] = { ['x'] = 1056.9, ['y'] = -388.45, ['z'] = 68.09, ['h'] = 221.13 } }, [348] = { ['x'] = 1021.13, ['y'] = -414.33, ['z'] = 65.95, ['name'] = "LS34", [1] = { ['x'] = 1022.37, ['y'] = -419.52, ['z'] = 66.05, ['h'] = 219.15 } }, [349] = { ['x'] = 1009.82, ['y'] = -418.88, ['z'] = 64.96, ['name'] = "LS35", [1] = { ['x'] = 1015.92, ['y'] = -423.87, ['z'] = 65.32, ['h'] = 217.10 } }, [350] = { ['x'] = 987.71, ['y'] = -438.07, ['z'] = 63.75, ['name'] = "LS36", [1] = { ['x'] = 995.76, ['y'] = -435.43, ['z'] = 64.23, ['h'] = 271.01 } }, [351] = { ['x'] = 971.53, ['y'] = -447.94, ['z'] = 62.41, ['name'] = "LS37", [1] = { ['x'] = 975.54, ['y'] = -454.41, ['z'] = 62.86, ['h'] = 213.74 } }, [352] = { ['x'] = 939.3, ['y'] = -463.22, ['z'] = 61.26, ['name'] = "LS38", [1] = { ['x'] = 942.05, ['y'] = -469.79, ['z'] = 61.53, ['h'] = 212.33 } }, [353] = { ['x'] = 928.77, ['y'] = -475.65, ['z'] = 60.70, ['name'] = "LS39", [1] = { ['x'] = 933.31, ['y'] = -480.49, ['z'] = 60.88, ['h'] = 203.27 } }, [354] = { ['x'] = 909.42, ['y'] = -489.73, ['z'] = 59.02, ['name'] = "LS40", [1] = { ['x'] = 914.46, ['y'] = -490.17, ['z'] = 59.29, ['h'] = 204.27 } }, [355] = { ['x'] = 873.98, ['y'] = -503.77, ['z'] = 57.50, ['name'] = "LS41", [1] = { ['x'] = 874.77, ['y'] = -507.45, ['z'] = 57.72, ['h'] = 226.29 } }, [356] = { ['x'] = 854.95, ['y'] = -516.17, ['z'] = 57.33, ['name'] = "LS42", [1] = { ['x'] = 858.81, ['y'] = -522.39, ['z'] = 57.59, ['h'] = 227.66 } }, [357] = { ['x'] = 848.57, ['y'] = -540.12, ['z'] = 57.33, ['name'] = "LS43", [1] = { ['x'] = 853.51, ['y'] = -542.76, ['z'] = 57.60, ['h'] = 266.06 } }, [358] = { ['x'] = 842.1, ['y'] = -567.41, ['z'] = 57.71, ['name'] = "LS44", [1] = { ['x'] = 849.29, ['y'] = -567.47, ['z'] = 57.99, ['h'] = 279.71 } }, [359] = { ['x'] = 868.47, ['y'] = -594.02, ['z'] = 58.30, ['name'] = "LS45", [1] = { ['x'] = 872.86, ['y'] = -590.11, ['z'] = 58.28, ['h'] = 317.23 } }, [360] = { ['x'] = 875.58, ['y'] = -602.34, ['z'] = 58.45, ['name'] = "LS46", [1] = { ['x'] = 875.55, ['y'] = -598.36, ['z'] = 58.45, ['h'] = 316.61 } }, [361] = { ['x'] = 912.15, ['y'] = -631.81, ['z'] = 58.05, ['name'] = "LS47", [1] = { ['x'] = 917.67, ['y'] = -627.46, ['z'] = 58.32, ['h'] = 319.36 } }, [362] = { ['x'] = 913.03, ['y'] = -645.12, ['z'] = 57.87, ['name'] = "LS48", [1] = { ['x'] = 917.96, ['y'] = -639.77, ['z'] = 58.14, ['h'] = 318.18 } }, [363] = { ['x'] = 946.14, ['y'] = -657.5, ['z'] = 58.02, ['name'] = "LS49", [1] = { ['x'] = 951.67, ['y'] = -654.13, ['z'] = 58.16, ['h'] = 309.34 } }, [364] = { ['x'] = 940.18, ['y'] = -672.19, ['z'] = 58.02, ['name'] = "LS50", [1] = { ['x'] = 946.99, ['y'] = -669.22, ['z'] = 58.29, ['h'] = 297.96 } }, [365] = { ['x'] = 969.7, ['y'] = -688.32, ['z'] = 57.95, ['name'] = "LS51", [1] = { ['x'] = 973.59, ['y'] = -685.58, ['z'] = 57.91, ['h'] = 309.99 } }, [366] = { ['x'] = 976.24, ['y'] = -713.97, ['z'] = 57.87, ['name'] = "LS52", [1] = { ['x'] = 982.5, ['y'] = -709.42, ['z'] = 57.88, ['h'] = 312.02 } }, [367] = { ['x'] = 1004.32, ['y'] = -734.1, ['z'] = 57.46, ['name'] = "LS53", [1] = { ['x'] = 1008.02, ['y'] = -731.13, ['z'] = 57.88, ['h'] = 311.05 } }, [368] = { ['x'] = 981.21, ['y'] = -614.8, ['z'] = 58.84, ['name'] = "LS54", [1] = { ['x'] = 973.52, ['y'] = -619.61, ['z'] = 59.10, ['h'] = 128.10 } }, [369] = { ['x'] = 959.79, ['y'] = -601.7, ['z'] = 59.50, ['name'] = "LS55", [1] = { ['x'] = 955.45, ['y'] = -598.08, ['z'] = 59.65, ['h'] = 27.96 } }, [370] = { ['x'] = 984.25, ['y'] = -579.14, ['z'] = 59.28, ['name'] = "LS56", [1] = { ['x'] = 982.93, ['y'] = -572.6, ['z'] = 59.53, ['h'] = 31.32 } }, [371] = { ['x'] = 1008.54, ['y'] = -565.15, ['z'] = 60.20, ['name'] = "LS57", [1] = { ['x'] = 1012.51, ['y'] = -563.56, ['z'] = 60.44, ['h'] = 263.72 } }, [372] = { ['x'] = 943.81, ['y'] = -243.89, ['z'] = 68.63, ['name'] = "LS58", [1] = { ['x'] = 939.22, ['y'] = -250.12, ['z'] = 68.69, ['h'] = 150.37 } }, [373] = { ['x'] = 1003.79, ['y'] = -588.12, ['z'] = 59.14, ['name'] = "LS59", [1] = { ['x'] = 1009.07, ['y'] = -590.25, ['z'] = 59.20, ['h'] = 258.95 } }, [374] = { ['x'] = 922.71, ['y'] = -564.06, ['z'] = 57.97, ['name'] = "LS60", [1] = { ['x'] = 926.46, ['y'] = -567.39, ['z'] = 58.24, ['h'] = 206.14 } }, [375] = { ['x'] = 956.87, ['y'] = -546.73, ['z'] = 59.53, ['name'] = "LS61", [1] = { ['x'] = 957.91, ['y'] = -552.49, ['z'] = 59.55, ['h'] = 211.12 } }, [376] = { ['x'] = 981.96, ['y'] = -530.0, ['z'] = 60.12, ['name'] = "LS62", [1] = { ['x'] = 983.27, ['y'] = -536.41, ['z'] = 60.19, ['h'] = 211.11 } }, [377] = { ['x'] = 1001.36, ['y'] = -510.47, ['z'] = 60.70, ['name'] = "LS63", [1] = { ['x'] = 1003.89, ['y'] = -518.48, ['z'] = 60.98, ['h'] = 205.24 } }, [378] = { ['x'] = 1045.95, ['y'] = -495.92, ['z'] = 64.08, ['name'] = "LS64", [1] = { ['x'] = 1049.91, ['y'] = -488.79, ['z'] = 64.19, ['h'] = 257.03 } }, [379] = { ['x'] = 1049.12, ['y'] = -479.89, ['z'] = 64.10, ['name'] = "LS65", [1] = { ['x'] = 1056.64, ['y'] = -483.32, ['z'] = 64.11, ['h'] = 257.85 } }, [380] = { ['x'] = 1055.36, ['y'] = -445.56, ['z'] = 65.97, ['name'] = "LS66", [1] = { ['x'] = 1062.56, ['y'] = -445.67, ['z'] = 66.16, ['h'] = 257.58 } }, [381] = { ['x'] = 1020.06, ['y'] = -464.4, ['z'] = 63.90, ['name'] = "LS67", [1] = { ['x'] = 1019.04, ['y'] = -459.29, ['z'] = 64.37, ['h'] = 38.05 } }, [382] = { ['x'] = 966.19, ['y'] = -505.37, ['z'] = 61.74, ['name'] = "LS68", [1] = { ['x'] = 960.86, ['y'] = -500.52, ['z'] = 61.65, ['h'] = 29.80 } }, [383] = { ['x'] = 950.42, ['y'] = -516.97, ['z'] = 60.25, ['name'] = "LS69", [1] = { ['x'] = 948.5, ['y'] = -511.66, ['z'] = 60.50, ['h'] = 29.22 } }, [384] = { ['x'] = 921.11, ['y'] = -527.47, ['z'] = 59.58, ['name'] = "LS70", [1] = { ['x'] = 915.83, ['y'] = -522.63, ['z'] = 59.03, ['h'] = 25.35 } }, [385] = { ['x'] = 893.88, ['y'] = -547.44, ['z'] = 58.17, ['name'] = "LS71", [1] = { ['x'] = 888.36, ['y'] = -551.92, ['z'] = 58.24, ['h'] = 115.00 } }, [386] = { ['x'] = 1103.28, ['y'] = -429.62, ['z'] = 67.4, ['name'] = "LS72", [1] = { ['x'] = 1097.86, ['y'] = -428.24, ['z'] = 66.68, ['h'] = 80.97 } }, --[ KRONDORS ]--------------------------------------------------------------------------------------------------------------------------- [387] = { ['x'] = 102.82, ['y'] = -1959.78, ['z'] = 20.84, ['name'] = "KR01", [1] = { ['x'] = 104.57, ['y'] = -1954.94, ['z'] = 20.95, ['h'] = 355.58 } }, [388] = { ['x'] = 72.16, ['y'] = -1935.47, ['z'] = 20.99, ['name'] = "KR02", [1] = { ['x'] = 81.72, ['y'] = -1932.41, ['z'] = 21.02, ['h'] = 316.63 } }, [389] = { ['x'] = 14.13, ['y'] = -1886.93, ['z'] = 23.24, ['name'] = "KR03", [1] = { ['x'] = 18.48, ['y'] = -1880.11, ['z'] = 23.28, ['h'] = 320.5 } }, [390] = { ['x'] = 98.75, ['y'] = -1907.55, ['z'] = 21.07, ['name'] = "KR04", [1] = { ['x'] = 89.81, ['y'] = -1917.18, ['z'] = 20.98, ['h'] = 140.59 } }, [391] = { ['x'] = 101.95, ['y'] = -1883.62, ['z'] = 24.02, ['name'] = "KR05", [1] = { ['x'] = 105.76, ['y'] = -1879.36, ['z'] = 24.22, ['h'] = 319.71 } }, [392] = { ['x'] = 157.6, ['y'] = -1901.16, ['z'] = 23.0, ['name'] = "KR06", [1] = { ['x'] = 162.82, ['y'] = -1899.28, ['z'] = 23.26, ['h'] = 334.81 } }, [393] = { ['x'] = 163.9, ['y'] = -1954.67, ['z'] = 19.32, ['name'] = "KR07", [1] = { ['x'] = 165.73, ['y'] = -1959.08, ['z'] = 19.43, ['h'] = 227.78 } }, [394] = { ['x'] = 152.53, ['y'] = -1960.61, ['z'] = 19.08, ['name'] = "KR08", [1] = { ['x'] = 152.79, ['y'] = -1965.88, ['z'] = 19.04, ['h'] = 228.5 } }, [395] = { ['x'] = 58.69, ['y'] = -1878.41, ['z'] = 22.39, ['name'] = "KR09", [1] = { ['x'] = 52.14, ['y'] = -1878.42, ['z'] = 22.53, ['h'] = 136.83 } }, [396] = { ['x'] = 45.4, ['y'] = -1849.13, ['z'] = 22.84, ['name'] = "KR10", [1] = { ['x'] = 41.44, ['y'] = -1853.34, ['z'] = 23.11, ['h'] = 135.2 } }, [397] = { ['x'] = -45.22, ['y'] = -1791.79, ['z'] = 27.45, ['name'] = "KR11", [1] = { ['x'] = -53.0, ['y'] = -1801.42, ['z'] = 27.36, ['h'] = 50.04 } }, [398] = { ['x'] = -54.09, ['y'] = -1781.86, ['z'] = 27.88, ['name'] = "KR12", [1] = { ['x'] = -57.67, ['y'] = -1785.85, ['z'] = 28.12, ['h'] = 136.73 } }, [399] = { ['x'] = 140.35, ['y'] = -1866.11, ['z'] = 24.32, ['name'] = "KR13", [1] = { ['x'] = 136.94, ['y'] = -1869.3, ['z'] = 24.4, ['h'] = 155.02 } }, [400] = { ['x'] = 189.37, ['y'] = -1872.27, ['z'] = 24.73, ['name'] = "KR14", [1] = { ['x'] = 186.58, ['y'] = -1877.13, ['z'] = 24.85, ['h'] = 154.49 } }, [401] = { ['x'] = 248.21, ['y'] = -1732.71, ['z'] = 29.38, ['name'] = "KR15", [1] = { ['x'] = 244.51, ['y'] = -1728.83, ['z'] = 29.5, ['h'] = 49.0 } }, [402] = { ['x'] = 272.34, ['y'] = -1704.01, ['z'] = 29.31, ['name'] = "KR16", [1] = { ['x'] = 268.09, ['y'] = -1700.73, ['z'] = 29.57, ['h'] = 49.31 } }, [403] = { ['x'] = 291.46, ['y'] = -1783.92, ['z'] = 28.26, ['name'] = "KR17", [1] = { ['x'] = 297.45, ['y'] = -1791.53, ['z'] = 28.19, ['h'] = 228.58 } }, [404] = { ['x'] = 319.33, ['y'] = -1769.51, ['z'] = 29.08, ['name'] = "KR18", [1] = { ['x'] = 321.52, ['y'] = -1773.31, ['z'] = 28.93, ['h'] = 229.23 } }, [405] = { ['x'] = 142.93, ['y'] = -1832.74, ['z'] = 27.07, ['name'] = "KR19", [1] = { ['x'] = 138.97, ['y'] = -1830.69, ['z'] = 27.29, ['h'] = 49.32 } }, [406] = { ['x'] = 83.64, ['y'] = -1973.9, ['z'] = 20.93, ['name'] = "KR20", [1] = { ['x'] = 87.72, ['y'] = -1968.8, ['z'] = 21.03, ['h'] = 319.25 } }, [407] = { ['x'] = 80.39, ['y'] = -1949.55, ['z'] = 20.8, ['name'] = "KR21", [1] = { ['x'] = 89.19, ['y'] = -1934.65, ['z'] = 20.91, ['h'] = 217.76 } }, [408] = { ['x'] = 54.53, ['y'] = -1921.05, ['z'] = 21.66, ['name'] = "KR22", [1] = { ['x'] = 62.29, ['y'] = -1910.55, ['z'] = 21.78, ['h'] = 230.76 } }, [409] = { ['x'] = 37.3, ['y'] = -1926.34, ['z'] = 21.8, ['name'] = "KR23", [1] = { ['x'] = 42.47, ['y'] = -1920.65, ['z'] = 21.94, ['h'] = 320.78 } }, [410] = { ['x'] = -10.49, ['y'] = -1883.78, ['z'] = 24.15, ['name'] = "KR24", [1] = { ['x'] = 0.4, ['y'] = -1878.23, ['z'] = 23.07, ['h'] = 319.84 } }, [411] = { ['x'] = 7.46, ['y'] = -1884.39, ['z'] = 23.32, ['name'] = "KR25", [1] = { ['x'] = 15.62, ['y'] = -1871.47, ['z'] = 23.56, ['h'] = 228.24 } }, [412] = { ['x'] = -23.09, ['y'] = -1857.7, ['z'] = 25.04, ['name'] = "KR26", [1] = { ['x'] = -22.28, ['y'] = -1852.32, ['z'] = 25.35, ['h'] = 318.16 } }, [413] = { ['x'] = -33.91, ['y'] = -1855.64, ['z'] = 26.01, ['name'] = "KR27", [1] = { ['x'] = -36.14, ['y'] = -1861.29, ['z'] = 26.03, ['h'] = 318.25 } }, [414] = { ['x'] = 123.49, ['y'] = -1927.1, ['z'] = 21.01, ['name'] = "KR28", [1] = { ['x'] = 118.66, ['y'] = -1940.02, ['z'] = 20.95, ['h'] = 86.06 } }, [415] = { ['x'] = 116.48, ['y'] = -1918.75, ['z'] = 20.94, ['name'] = "KR29", [1] = { ['x'] = 109.49, ['y'] = -1924.84, ['z'] = 21.03, ['h'] = 159.44 } }, [416] = { ['x'] = 112.4, ['y'] = -1884.8, ['z'] = 23.59, ['name'] = "KR30", [1] = { ['x'] = 125.42, ['y'] = -1877.96, ['z'] = 23.98, ['h'] = 245.04 } }, [417] = { ['x'] = 163.74, ['y'] = -1922.7, ['z'] = 21.2, ['name'] = "KR31", [1] = { ['x'] = 166.25, ['y'] = -1929.66, ['z'] = 21.29, ['h'] = 230.07 } }, [418] = { ['x'] = 142.93, ['y'] = -1970.81, ['z'] = 18.86, ['name'] = "KR32", [1] = { ['x'] = 153.95, ['y'] = -1978.59, ['z'] = 18.55, ['h'] = 139.63 } }, [419] = { ['x'] = 28.49, ['y'] = -1852.1, ['z'] = 23.68, ['name'] = "KR33", [1] = { ['x'] = 20.42, ['y'] = -1863.32, ['z'] = 23.63, ['h'] = 50.07 } }, [420] = { ['x'] = 11.84, ['y'] = -1843.19, ['z'] = 24.53, ['name'] = "KR34", [1] = { ['x'] = 8.43, ['y'] = -1845.9, ['z'] = 24.64, ['h'] = 139.44 } }, [421] = { ['x'] = 167.84, ['y'] = -1854.07, ['z'] = 24.29, ['name'] = "KR35", [1] = { ['x'] = 165.62, ['y'] = -1861.16, ['z'] = 24.41, ['h'] = 155.81 } }, [422] = { ['x'] = 206.99, ['y'] = -1892.89, ['z'] = 24.43, ['name'] = "KR36", [1] = { ['x'] = 198.9, ['y'] = -1897.55, ['z'] = 24.5, ['h'] = 142.92 } }, [423] = { ['x'] = 302.56, ['y'] = -1777.35, ['z'] = 29.1, ['name'] = "KR37", [1] = { ['x'] = 312.42, ['y'] = -1785.76, ['z'] = 28.42, ['h'] = 229.27 } }, [424] = { ['x'] = 289.96, ['y'] = -1789.91, ['z'] = 27.7, ['name'] = "KR38", [1] = { ['x'] = 297.45, ['y'] = -1791.53, ['z'] = 28.19, ['h'] = 228.58 } }, [425] = { ['x'] = 311.04, ['y'] = -1735.44, ['z'] = 29.54, ['name'] = "KR39", [1] = { ['x'] = 315.43, ['y'] = -1739.08, ['z'] = 29.73, ['h'] = 231.04 } }, [426] = { ['x'] = 269.11, ['y'] = -1728.64, ['z'] = 29.65, ['name'] = "KR40", [1] = { ['x'] = 264.26, ['y'] = -1718.68, ['z'] = 29.56, ['h'] = 49.25 } }, [427] = { ['x'] = 269.79, ['y'] = -1710.52, ['z'] = 29.34, ['name'] = "KR41", [1] = { ['x'] = 257.55, ['y'] = -1701.71, ['z'] = 29.31, ['h'] = 320.02 } }, --[ LOSVAGOS ]--------------------------------------------------------------------------------------------------------------------------- [428] = { ['x'] = 248.94, ['y'] = -1936.94, ['z'] = 24.35, ['name'] = "LV01", [1] = { ['x'] = 240.16, ['y'] = -1927.99, ['z'] = 24.39, ['h'] = 319.70 } }, [429] = { ['x'] = 269.8, ['y'] = -1932.86, ['z'] = 25.44, ['name'] = "LV02", [1] = { ['x'] = 263.07, ['y'] = -1921.28, ['z'] = 25.41, ['h'] = 54.74 } }, [430] = { ['x'] = 270.61, ['y'] = -1914.8, ['z'] = 25.81, ['name'] = "LV03", [1] = { ['x'] = 270.12, ['y'] = -1905.53, ['z'] = 26.78, ['h'] = 51.02 } }, [431] = { ['x'] = 279.17, ['y'] = -1899.45, ['z'] = 26.89, ['name'] = "LV04", [1] = { ['x'] = 269.73, ['y'] = -1892.82, ['z'] = 26.83, ['h'] = 319.63 } }, [432] = { ['x'] = 318.07, ['y'] = -1856.29, ['z'] = 27.11, ['name'] = "LV05", [1] = { ['x'] = 305.2, ['y'] = -1850.27, ['z'] = 27.0, ['h'] = 320.21 } }, [433] = { ['x'] = 340.81, ['y'] = -1849.98, ['z'] = 27.77, ['name'] = "LV06", [1] = { ['x'] = 335.81, ['y'] = -1835.98, ['z'] = 27.61, ['h'] = 44.87 } }, [434] = { ['x'] = 344.21, ['y'] = -1828.31, ['z'] = 27.95, ['name'] = "LV07", [1] = { ['x'] = 333.16, ['y'] = -1817.23, ['z'] = 27.99, ['h'] = 320.18 } }, [435] = { ['x'] = 350.15, ['y'] = -1811.51, ['z'] = 28.8, ['name'] = "LV08", [1] = { ['x'] = 342.37, ['y'] = -1806.23, ['z'] = 28.48, ['h'] = 319.97 } }, [436] = { ['x'] = 404.54, ['y'] = -1753.91, ['z'] = 29.37, ['name'] = "LV09", [1] = { ['x'] = 403.61, ['y'] = -1739.39, ['z'] = 29.54, ['h'] = 46.70 } }, [437] = { ['x'] = 430.66, ['y'] = -1741.22, ['z'] = 29.61, ['name'] = "LV10", [1] = { ['x'] = 431.33, ['y'] = -1735.54, ['z'] = 28.65, ['h'] = 50.20 } }, [438] = { ['x'] = 434.96, ['y'] = -1715.43, ['z'] = 29.33, ['name'] = "LV11", [1] = { ['x'] = 430.06, ['y'] = -1715.87, ['z'] = 28.69, ['h'] = 49.34 } }, [439] = { ['x'] = 442.86, ['y'] = -1698.41, ['z'] = 29.38, ['name'] = "LV12", [1] = { ['x'] = 442.78, ['y'] = -1693.12, ['z'] = 28.66, ['h'] = 51.33 } }, [440] = { ['x'] = 498.38, ['y'] = -1698.89, ['z'] = 29.41, ['name'] = "LV13", [1] = { ['x'] = 498.01, ['y'] = -1702.77, ['z'] = 29.64, ['h'] = 236.28 } }, [441] = { ['x'] = 479.02, ['y'] = -1718.03, ['z'] = 29.37, ['name'] = "LV14", [1] = { ['x'] = 490.02, ['y'] = -1721.93, ['z'] = 29.62, ['h'] = 251.19 } }, [442] = { ['x'] = 464.62, ['y'] = -1740.78, ['z'] = 29.11, ['name'] = "LV15", [1] = { ['x'] = 473.8, ['y'] = -1744.08, ['z'] = 29.21, ['h'] = 250.40 } }, [443] = { ['x'] = 475.52, ['y'] = -1755.13, ['z'] = 28.76, ['name'] = "LV16", [1] = { ['x'] = 488.5, ['y'] = -1757.75, ['z'] = 28.71, ['h'] = 163.16 } }, [444] = { ['x'] = 475.02, ['y'] = -1772.84, ['z'] = 28.7, ['name'] = "LV17", [1] = { ['x'] = 478.21, ['y'] = -1779.06, ['z'] = 28.93, ['h'] = 270.19 } }, [445] = { ['x'] = 511.46, ['y'] = -1778.19, ['z'] = 28.51, ['name'] = "LV18", [1] = { ['x'] = 499.79, ['y'] = -1777.14, ['z'] = 28.64, ['h'] = 201.67 } }, [446] = { ['x'] = 504.82, ['y'] = -1799.04, ['z'] = 28.49, ['name'] = "LV19", [1] = { ['x'] = 500.19, ['y'] = -1792.86, ['z'] = 28.65, ['h'] = 161.09 } }, [447] = { ['x'] = 504.77, ['y'] = -1808.65, ['z'] = 28.51, ['name'] = "LV20", [1] = { ['x'] = 491.87, ['y'] = -1805.02, ['z'] = 28.65, ['h'] = 138.92 } }, [448] = { ['x'] = 487.7, ['y'] = -1826.73, ['z'] = 28.53, ['name'] = "LV21", [1] = { ['x'] = 479.28, ['y'] = -1819.72, ['z'] = 28.1, ['h'] = 139.70 } }, [449] = { ['x'] = 431.96, ['y'] = -1828.9, ['z'] = 28.18, ['name'] = "LV22", [1] = { ['x'] = 437.06, ['y'] = -1837.91, ['z'] = 28.21, ['h'] = 223.26 } }, [450] = { ['x'] = 428.72, ['y'] = -1839.65, ['z'] = 28.08, ['name'] = "LV23", [1] = { ['x'] = 434.57, ['y'] = -1841.14, ['z'] = 28.23, ['h'] = 222.18 } }, [451] = { ['x'] = 401.5, ['y'] = -1849.32, ['z'] = 27.32, ['name'] = "LV24", [1] = { ['x'] = 401.08, ['y'] = -1855.1, ['z'] = 27.06, ['h'] = 223.65 } }, [452] = { ['x'] = 396.69, ['y'] = -1872.65, ['z'] = 26.25, ['name'] = "LV25", [1] = { ['x'] = 397.28, ['y'] = -1877.44, ['z'] = 26.35, ['h'] = 222.91 } }, [453] = { ['x'] = 385.03, ['y'] = -1890.77, ['z'] = 25.32, ['name'] = "LV26", [1] = { ['x'] = 384.63, ['y'] = -1896.36, ['z'] = 25.21, ['h'] = 222.83 } }, [454] = { ['x'] = 360.06, ['y'] = -1894.9, ['z'] = 24.99, ['name'] = "LV27", [1] = { ['x'] = 357.8, ['y'] = -1896.77, ['z'] = 25.08, ['h'] = 227.00 } }, [455] = { ['x'] = 315.73, ['y'] = -1937.5, ['z'] = 24.82, ['name'] = "LV28", [1] = { ['x'] = 315.5, ['y'] = -1942.05, ['z'] = 24.92, ['h'] = 230.52 } }, [456] = { ['x'] = 310.66, ['y'] = -1965.91, ['z'] = 23.74, ['name'] = "LV29", [1] = { ['x'] = 316.82, ['y'] = -1970.62, ['z'] = 23.69, ['h'] = 138.57 } }, [457] = { ['x'] = 299.42, ['y'] = -1971.96, ['z'] = 22.49, ['name'] = "LV30", [1] = { ['x'] = 306.82, ['y'] = -1982.39, ['z'] = 22.39, ['h'] = 139.63 } }, [458] = { ['x'] = 282.89, ['y'] = -1980.29, ['z'] = 21.4 , ['name'] = "LV31", [1] = { ['x'] = 285.64, ['y'] = -1985.85, ['z'] = 21.41, ['h'] = 229.16 } }, [459] = { ['x'] = 280.83, ['y'] = -1991.24, ['z'] = 20.46, ['name'] = "LV32", [1] = { ['x'] = 286.37, ['y'] = -1992.54, ['z'] = 20.81, ['h'] = 228.61 } }, [460] = { ['x'] = 256.42, ['y'] = -2026.71, ['z'] = 18.86, ['name'] = "LV33", [1] = { ['x'] = 267.58, ['y'] = -2029.38, ['z'] = 18.82, ['h'] = 142.23 } }, [461] = { ['x'] = 240.68, ['y'] = -2021.42, ['z'] = 18.71, ['name'] = "LV34", [1] = { ['x'] = 246.74, ['y'] = -2035.94, ['z'] = 18.53, ['h'] = 228.90 } }, [462] = { ['x'] = 241.9, ['y'] = -2042.78, ['z'] = 18.02, ['name'] = "LV35", [1] = { ['x'] = 245.74, ['y'] = -2053.88, ['z'] = 18.1, ['h'] = 134.18 } }, --[ PALETOBAY ]-------------------------------------------------------------------------------------------------------------------------- [463] = { ['x'] = -442.95, ['y'] = 6202.62, ['z'] = 29.56, ['name'] = "PB01", [1] = { ['x'] = -435.4, ['y'] = 6206.42, ['z'] = 29.57, ['h'] = 278.13 } }, [464] = { ['x'] = -375.5, ['y'] = 6187.37, ['z'] = 31.54, ['name'] = "PB02", [1] = { ['x'] = -379.5, ['y'] = 6184.85, ['z'] = 31.4, ['h'] = 223.82 } }, [465] = { ['x'] = -361.91, ['y'] = 6204.76, ['z'] = 31.58, ['name'] = "PB03", [1] = { ['x'] = -367.92, ['y'] = 6200.05, ['z'] = 31.4, ['h'] = 224.98 } }, [466] = { ['x'] = -359.1, ['y'] = 6227.29, ['z'] = 31.5, ['name'] = "PB04", [1] = { ['x'] = -349.5, ['y'] = 6217.17, ['z'] = 31.4, ['h'] = 223.88 } }, [467] = { ['x'] = -381.48, ['y'] = 6254.9, ['z'] = 31.49, ['name'] = "PB05", [1] = { ['x'] = -388.73, ['y'] = 6273.42, ['z'] = 30.02, ['h'] = 50.83 } }, [468] = { ['x'] = -360.84, ['y'] = 6265.04, ['z'] = 31.53, ['name'] = "PB06", [1] = { ['x'] = -352.17, ['y'] = 6265.07, ['z'] = 31.32, ['h'] = 46.14 } }, [469] = { ['x'] = -436.46, ['y'] = 6264.1, ['z'] = 30.09, ['name'] = "PB07", [1] = { ['x'] = -429.99, ['y'] = 6260.87, ['z'] = 30.31, ['h'] = 258.67 } }, [470] = { ['x'] = -402.95, ['y'] = 6317.15, ['z'] = 28.95, ['name'] = "PB08", [1] = { ['x'] = -396.68, ['y'] = 6311.99, ['z'] = 28.84, ['h'] = 220.70 } }, [471] = { ['x'] = -364.3, ['y'] = 6337.74, ['z'] = 29.85, ['name'] = "PB09", [1] = { ['x'] = -360.16, ['y'] = 6328.54, ['z'] = 29.75, ['h'] = 220.61 } }, [472] = { ['x'] = -311.14, ['y'] = 6310.94, ['z'] = 32.48, ['name'] = "PB10", [1] = { ['x'] = -318.17, ['y'] = 6317.76, ['z'] = 31.77, ['h'] = 45.39 } }, [473] = { ['x'] = -291.83, ['y'] = 6335.9, ['z'] = 32.49, ['name'] = "PB11", [1] = { ['x'] = -296.49, ['y'] = 6340.57, ['z'] = 31.82, ['h'] = 46.26 } }, [474] = { ['x'] = -272.11, ['y'] = 6353.73, ['z'] = 32.49, ['name'] = "PB12", [1] = { ['x'] = -267.41, ['y'] = 6355.22, ['z'] = 32.4, ['h'] = 47.15 } }, [475] = { ['x'] = -250.27, ['y'] = 6355.12, ['z'] = 31.5, ['name'] = "PB13", [1] = { ['x'] = -255.08, ['y'] = 6360.48, ['z'] = 31.39, ['h'] = 45.08 } }, [476] = { ['x'] = -271.22, ['y'] = 6408.91, ['z'] = 31.12, ['name'] = "PB14", [1] = { ['x'] = -265.26, ['y'] = 6406.49, ['z'] = 30.88, ['h'] = 210.49 } }, [477] = { ['x'] = -217.34, ['y'] = 6374.6, ['z'] = 31.68, ['name'] = "PB15", [1] = { ['x'] = -219.54, ['y'] = 6383.16, ['z'] = 31.52, ['h'] = 45.87 } }, [478] = { ['x'] = -238.3, ['y'] = 6423.56, ['z'] = 31.46, ['name'] = "PB16", [1] = { ['x'] = -233.04, ['y'] = 6420.27, ['z'] = 31.16, ['h'] = 220.84 } }, [479] = { ['x'] = -201.42, ['y'] = 6396.75, ['z'] = 31.87, ['name'] = "PB17", [1] = { ['x'] = -201.53, ['y'] = 6401.82, ['z'] = 31.77, ['h'] = 46.62 } }, [480] = { ['x'] = -229.57, ['y'] = 6445.5, ['z'] = 31.2, ['name'] = "PB18", [1] = { ['x'] = -224.33, ['y'] = 6435.29, ['z'] = 31.11, ['h'] = 22964 } }, [481] = { ['x'] = -187.33, ['y'] = 6412.01, ['z'] = 31.92, ['name'] = "PB19", [1] = { ['x'] = -187.43, ['y'] = 6418.12, ['z'] = 31.78, ['h'] = 44.99 } }, [482] = { ['x'] = -122.88, ['y'] = 6561.7, ['z'] = 29.53, ['name'] = "PB20", [1] = { ['x'] = -115.59, ['y'] = 6567.64, ['z'] = 29.43, ['h'] = 224.24 } }, [483] = { ['x'] = -101.69, ['y'] = 6531.68, ['z'] = 29.81, ['name'] = "PB21", [1] = { ['x'] = -106.48, ['y'] = 6536.09, ['z'] = 29.72, ['h'] = 45.20 } }, [484] = { ['x'] = -37.32, ['y'] = 6578.82, ['z'] = 32.35, ['name'] = "PB22", [1] = { ['x'] = -40.97, ['y'] = 6593.44, ['z'] = 30.34, ['h'] = 37.22 } }, [485] = { ['x'] = -15.06, ['y'] = 6566.75, ['z'] = 31.91, ['name'] = "PB23", [1] = { ['x'] = -8.44, ['y'] = 6561.16, ['z'] = 31.88, ['h'] = 224.22 } }, [486] = { ['x'] = 11.48, ['y'] = 6578.36, ['z'] = 33.08, ['name'] = "PB24", [1] = { ['x'] = 15.78, ['y'] = 6583.02, ['z'] = 32.35, ['h'] = 223.198 } }, [487] = { ['x'] = -17.04, ['y'] = 6598.51, ['z'] = 31.48, ['name'] = "PB25", [1] = { ['x'] = -8.5, ['y'] = 6598.24, ['z'] = 31.38, ['h'] = 39.88 } }, [488] = { ['x'] = -43.93, ['y'] = 6634.26, ['z'] = 30.23, ['name'] = "PB26", [1] = { ['x'] = -52.4, ['y'] = 6623.94, ['z'] = 29.87, ['h'] = 221,59 } }, [489] = { ['x'] = -14.79, ['y'] = 6650.52, ['z'] = 31.15, ['name'] = "PB27", [1] = { ['x'] = -15.82, ['y'] = 6645.42, ['z'] = 31.03, ['h'] = 208.00 } }, [490] = { ['x'] = 2.37, ['y'] = 6618.26, ['z'] = 31.47, ['name'] = "PB28", [1] = { ['x'] = -5.0, ['y'] = 6618.68, ['z'] = 31.34, ['h'] = 60.09 } }, [491] = { ['x'] = 25.06, ['y'] = 6601.97, ['z'] = 32.48, ['name'] = "PB29", [1] = { ['x'] = 36.23, ['y'] = 6606.74, ['z'] = 32.38, ['h'] = 267.62 } }, [492] = { ['x'] = 24.79, ['y'] = 6659.22, ['z'] = 31.65, ['name'] = "PB30", [1] = { ['x'] = 21.16, ['y'] = 6661.48, ['z'] = 31.44, ['h'] = 182.65 } }, [493] = { ['x'] = 81.27, ['y'] = 6644.04, ['z'] = 31.93, ['name'] = "PB31", [1] = { ['x'] = 72.41, ['y'] = 6635.25, ['z'] = 31.75, ['h'] = 142.72 } }, --[ MANSÃO ]----------------------------------------------------------------------------------------------------------------------------- [600] = { ['x'] = 21.41, ['y'] = 548.30, ['z'] = 176.02, ['name'] = "MS01", [1] = { ['x'] = 14.98, ['y'] = 549.89, ['z'] = 175.50, ['h'] = 60.70 } }, [601] = { ['x'] = -813.06, ['y'] = 184.23, ['z'] = 72.47, ['name'] = "MS02", [1] = { ['x'] = -821.16, ['y'] = 185.31, ['z'] = 71.25, ['h'] = 119.13 } }, [602] = { ['x'] = -681.48, ['y'] = 901.64, ['z'] = 230.57, ['name'] = "MS03", [1] = { ['x'] = -675.44, ['y'] = 903.59, ['z'] = 229.73, ['h'] = 326.35 } }, [603] = { ['x'] = -2596.87, ['y'] = 1927.04, ['z'] = 167.31, ['name'] = "MS04", [1] = { ['x'] = -2588.73, ['y'] = 1929.85, ['z'] = 166.46, ['h'] = 275.01 } }, [604] = { ['x'] = -3014.84, ['y'] = 740.75, ['z'] = 27.58, ['name'] = "MS05", [1] = { ['x'] = -3019.92, ['y'] = 740.24, ['z'] = 26.63, ['h'] = 103.34 } }, [605] = { ['x'] = -1890.29, ['y'] = -572.99, ['z'] = 11.82, ['name'] = "MS09", [1] = { ['x'] = -1886.63, ['y'] = -571.43, ['z'] = 10.93, ['h'] = 319.54 } }, [606] = { ['x'] = 1551.96, ['y'] = 2190.1, ['z'] = 78.85, ['name'] = "SS01", [1] = { ['x'] = 1554.26, ['y'] = 2196.07, ['z'] = 78.5, ['h'] = 352.11 } }, [607] = { ['x'] = -2977.14, ['y'] = 650.92, ['z'] = 25.78, ['name'] = "MS08", [1] = { ['x'] = -2982.74, ['y'] = 654.65, ['z'] = 25.015, ['h'] = 106.83 } }, [608] = { ['x'] = 1398.36, ['y'] = 1115.1, ['z'] = 114.84, ['name'] = "FZ01", [1] = { ['x'] = 1401.95, ['y'] = 1118.01, ['z'] = 114.84, ['h'] = 355.97 } }, [610] = { ['x'] = 898.81, ['y'] = -177.18, ['z'] = 73.81, ['name'] = "Taxista", [1] = { ['x'] = 898.77, ['y'] = -180.22, ['z'] = 73.81 , ['h'] = 236.69 } }, [612] = { ['x'] = 495.66, ['y'] = -1340.8, ['z'] = 29.32, ['name'] = "Mecanico", [1] = { ['x'] = 494.94, ['y'] = -1329.07, ['z'] = 29.35, ['h'] = 12.1 } }, [613] = { ['x'] = 55.96, ['y'] = 111.4, ['z'] = 79.2, ['name'] = "GoPostal", [1] = {['x'] = 60.13, ['y'] = 127.17, ['z'] = 79.23, ['h'] = 156.15 }, [2] = {['x'] = 64.51, ['y'] = 125.45, ['z'] = 79.18, ['h'] = 158.97 } }, [614] = { ['x'] = 1079.09, ['y'] = -1974.46, ['z'] = 31.48, ['name'] = "Minerador", [1] = {['x'] = 1085.59, ['y'] = -1971.82, ['z'] = 31.02, ['h'] = 57.04 } }, [615] = { ['x'] = -350.35, ['y'] = -1567.37, ['z'] = 25.23, ['name'] = "Lixeiro", [1] = { ['x'] = -342.11, ['y'] = -1554.24, ['z'] = 25.23, ['h'] = 179.47 } }, [616] = { ['x'] = 416.62, ['y'] = 6519.33, ['z'] = 27.7, ['name'] = "Leiteiro", [1] = { ['x'] = 436.06, ['y'] = 6510.89, ['z'] = 28.47, ['h'] = 87.87 } }, [617] = { ['x'] = 436.84, ['y'] = -629.92, ['z'] = 28.72, ['name'] = "Aluguel", [1] = { ['x'] = 416.18, ['y'] = -643.91, ['z'] = 28.51, ['h'] = 91.08 }, [2] = { ['x'] = 416.15, ['y'] = -646.68, ['z'] = 28.51, ['h'] = 91.08 }, [3] = { ['x'] = 416.17, ['y'] = -649.34, ['z'] = 28.51, ['h'] = 91.08 }, [4] = { ['x'] = 415.82, ['y'] = -652.14, ['z'] = 28.51, ['h'] = 91.08 }, [5] = { ['x'] = 409.12, ['y'] = -652.18, ['z'] = 28.51, ['h'] = 275.16 }, [6] = { ['x'] = 409.37, ['y'] = -649.51, ['z'] = 28.51, ['h'] = 275.16 }, [7] = { ['x'] = 409.19, ['y'] = -646.71, ['z'] = 28.51, ['h'] = 275.16 }, [8] = { ['x'] = 409.09, ['y'] = -644.05, ['z'] = 28.51, ['h'] = 275.16 }, [9] = { ['x'] = 409.03, ['y'] = -641.27, ['z'] = 28.51, ['h'] = 275.16 }, [10] = { ['x'] = 408.98, ['y'] = -638.57, ['z'] = 28.51, ['h'] = 275.16 }, [11] = { ['x'] = 408.98, ['y'] = -636.11, ['z'] = 28.51, ['h'] = 275.16 }, [12] = { ['x'] = 408.84, ['y'] = -633.43, ['z'] = 28.51, ['h'] = 275.16 } }, [618] = { ['x'] = 18.769916534424, ['y'] = -1341.9573974609, ['z'] = 29.285085678101, ['name'] = "Pizzaboy", [1] = { ['x'] = 15.510667800903, ['y'] = -1341.9783935547, ['z'] = 28.77172088623, ['h'] = 180.07662963867 }, [2] = { ['x'] = 15.473064422607, ['y'] = -1332.9193115234, ['z'] = 28.760816574097, ['h'] = 183.12673950195 } }, [619] = { ['x'] = 371.18539428711, ['y'] = 337.46740722656, ['z'] = 103.33313751221, ['name'] = "Pizzaboy", [1] = { ['x'] = 371.34317016602, ['y'] = 341.59521484375, ['z'] = 102.65760803223, ['h'] = 74.622848510742 }, [2] = { ['x'] = 366.81762695312, ['y'] = 336.00970458984, ['z'] = 102.87107849121, ['h'] = 166.05714416504 } }, [620] = { ['x'] = -720.39904785156, ['y'] = -918.14807128906, ['z'] = 19.014022827148, ['name'] = "Pizzaboy", [1] = { ['x'] = -722.87182617188, ['y'] = -916.70129394531, ['z'] = 18.500694274902, ['h'] = 269.05590820312 }, [2] = { ['x'] = -722.88671875, ['y'] = -913.26806640625, ['z'] = 18.50098991394, ['h'] = 272.48553466797 } }, [621] = { ['x'] = -47.989849090576, ['y'] = -1765.2991943359, ['z'] = 29.344999313354, ['name'] = "Pizzaboy", [1] = { ['x'] = -50.941108703613, ['y'] = -1762.169921875, ['z'] = 28.594841003418, ['h'] = 226.25650024414 }, [2] = { ['x'] = -53.17276763916, ['y'] = -1764.9597167969, ['z'] = 28.475830078125, ['h'] = 226.74600219727 } }, [622] = { ['x'] = -3039.3688964844, ['y'] = 596.87872314453, ['z'] = 7.7573394775391, ['name'] = "Pizzaboy", [1] = { ['x'] = -3051.9538574219, ['y'] = 596.70526123047, ['z'] = 6.9357471466064, ['h'] = 108.27216339111 }, [2] = { ['x'] = -3053.3334960938, ['y'] = 599.60137939453, ['z'] = 6.8395419120789, ['h'] = 106.92568969727 } }, [623] = { ['x'] = 1133.4791259766, ['y'] = -976.60131835938, ['z'] = 46.542644500732, ['name'] = "Pizzaboy", [1] = { ['x'] = 1132.3580322266, ['y'] = -972.78448486328, ['z'] = 46.074966430664, ['h'] = 189.16770935059 }, [2] = { ['x'] = 1134.9620361328, ['y'] = -972.4208984375, ['z'] = 46.107414245605, ['h'] = 190.01387023926 } }, [624] = { ['x'] = -1498.5372314453, ['y'] = -377.66760253906, ['z'] = 40.809448242188, ['name'] = "Pizzaboy", [1] = { ['x'] = -1504.4747314453, ['y'] = -384.73773193359, ['z'] = 40.052707672119, ['h'] = 136.31469726562 }, [2] = { ['x'] = -1505.9537353516, ['y'] = -382.61511230469, ['z'] = 40.314178466797, ['h'] = 138.0298614502 } }, [625] = { ['x'] = 1150.5267333984, ['y'] = -328.97421264648, ['z'] = 69.009078979492, ['name'] = "Pizzaboy", [1] = { ['x'] = 1153.5660400391, ['y'] = -331.69522094727, ['z'] = 68.353401184082, ['h'] = 10.614667892456 }, [2] = { ['x'] = 1156.9342041016, ['y'] = -331.16943359375, ['z'] = 68.393493652344, ['h'] = 8.7311668395996 } } } --[ FUNCTION ]--------------------------------------------------------------------------------------------------------------------------- local menuEnabled = false function ToggleActionMenu(name,status) if name and status then workgarage = name pointspawn = status end menuEnabled = not menuEnabled if menuEnabled then StartScreenEffect("MenuMGSelectionIn", 0, true) SetNuiFocus(true,true) SendNUIMessage({ action = "showMenu" }) else SetNuiFocus(false,false) SendNUIMessage({ action = "hideMenu" }) StopScreenEffect("MenuMGSelectionIn") end end --[ OPENGARAGE ]------------------------------------------------------------------------------------------------------------------------- function src.openGarage(work,number) ToggleActionMenu(work,parseInt(number)) end --[ VEHICLEMODS ]------------------------------------------------------------------------------------------------------------------------ function src.vehicleMods(veh,custom) if custom and veh then SetVehicleModKit(veh,0) if custom.color then SetVehicleColours(veh,tonumber(custom.color[1]),tonumber(custom.color[2])) SetVehicleExtraColours(veh,tonumber(custom.extracolor[1]),tonumber(custom.extracolor[2])) end if custom.smokecolor then SetVehicleTyreSmokeColor(veh,tonumber(custom.smokecolor[1]),tonumber(custom.smokecolor[2]),tonumber(custom.smokecolor[3])) end if custom.neon then SetVehicleNeonLightEnabled(veh,0,1) SetVehicleNeonLightEnabled(veh,1,1) SetVehicleNeonLightEnabled(veh,2,1) SetVehicleNeonLightEnabled(veh,3,1) SetVehicleNeonLightsColour(veh,tonumber(custom.neoncolor[1]),tonumber(custom.neoncolor[2]),tonumber(custom.neoncolor[3])) else SetVehicleNeonLightEnabled(veh,0,0) SetVehicleNeonLightEnabled(veh,1,0) SetVehicleNeonLightEnabled(veh,2,0) SetVehicleNeonLightEnabled(veh,3,0) end if custom.plateindex then SetVehicleNumberPlateTextIndex(veh,tonumber(custom.plateindex)) end if custom.windowtint then SetVehicleWindowTint(veh,tonumber(custom.windowtint)) end if custom.bulletProofTyres then SetVehicleTyresCanBurst(veh,custom.bulletProofTyres) end if custom.wheeltype then SetVehicleWheelType(veh,tonumber(custom.wheeltype)) end if custom.spoiler then SetVehicleMod(veh,0,tonumber(custom.spoiler)) SetVehicleMod(veh,1,tonumber(custom.fbumper)) SetVehicleMod(veh,2,tonumber(custom.rbumper)) SetVehicleMod(veh,3,tonumber(custom.skirts)) SetVehicleMod(veh,4,tonumber(custom.exhaust)) SetVehicleMod(veh,5,tonumber(custom.rollcage)) SetVehicleMod(veh,6,tonumber(custom.grille)) SetVehicleMod(veh,7,tonumber(custom.hood)) SetVehicleMod(veh,8,tonumber(custom.fenders)) SetVehicleMod(veh,10,tonumber(custom.roof)) SetVehicleMod(veh,11,tonumber(custom.engine)) SetVehicleMod(veh,12,tonumber(custom.brakes)) SetVehicleMod(veh,13,tonumber(custom.transmission)) SetVehicleMod(veh,14,tonumber(custom.horn)) SetVehicleMod(veh,15,tonumber(custom.suspension)) SetVehicleMod(veh,16,tonumber(custom.armor)) SetVehicleMod(veh,23,tonumber(custom.tires),custom.tiresvariation) if IsThisModelABike(GetEntityModel(veh)) then SetVehicleMod(veh,24,tonumber(custom.btires),custom.btiresvariation) end SetVehicleMod(veh,25,tonumber(custom.plateholder)) SetVehicleMod(veh,26,tonumber(custom.vanityplates)) SetVehicleMod(veh,27,tonumber(custom.trimdesign)) SetVehicleMod(veh,28,tonumber(custom.ornaments)) SetVehicleMod(veh,29,tonumber(custom.dashboard)) SetVehicleMod(veh,30,tonumber(custom.dialdesign)) SetVehicleMod(veh,31,tonumber(custom.doors)) SetVehicleMod(veh,32,tonumber(custom.seats)) SetVehicleMod(veh,33,tonumber(custom.steeringwheels)) SetVehicleMod(veh,34,tonumber(custom.shiftleavers)) SetVehicleMod(veh,35,tonumber(custom.plaques)) SetVehicleMod(veh,36,tonumber(custom.speakers)) SetVehicleMod(veh,37,tonumber(custom.trunk)) SetVehicleMod(veh,38,tonumber(custom.hydraulics)) SetVehicleMod(veh,39,tonumber(custom.engineblock)) SetVehicleMod(veh,40,tonumber(custom.camcover)) SetVehicleMod(veh,41,tonumber(custom.strutbrace)) SetVehicleMod(veh,42,tonumber(custom.archcover)) SetVehicleMod(veh,43,tonumber(custom.aerials)) SetVehicleMod(veh,44,tonumber(custom.roofscoops)) SetVehicleMod(veh,45,tonumber(custom.tank)) SetVehicleMod(veh,46,tonumber(custom.doors)) SetVehicleMod(veh,48,tonumber(custom.liveries)) SetVehicleLivery(veh,tonumber(custom.liveries)) ToggleVehicleMod(veh,20,tonumber(custom.tyresmoke)) ToggleVehicleMod(veh,22,tonumber(custom.headlights)) ToggleVehicleMod(veh,18,tonumber(custom.turbo)) end TriggerEvent('persistent-vehicles/update-vehicle', veh) end end --[ SPAWNVEHICLE ]----------------------------------------------------------------------------------------------------------------------- local gps = {} function src.spawnVehicle(vehname,vehengine,vehbody,vehtank,vehdirt,vehoil,vehdrvlyt,vehwheel,vehdor,vehwin,vehtyr,vehfuel,custom) if vehicle[vehname] == nil then local checkslot = 1 local mhash = GetHashKey(vehname) while not HasModelLoaded(mhash) do RequestModel(mhash) Citizen.Wait(1) end if HasModelLoaded(mhash) then while true do local checkPos = GetClosestVehicle(spawn[pointspawn][checkslot].x,spawn[pointspawn][checkslot].y,spawn[pointspawn][checkslot].z,3.001,0,71) if DoesEntityExist(checkPos) and checkPos ~= nil then checkslot = checkslot + 1 if checkslot > #spawn[pointspawn] then checkslot = -1 TriggerEvent("Notify","importante","Todas as vagas estão ocupadas no momento.",10000) break end else break end Citizen.Wait(10) end if checkslot ~= -1 then local nveh = CreateVehicle(mhash,spawn[pointspawn][checkslot].x,spawn[pointspawn][checkslot].y,spawn[pointspawn][checkslot].z+0.5,spawn[pointspawn][checkslot].h,true,false) TriggerEvent('persistent-vehicles/register-vehicle', nveh) SetVehicleIsStolen(nveh,false) SetVehicleNeedsToBeHotwired(nveh,false) SetVehicleOnGroundProperly(nveh) SetVehicleNumberPlateText(nveh,vRP.getPublicPlateNumber()) SetEntityAsMissionEntity(nveh,true,true) SetVehRadioStation(nveh,"OFF") SetVehicleEngineHealth(nveh,vehengine+0.0) SetVehicleBodyHealth(nveh,vehbody+0.0) SetVehicleFuelLevel(nveh,vehfuel+0.0) --vehdrvlyt,vehpaslyt,vehdor,vehwin,vehtyr SetVehiclePetrolTankHealth(nveh, vehtank+0.0) SetVehicleDirtLevel(nveh, vehdirt+0.0) SetVehicleOilLevel(nveh, vehoil+0.0) if vehdor ~= 0 then for i = 0,4,1 do if vehdor[tostring(i)] then SetVehicleDoorBroken(nveh, i, true) end end end if vehwin ~= 0 then for i = 0,12,1 do if vehwin[tostring(i)] then SmashVehicleWindow(nveh, i) end end end if vehtyr ~= 0 then Citizen.Trace(tostring(vehtyr['0']).. "\n") for i = 0,6,1 do Citizen.Trace(tostring(vehtyr[tostring(i)]).. "\n") if vehtyr[tostring(i)] == 'popped' then SetVehicleTyreBurst(nveh, i, 0, 100.0) elseif vehtyr[tostring(i)] == 'gone' then SetVehicleTyreBurst(nveh, i, true, 1000.0) end end end src.vehicleMods(nveh,custom) src.syncBlips(nveh,vehname) vehicle[vehname] = true gps[vehname] = true SetModelAsNoLongerNeeded(mhash) return true,VehToNet(nveh) end end end return false end function src.spawnVehicleOutside(vehname,vehengine,vehbody,vehtank,vehdirt,vehoil,vehdrvlyt,vehwheel,vehdor,vehwin,vehtyr,vehfuel,custom,pos,owner) --if vehicle[vehname] == nil then local mhash = GetHashKey(vehname) while not HasModelLoaded(mhash) do RequestModel(mhash) Citizen.Wait(1) end if HasModelLoaded(mhash) then local nveh = CreateVehicle(mhash,pos.x, pos.y, pos.z, pos.h,true,false) if pos.r then SetEntityRotation(nveh, pos.r.x, pos.r.y, pos.r.z, 1, true) end TriggerEvent('persistent-vehicles/register-vehicle', nveh) SetVehicleIsStolen(nveh,false) SetVehicleNeedsToBeHotwired(nveh,false) SetVehicleOnGroundProperly(nveh) SetVehicleNumberPlateText(nveh,vRP.getPublicPlateNumber()) SetEntityAsMissionEntity(nveh,true,true) SetVehRadioStation(nveh,"OFF") SetVehicleEngineHealth(nveh,vehengine+0.0) SetVehicleBodyHealth(nveh,vehbody+0.0) SetVehicleFuelLevel(nveh,vehfuel+0.0) --vehdrvlyt,vehpaslyt,vehdor,vehwin,vehtyr SetVehiclePetrolTankHealth(nveh, vehtank+0.0) SetVehicleDirtLevel(nveh, vehdirt+0.0) SetVehicleOilLevel(nveh, vehoil+0.0) if vehdor ~= 0 then for i = 0,4,1 do if vehdor[tostring(i)] then SetVehicleDoorBroken(nveh, i, true) end end end if vehwin ~= 0 then for i = 0,12,1 do if vehwin[tostring(i)] then SmashVehicleWindow(nveh, i) end end end if vehtyr ~= 0 then Citizen.Trace(tostring(vehtyr['0']).. "\n") for i = 0,6,1 do Citizen.Trace(tostring(vehtyr[tostring(i)]).. "\n") if vehtyr[tostring(i)] == 'popped' then SetVehicleTyreBurst(nveh, i, 0, 100.0) elseif vehtyr[tostring(i)] == 'gone' then SetVehicleTyreBurst(nveh, i, true, 1000.0) end end end src.vehicleMods(nveh,custom) if owner == true then src.syncBlips(nveh,vehname) vehicle[vehname] = true gps[vehname] = true end SetModelAsNoLongerNeeded(mhash) return true,VehToNet(nveh) end --end return false end --[ SYNCBLIPS --------------------------------------------------------------------------------------------------------------------------- function src.syncBlips(nveh,vehname) Citizen.CreateThread(function() while true do if GetBlipFromEntity(nveh) == 0 and gps[vehname] ~= nil then vehblips[vehname] = AddBlipForEntity(nveh) SetBlipSprite(vehblips[vehname],1) SetBlipAsShortRange(vehblips[vehname],false) SetBlipColour(vehblips[vehname],80) SetBlipScale(vehblips[vehname],0.4) BeginTextCommandSetBlipName("STRING") AddTextComponentString("~b~Rastreador: ~g~"..GetDisplayNameFromVehicleModel(GetEntityModel(nveh))) EndTextCommandSetBlipName(vehblips[vehname]) end Citizen.Wait(100) end end) end function src.syncBlipsOwner(nveh,vehname,pos) Citizen.CreateThread(function() vehname = GetDisplayNameFromVehicleModel(GetHashKey(vehname)) nveh = NetToVeh(nveh) vehicle[vehname] = true gps[vehname] = true if not pos then if DoesBlipExist(vehblips[vehname]) then RemoveBlip(vehblips[vehname]) end vehblips[vehname] = AddBlipForEntity(nveh) SetBlipSprite(vehblips[vehname],1) SetBlipAsShortRange(vehblips[vehname],false) SetBlipColour(vehblips[vehname],80) SetBlipScale(vehblips[vehname],0.4) BeginTextCommandSetBlipName("STRING") AddTextComponentString("~b~Rastreador: ~g~"..GetDisplayNameFromVehicleModel(GetEntityModel(nveh))) EndTextCommandSetBlipName(vehblips[vehname]) else if DoesBlipExist(vehblips[vehname]) then RemoveBlip(vehblips[vehname]) end vehblips[vehname] = AddBlipForCoord(pos.x, pos.y, pos.z) SetBlipSprite(vehblips[vehname],1) SetBlipAsShortRange(vehblips[vehname],false) SetBlipColour(vehblips[vehname],80) SetBlipScale(vehblips[vehname],0.4) BeginTextCommandSetBlipName("STRING") AddTextComponentString("~b~Rastreador: ~g~"..GetDisplayNameFromVehicleModel(GetHashKey(vehname))) EndTextCommandSetBlipName(vehblips[vehname]) end end) end --[ DELETEVEHICLE ----------------------------------------------------------------------------------------------------------------------- function src.deleteVehicle(vehicle) if IsEntityAVehicle(vehicle) then local damages = { eng = GetVehicleEngineHealth(vehicle), bod = GetVehicleBodyHealth(vehicle), tnk = GetVehiclePetrolTankHealth(vehicle), drt = GetVehicleDirtLevel(vehicle), oil = GetVehicleOilLevel(vehicle), drvlyt = GetIsLeftVehicleHeadlightDamaged(vehicle), wheel = {}, dor = {}, win = {}, tyr = {} } for i = 0,4,1 do table.insert(damages.dor, i) damages.dor[i] = false if not DoesVehicleHaveDoor(vehicle, i) then damages.dor[i] = true end end for i = 0,12,1 do table.insert(damages.win, i) damages.win[i] = false if not IsVehicleWindowIntact(vehicle, i) then damages.win[i] = true end end for i = 0,6,1 do table.insert(damages.tyr, i) damages.tyr[i] = false if IsVehicleTyreBurst(vehicle, i, true) then damages.tyr[i] = 'gone' elseif IsVehicleTyreBurst(vehicle, i, false) then damages.tyr[i] = 'popped' end end vSERVER.tryDelete(VehToNet(vehicle),damages.eng,damages.bod,damages.tnk,damages.drt,damages.oil,damages.drvlyt,damages.wheel, damages.dor,damages.win,damages.tyr,GetVehicleFuelLevel(vehicle)) end end --[ DELETEVEHICLE ]---------------------------------------------------------------------------------------------------------------------- function src.removeGpsVehicle(vehname) if vehicle[vehname] then RemoveBlip(vehblips[vehname]) vehblips[vehname] = nil gps[vehname] = nil end end --[ NOTEBOOKREMOVE ]--------------------------------------------------------------------------------------------------------------------- function src.freezeVehicleNotebook(vehicle) while not HasAnimDictLoaded(animDict) do RequestAnimDict(animDict) Citizen.Wait(1) end if IsEntityAVehicle(vehicle) then FreezeEntityPosition(vehicle,true) TaskPlayAnim(PlayerPedId(),animDict,anim,3.0,3.0,-1,49,5.0,0,0,0) SetTimeout(60000,function() FreezeEntityPosition(vehicle,false) StopAnimTask(PlayerPedId(),animDict,anim,1.0) end) end end --[ SYNCVEHICLE ]------------------------------------------------------------------------------------------------------------------------ function src.syncVehicle(vehicle) if NetworkDoesNetworkIdExist(vehicle) then local v = NetToVeh(vehicle) if DoesEntityExist(v) and IsEntityAVehicle(v) then TriggerEvent('persistent-vehicles/forget-vehicle', v) Citizen.InvokeNative(0xAD738C3085FE7E11,v,true,true) SetEntityAsMissionEntity(v,true,true) SetVehicleHasBeenOwnedByPlayer(v,true) NetworkRequestControlOfEntity(v) Citizen.InvokeNative(0xEA386986E786A54F,Citizen.PointerValueIntInitialized(v)) DeleteEntity(v) DeleteVehicle(v) SetEntityAsNoLongerNeeded(v) end end end --[ SYNCNAMEDELETE ]--------------------------------------------------------------------------------------------------------------------- function src.syncNameDelete(vehname) if vehicle[vehname] then vehicle[vehname] = nil if DoesBlipExist(vehblips[vehname]) then RemoveBlip(vehblips[vehname]) vehblips[vehname] = nil end end end --[ RETURNVEHICLE ]---------------------------------------------------------------------------------------------------------------------- function src.returnVehicle(name) return vehicle[name] end --[ VEHICLEANCHOR ]---------------------------------------------------------------------------------------------------------------------- local vehicleanchor = false function src.vehicleAnchor(vehicle) local distance = GetDistanceBetweenCoords(GetEntityCoords(PlayerPedId()),393.26,-1618.58,29.3,true) if IsEntityAVehicle(vehicle) then if distance <= 20 then if vehicleanchor then TriggerEvent("Notify","importante","Veículo destravado.",8000) FreezeEntityPosition(vehicle,false) vehicleanchor = false else TriggerEvent("Notify","importante","Veículo travado.",8000) FreezeEntityPosition(vehicle,true) vehicleanchor = true end end end end --[ BOATANCHOR ]------------------------------------------------------------------------------------------------------------------------- local boatanchor = false function src.boatAnchor(vehicle) if IsEntityAVehicle(vehicle) and GetVehicleClass(vehicle) == 14 then if boatanchor then TriggerEvent("Notify","importante","Barco desancorado.",8000) FreezeEntityPosition(vehicle,false) boatanchor = false else TriggerEvent("Notify","importante","Barco ancorado.",8000) FreezeEntityPosition(vehicle,true) boatanchor = true end end end --[ BUTTONCLICK ]------------------------------------------------------------------------------------------------------------------------ RegisterNUICallback("ButtonClick",function(data,cb) if data == "exit" then ToggleActionMenu() end end) --[ REQUESTVEHICLES ]-------------------------------------------------------------------------------------------------------------------- RegisterNUICallback("myVehicles",function(data,cb) local vehicles = vSERVER.myVehicles(workgarage) if vehicles then cb({ vehicles = vehicles }) end end) --[ COOLDOWN ]--------------------------------------------------------------------------------------------------------------------------- local cooldown = 0 Citizen.CreateThread(function() while true do Citizen.Wait(1000) if cooldown > 0 then cooldown = cooldown - 1 end end end) --[ SPAWNVEHICLES ]---------------------------------------------------------------------------------------------------------------------- RegisterNUICallback('spawnVehicles',function(data) if cooldown < 1 then cooldown = 3 vSERVER.spawnVehicles(data.name,parseInt(pointspawn)) end end) --[ DELETEVEHICLES ]--------------------------------------------------------------------------------------------------------------------- RegisterNUICallback('deleteVehicles',function(data) if cooldown < 1 then cooldown = 3 vSERVER.deleteVehicles() end end) --[ VEHICLECLIENTLOCK ]------------------------------------------------------------------------------------------------------------------ function src.vehicleClientLock(index,lock) if NetworkDoesNetworkIdExist(index) then local v = NetToEnt(index) if DoesEntityExist(v) then SetEntityAsMissionEntity(v,true,true) if lock == 1 then SetVehicleDoorsLocked(v,false) SetVehicleDoorsLockedForAllPlayers(v,false) else SetVehicleDoorsLocked(v,true) SetVehicleDoorsLockedForAllPlayers(v,true) end SetVehicleLights(v,2) Wait(200) SetVehicleLights(v,0) Wait(200) SetVehicleLights(v,2) Wait(200) SetVehicleLights(v,0) end end end --[ VEHICLECLIENTTRUNK ]----------------------------------------------------------------------------------------------------------------- function src.vehicleClientTrunk(vehid,trunk) if NetworkDoesNetworkIdExist(vehid) then local v = NetToVeh(vehid) if DoesEntityExist(v) and IsEntityAVehicle(v) then if trunk then SetVehicleDoorShut(v,5,0) else SetVehicleDoorOpen(v,5,0,0) end end end end --[ BUTTONS ]---------------------------------------------------------------------------------------------------------------------------- RegisterKeyMapping('vrp_garages:lock', '[V] Trancar/destrancar veiculo', 'keyboard', 'L') --[ BUTTONS ]---------------------------------------------------------------------------------------------------------------------------- RegisterCommand('vrp_garages:lock', function() local ped = PlayerPedId() local vehicle = vRP.getNearestVehicle(5) if vehicle and not IsPedInAnyVehicle(ped) then if cooldown < 1 then cooldown = 3 vSERVER.vehicleLock() end end end, false) Citizen.CreateThread(function() SetNuiFocus(false,false) while true do local idle = 1000 if cooldown < 1 then local ped = PlayerPedId() if not IsPedInAnyVehicle(ped) then local x,y,z = table.unpack(GetEntityCoords(ped)) for k,v in pairs(spawn) do if Vdist(x,y,z,v.x,v.y,v.z) <= 10.5 then idle = 5 DrawMarker(23,v.x,v.y,v.z-0.99, 0, 0, 0, 0, 0, 0, 0.7, 0.7, 0.5, 136, 96, 240, 180, 0, 0, 0, 0) if Vdist(x,y,z,v.x,v.y,v.z) <= 1 then DrawText3D(v.x, v.y, v.z, "Pressione [~p~E~w~] para acessar o ~p~GARAGEM~w~.") if IsControlJustPressed(0,38) then vSERVER.returnHouses(v.name,k) end end end end end end Citizen.Wait(idle) end end) --[ SYNCDOORSEVERYONE ]------------------------------------------------------------------------------------------------------------------ function src.syncVehiclesEveryone(veh,status) SetVehicleDoorsLocked(veh,status) end --[ LIMPAR ]----------------------------------------------------------------------------------------------------------------------------- RegisterNetEvent('limpar') AddEventHandler('limpar',function() local vehicle = vRP.getNearestVehicle(3) if IsEntityAVehicle(vehicle) then TriggerServerEvent("trylimpar",VehToNet(vehicle)) end end) RegisterNetEvent('synclimpar') AddEventHandler('synclimpar',function(index) if NetworkDoesNetworkIdExist(index) then local v = NetToVeh(index) local fuel = GetVehicleFuelLevel(v) if DoesEntityExist(v) then if IsEntityAVehicle(v) then SetVehicleDirtLevel(v,0.0) Citizen.InvokeNative(0xAD738C3085FE7E11,v,true,true) SetVehicleOnGroundProperly(v) SetVehicleFuelLevel(v,fuel) end end end end) --[ REPARAR ]---------------------------------------------------------------------------------------------------------------------------- RegisterNetEvent('reparar') AddEventHandler('reparar',function() local vehicle = vRP.getNearestVehicle(3) if IsEntityAVehicle(vehicle) then TriggerServerEvent("tryreparar",VehToNet(vehicle)) end end) RegisterNetEvent('syncreparar') AddEventHandler('syncreparar',function(index) if NetworkDoesNetworkIdExist(index) then local v = NetToVeh(index) local fuel = GetVehicleFuelLevel(v) if DoesEntityExist(v) then if IsEntityAVehicle(v) then SetVehicleFixed(v) --SetVehicleDirtLevel(v,0.0) SetVehicleUndriveable(v,false) Citizen.InvokeNative(0xAD738C3085FE7E11,v,true,true) SetVehicleOnGroundProperly(v) SetVehicleFuelLevel(v,fuel) end end end end) --[ REPARAR MOTOR ]---------------------------------------------------------------------------------------------------------------------- RegisterNetEvent('repararmotor') AddEventHandler('repararmotor',function() local vehicle = vRP.getNearestVehicle(3) if IsEntityAVehicle(vehicle) then TriggerServerEvent("trymotor",VehToNet(vehicle)) end end) RegisterNetEvent('syncmotor') AddEventHandler('syncmotor',function(index) if NetworkDoesNetworkIdExist(index) then local v = NetToVeh(index) if DoesEntityExist(v) then if IsEntityAVehicle(v) then SetVehicleEngineHealth(v,1000.0) end end end end) --[ SETLIVERY ]-------------------------------------------------------------------------------------------------------------------------- RegisterCommand("setlivery",function(source,args,custom) local ped = PlayerPedId() local vehicle = vRP.getNearestVehicle(5) SetVehicleLivery(vehicle,parseInt(args[1])) end) --[ RETURNLIVERY ]----------------------------------------------------------------------------------------------------------------------- function src.returnlivery(vehicle,livery) local ped = PlayerPedId() local vehicle = vRP.getNearestVehicle(5) local livery = GetVehicleLivery(vehicle) return livery end --[ GET HASH ]--------------------------------------------------------------------------------------------------------------------------- function src.getHash(vehiclehash) local vehicle = vRP.getNearestVehicle(7) local vehiclehash = GetEntityModel(vehicle) return vehiclehash end --[ FUNÇÃO DE TEXTO ]-------------------------------------------------------------------------------------------------------------------- function DrawText3D(x,y,z, text) -- some useful function, use it if you want! SetDrawOrigin(x, y, z, 0) SetTextFont(4) SetTextProportional(1) SetTextScale(0.28, 0.28) SetTextColour(255, 255, 255, 215) SetTextDropshadow(0, 0, 0, 0, 255) SetTextEdge(2, 0, 0, 0, 150) SetTextDropShadow() SetTextOutline() SetTextEntry("STRING") SetTextCentre(1) AddTextComponentString(text) DrawText(0.0, 0.0) ClearDrawOrigin() end
-- Mining Turtle Quarry Script -- Mines a quarry of the specified length, width, and depth. ------------------------- -- To Do -- -- function for general turtle movement and digging -- function (with parameters) for digging the specified dims ------------------------- --function collection local lengthGone = 0 local widthGone = 0 local depthGone = 0 function moveForward(distance) while distance > 0 do if turtle.detect() == true then turtle.dig() turtle.forward() else turtle.forward() end distance = distance - 1 end end function turnAround() turtle.turnRight() turtle.turnRight() end function length(width) while lengthGone < length then moveForward(1) lengthGone = lengthGone + 1 end if lengthGone == length do turnAround() moveForward(lengthGone) lengthGone = 0 turtle.turnLeft() moveForward(1) turtle.turnLeft() end end function depth(depth) length(width) end function quarry(length, width, depth) depth(depth) end --beginning of script quarry(length, width, depth) --en fin
-- Copyright (C) 2016 Pau Carré Cardona - All Rights Reserved -- You may use, distribute and modify this code under the -- terms of the Apache License v2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt). local torchFolder = require('paths').thisfile('..') package.path = string.format("%s;%s/?.lua", os.getenv("LUA_PATH"), torchFolder) require 'inn' require 'xlua' local nn = require 'nn' local optim = require 'optim' local torch = require 'torch' local tiefvision_commons = require '0-tiefvision-commons/tiefvision_commons' local classifier = require '5-train-classification/classifier-conv' local batchSize = 64 local inputsBatch = torch.Tensor(batchSize, 384, 11, 11):cuda() local targetsBatch = torch.Tensor(batchSize):cuda() local function getBatchesInClassAndType(class, type) local folder = tiefvision_commons.dataPath('classification', (class - 1), type) local lines = tiefvision_commons.getFiles(folder) return #lines end local function getFilename(type, cl, i) return tiefvision_commons.dataPath('classification', (cl - 1), type, i .. '.data') end local function getDataFromClassAndType(class, type) local batches = getBatchesInClassAndType(class, type) local tensor = torch.Tensor(batches, 64, 384, 11, 11) for l = 1, batches do local loadedTensor = torch.load(getFilename(type, class, l)) tensor[l] = loadedTensor collectgarbage() end return tensor:cuda() end local function getMaxIndex(outputs) local maxIndex = torch.Tensor(outputs:size()[1]) for e = 1, outputs:size()[1] do local output = outputs[e] local index = 1 for i = 1, output:size()[1] do if (output[i] > output[index]) then index = i end end maxIndex[e] = index end return maxIndex end local function correctClassNum(maxIndex, cl) local correctClass = 0 for e = 1, maxIndex:size()[1] do if (maxIndex[e] == cl) then correctClass = correctClass + 1 end end return correctClass end local function getTestError(model) local testIn = {} testIn[1] = getDataFromClassAndType(1, 'test') testIn[2] = getDataFromClassAndType(2, 'test') local classified = 0 local elements = 0 for cl = 1, 2 do local testInCl = testIn[cl] for batch = 1, testInCl:size()[1] do local output = model:forward(testInCl[batch]) output = torch.squeeze(output) local firstIndex = getMaxIndex(output) classified = classified + correctClassNum(firstIndex, cl) elements = elements + testInCl[batch]:size()[1] end end classified = classified / elements return classified end local function saveModelConv(model) local filename = tiefvision_commons.modelPath('classifier.model') print('==> Saving Model: ' .. filename) torch.save(filename, model) end local function trainBatch(model, criterion, inputsBatchLocal, targetsBatchLocal, optimState) local parameters, gradParameters = model:getParameters() local feval = function(x) if x ~= parameters then parameters:copy(x) end gradParameters:zero() local outputs = model:forward(inputsBatchLocal) local f = criterion:forward(outputs, targetsBatchLocal) local df_do = criterion:backward(outputs, targetsBatchLocal) model:backward(inputsBatchLocal, df_do) collectgarbage() return f, gradParameters end local x, fx = optim.sgd(feval, parameters, optimState) return fx[1] end local function train(model, criterion, epochs, optimState) model:training() for epoch = 1, epochs do math.randomseed(os.time()) local batchesIn1 = getBatchesInClassAndType(1, 'train') local batchesIn2 = getBatchesInClassAndType(2, 'train') for iter = 1, batchesIn1 + batchesIn2 do local batchIndexClass1 = math.random(batchesIn1) local batchIndexClass2 = math.random(batchesIn2) local batchClass1 = torch.load(getFilename('train', 1, batchIndexClass1)):cuda() local batchClass2 = torch.load(getFilename('train', 2, batchIndexClass2)):cuda() local batches = { batchClass1, batchClass2 } for batchIndex = 1, batchSize do -- select random class local cl = math.random(2) -- select random sample in batch local sampleIndex = math.random(64) inputsBatch[batchIndex] = batches[cl][sampleIndex] targetsBatch[batchIndex] = cl end local trainingLoss = trainBatch(model, criterion, inputsBatch, targetsBatch, optimState) if (iter % 10 == 0) then local meanClass = getTestError(model) print("Epoch: " .. epoch .. ". Batch: " .. iter .. ". Train Loss: " .. trainingLoss .. ". Test Accuracy: " .. meanClass) saveModelConv(model) else print("Epoch " .. epoch .. " out of " .. epochs .. ". Batch Iteration: " .. iter .. ". Train Loss: " .. trainingLoss) end collectgarbage() end end end local function loadCriterion() local criterion = nn.CrossEntropyCriterion() criterion.sizeAverage = true return criterion:cuda() end local function loadSavedModelConv() local modelPath = tiefvision_commons.modelPath('classifier.model') if(tiefvision_commons.fileExists(modelPath)) then return torch.load(modelPath) else return classifier.loadModel() end end local function getOptions() local cmd = torch.CmdLine() cmd:text() cmd:text('Foreground and Background Classification Training') cmd:text() cmd:text('Options:') cmd:option('-reset', false, 'Reset the saved model (if any) and use a new model.') cmd:option('-epochs', 10, 'Number of epochs to train.') -- optim state cmd:option('-learningRate', 1e-2, 'Learning rate.') cmd:option('-weightDecay', 0.0, 'Weight Decay (L1 regularization).') cmd:option('-momentum', 0.1, 'Momentum.') cmd:option('-learningRateDecay', 1e-7, 'Learning Rate Decay.') cmd:text() return cmd:parse(arg) end local function getModel(options) if (options.reset) then return classifier.loadModel() else return loadSavedModelConv() end end local function getOptimSatate(options) local optimState = { learningRate = options.learningRate, weightDecay = options.weightDecay, momentum = options.momentum, learningRateDecay = options.learningRateDecay } return optimState end local options = getOptions() local optimState = getOptimSatate(options) local model = getModel(options) local meanClass = getTestError(model) print("Test Accuracy:" .. meanClass) local criterion = loadCriterion() train(model, criterion, options.epochs, optimState)
local TimeParser = {} local converter = {} converter.s = 1 converter.m = 60 converter.h = converter.m * 60 converter.d = converter.h * 24 converter.w = converter.d * 7 converter.mo = converter.d * 30 converter.y = converter.d * 365 function TimeParser:Parse(ctx, raw) if raw:Trim() == "" then return false, { namespace = "parsers", key = "empty_string" } end -- Initialize time local parsedTime = 0 -- Convert given time local isConvertingNumber = true local amount, converterType = "", "" for i = 1, #raw do local letter = raw:sub( i, i ) local number = tonumber( letter ) -- Append number to amount if number then -- Add current parsed time if not isConvertingNumber then number = tonumber( amount ) if converter[converterType] then parsedTime = parsedTime + number * converter[converterType] else return false, { namespace = "parsers", key = "no_time_converter", args = { converterType } } end amount, converterType = "", "" end amount = amount .. letter isConvertingNumber = true -- Append letter to converter type else converterType = converterType .. letter isConvertingNumber = false end end -- Convert remaining time if #amount > 0 then local number = tonumber( amount ) if #converterType > 0 then if converter[converterType] then parsedTime = parsedTime + number * converter[converterType] else return false, { namespace = "parsers", key = "no_time_converter", args = { converterType } } end else -- Convert to seconds parsedTime = parsedTime + number end elseif #converterType > 0 then return false, { namespace = "parsers", key = "no_time_amount" } end return true, parsedTime end Advisor.CommandHandler.RegisterParser("time", TimeParser) Advisor.CommandHandler.RegisterParser("duration", TimeParser)
-- -- -- ---------------------------------------------------------- -- Mosaic | OF Visual Patching Developer Platform -- -- Copyright (c) 2018 Emanuele Mazza aka n3m3da -- -- Mosaic is distributed under the MIT License. This gives everyone the -- freedoms to use Mosaic in any context: commercial or non-commercial, -- public or private, open or closed source. -- -- See https://github.com/d3cod3/Mosaic for documentation -- ---------------------------------------------------------- -- -- -- DoubleFor.lua: A Basic Lua script example of control structure with double for, for Mosaic, -- mimicking the standard OF app structure -- -- -- variables for mouse interaction (DO NOT DELETE) mouseX = 0 mouseY = 0 -- Mosaic system variable for loading external resources (files) -- Example: -- img = of.Image() -- img:load(SCRIPT_PATH .. "/data/test.jpg") showCircles = false ---------------------------------------------------- function setup() end ---------------------------------------------------- function update() end ---------------------------------------------------- function draw() of.background(0) lado_w = OUTPUT_WIDTH/8 -- Local variable of the draw block lado_h = OUTPUT_HEIGHT/4 for i = 0, OUTPUT_WIDTH/lado_w do for j = 0, OUTPUT_HEIGHT/lado_h do of.setColor(255) of.noFill() of.drawRectangle(i*lado_w, j*lado_h, lado_w, lado_h) -- The double for generates a grid of rectangles in two dimensions of.drawBitmapString(string.format("i: %i",i),i*lado_w + 20,j*lado_h + 30) of.drawBitmapString(string.format("j: %i",j),i*lado_w + 20,j*lado_h + 50) -- the text indicates the i ang j value in the grid if showCircles then of.fill() of.setColor(i*20,100,j*20) of.drawCircle(i*lado_w + lado_w/2,j*lado_h + lado_h/2,20 + (i*j) ) end end end end ---------------------------------------------------- function exit() end -- input callbacks ---------------------------------------------------- function keyPressed(key) if key == string.byte('c') then showCircles = not showCircles end end function keyReleased(key) end function mouseMoved(x,y) mouseX = x mouseY = y end function mouseDragged(x,y) mouseX = x mouseY = y end function mouseReleased(x,y) end function mouseScrolled(x,y) end
minerdream = {} minerdream.path = minetest.get_modpath("minerdream") minerdream.modname = minetest.get_current_modname() minerdream.items={} minerdream.itemdef={} local S = dofile(minerdream.path .. "/intllib.lua") minerdream.intllib = S minetest.log("action", "[MOD]"..minetest.get_current_modname().." -- start loading from "..minetest.get_modpath(minetest.get_current_modname())) -- import settingtypes.txt basic_functions.import_settingtype(minerdream.path .. "/settingtypes.txt") dofile(minerdream.path .. "/config.lua") dofile(minerdream.path .. "/api.lua") dofile(minerdream.path .. "/read_ore_config.lua") --dofile(minerdream.path .. "/read_tool_config.lua") --dofile(minerdream.path .. "/read_armor_config.lua") dofile(minerdream.path .. "/items.lua") dofile(minerdream.path .. "/overrides.lua") dofile(minerdream.path .. "/blocks.lua") dofile(minerdream.path .. "/generation.lua") dofile(minerdream.path .. "/crafting.lua") dofile(minerdream.path .. "/read_weapon_config.lua") dofile(minerdream.path .. "/armor.lua") dofile(minerdream.path .. "/experiments.lua") dofile(minerdream.path .. "/read_mobs_config.lua") minetest.log("action", "[MOD]"..minetest.get_current_modname().." -- loaded ") --for i,tdef in pairs(minerdream.itemdef) do -- local file=io.open(minerdream.path.."/config/"..i..".json","w") -- local jsonout=minetest.write_json(tdef) -- file:write(jsonout) -- file:close() ---- print(dump(tdef)) --end
local sx, sy = guiGetScreenSize() local localPlayer = getLocalPlayer() local statusLabel = nil local openReports = 0 local handledReports = 0 local unansweredReports = {} local ownReports = {} -- Admin Titles function getAdminTitle(thePlayer) local adminLevel = tonumber(getElementData(thePlayer, "adminlevel")) or 0 local text = ({ "Trial Admin", "Admin", "Super Admin", "Lead Admin", "Head Admin", "Owner" })[adminLevel] or "Player" local hiddenAdmin = getElementData(thePlayer, "hiddenadmin") or 0 if (hiddenAdmin==1) then text = text .. " (Hidden)" end return text end function getAdminCount() local online, duty, lead, leadduty = 0, 0, 0, 0 for key, value in ipairs(getElementsByType("player")) do if (isElement(value)) then local level = getElementData( value, "adminlevel" ) or 0 if level >= 1 then online = online + 1 local aod = getElementData( value, "adminduty" ) or 0 if aod == 1 then duty = duty + 1 end if level >= 4 then lead = lead + 1 if aod == 1 then leadduty = leadduty + 1 end end end end end return online, duty, lead, leadduty end -- update the labels local function updateGUI() if statusLabel then local online, duty, lead, leadduty = getAdminCount() local reporttext = "" if #unansweredReports > 0 then reporttext = ": #" .. table.concat(unansweredReports, ", #") end local ownreporttext = "" if #ownReports > 0 then ownreporttext = ": #" .. table.concat(ownReports, ", #") end local onduty = "Off Duty" if getElementData( localPlayer, "adminduty" ) == 1 then onduty = "On Duty" end guiSetText( statusLabel, getAdminTitle( localPlayer ) .. " :: " .. onduty .. " :: " .. getElementData( localPlayer, "gameaccountusername" ) .. " :: " .. duty .. "/" .. online .. " Admins :: " .. leadduty .. "/" .. lead .. " Lead+ Admins :: " .. ( openReports - handledReports ) .. " unanswered reports" .. reporttext .. " :: " .. handledReports .. " handled reports" .. ownreporttext ) end end -- create the gui local function createGUI() if statusLabel then destroyElement(statusLabel) statusLabel = nil end local adminlevel = getElementData( localPlayer, "adminlevel" ) if adminlevel then if adminlevel > 0 then statusLabel = guiCreateLabel( 5, sy - 20, sx - 10, 15, "", false ) updateGUI() --guiCreateLabel ( float x, float y, float width, float height, string text, bool relative, [element parent = nil] ) end end end addEventHandler( "onClientResourceStart", getResourceRootElement(), createGUI, false ) addEventHandler( "onClientElementDataChange", localPlayer, function(n) if n == "adminlevel" or n == "hiddenadmin" then createGUI() end end, false ) addEventHandler( "onClientElementDataChange", getRootElement(), function(n) if getElementType(source) == "player" and ( n == "adminlevel" or n == "adminduty" ) then updateGUI() end end ) addEvent( "updateReportsCount", true ) addEventHandler( "updateReportsCount", getLocalPlayer(), function( open, handled, unanswered, own ) openReports = open handledReports = handled unansweredReports = unanswered ownReports = own or {} updateGUI() end, false ) addEventHandler( "onClientPlayerQuit", getRootElement(), updateGUI )
local msg = require "toy.logger" local bfs = require "toy.path" local logname = "mylog.txt" if bfs.exists(logname) then bfs.remove(logname) end msg.as_file(logname) msg.print("log system日誌系統") msg.print("ToyBox;玩具箱;おもちゃ箱;장난감 상자;खिलौनो का बक्सा") msg.reset() msg.print("log system日誌系統") msg.print("ToyBox;玩具箱;おもちゃ箱;장난감 상자;खिलौनो का बक्सा")
return { { name = "2015-08-03-132400_init_basicauth", up = [[ CREATE TABLE IF NOT EXISTS basicauth_credentials( id varchar(50), consumer_id varchar(50) , username varchar(100) UNIQUE, password varchar(100), created_at timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (id), CONSTRAINT basicauth_consumerid_fk FOREIGN KEY (consumer_id) REFERENCES consumers(id) ON DELETE CASCADE , INDEX basicauth_username_idx(username), INDEX basicauth_consumer_id_idx(consumer_id) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC; ]], down = [[ DROP TABLE basicauth_credentials; ]] } }
return { -- <cd src/arch/arm64/include/uapi && find * -name '*.h' -exec printf "\t'%s',\n" {} + | LC_COLLATE=C sort 'asm/auxvec.h', 'asm/bitsperlong.h', 'asm/bpf_perf_event.h', 'asm/byteorder.h', 'asm/fcntl.h', 'asm/hwcap.h', 'asm/kvm.h', 'asm/mman.h', 'asm/param.h', 'asm/perf_regs.h', 'asm/posix_types.h', 'asm/ptrace.h', 'asm/setup.h', 'asm/sigcontext.h', 'asm/signal.h', 'asm/statfs.h', 'asm/sve_context.h', 'asm/ucontext.h', 'asm/unistd.h', unistd={}, }
return function(eva) ------------------------------------------------------------------------------- local function translate(block,target,output,stack) stack=stack or {} local class,type_=block.block_type:match("(.+)_(.+)") if target.blocks[class][type_] then stack[#stack+1]=block target.blocks[class][type_](block,target,output,stack) stack[#stack]=nil else print(("Warning: %s is not implemented"):format( block.block_type )) end end ------------------------------------------------------------------------------- return translate end
local constants = require "kong.constants" return { limit = { required = true, type = "number" }, period = { required = true, type = "string", enum = constants.RATELIMIT.PERIODS } }
function drawDarkness() love.graphics.setColor(0, 0, 0) love.graphics.polygon("fill", 240, 0, 1683, 0, 960, 720) love.graphics.setColor(255, 255, 255) end
local env,java=env,java local event,packer,cfg,init=env.event.callback,env.packer,env.set,env.init local set_command,exec_command=env.set_command,env.exec_command local db2=env.class(env.db_core) db2.module_list={ "sqlstate", "snap", "sql", "chart", "ssh", } function db2:ctor(isdefault) self.type="db2" self.C,self.props={},{} end function db2:connect(conn_str) java.system:setProperty('db2.jcc.charsetDecoderEncoder',3) local args local usr,pwd,conn_desc if type(conn_str)=="table" then args=conn_str usr,pwd,conn_desc=conn_str.user, packer.unpack_str(conn_str.password), conn_str.url:match("//(.*)$")--..(conn_str.internal_logon and " as "..conn_str.internal_logon or "") args.password=pwd conn_str=string.format("%s/%s@%s",usr,pwd,conn_desc) else usr,pwd,conn_desc = string.match(conn_str or "","(.*)/(.*)@(.+)") end if conn_desc == nil then return exec_command("HELP",{"CONNECT"}) end conn_desc=conn_desc:gsub('^(/+)','') local server,port,alt,database=conn_desc:match('^([^:/%^]+)(:?%d*)(%^?[^/]*)/(.+)$') if database then if port=="" then port=':50000' end conn_desc=server..port..'/'..database local alt_addr,alt_port=alt:gsub('[%s%^]+',''):match('([^:]+)(:*.*)') else database=conn_desc end self.MAX_CACHE_SIZE=cfg.get('SQLCACHESIZE') local url, isdba=conn_desc:match('^(.*) as (%w+)$') url = url or conn_desc args=args or {user=usr,password=pwd,url="jdbc:db2://"..url, internal_logon=isdba, server=server, database=database, enableSysplexWLB='true', enableSeamlessFailover='1', clientRerouteAlternateServerName=alt_addr, clientRerouteAlternatePortNumber=alt_addr and (alt_port or port):sub(2)} self:merge_props( {driverClassName="com.ibm.db2.jcc.DB2Driver", retrieveMessagesFromServerOnGetMessage='true', clientProgramName='SQL Developer', useCachedCursor=self.MAX_CACHE_SIZE },args) self:load_config(url,args) local prompt=(args.jdbc_alias or url):match('([^:/@]+)$') if event then event("BEFORE_DB2_CONNECT",self,sql,args,result) end env.set_title("") self.super.connect(self,args) self.conn=java.cast(self.conn,"com.ibm.db2.jcc.DB2Connection") self.MAX_CACHE_SIZE=cfg.get('SQLCACHESIZE') local version=self:get_value("select SERVICE_LEVEL FROM TABLE(sysproc.env_get_inst_info())") table.clear(self.props) self.props.db_version=version:gsub('DB2',''):match('([%d%.]+)') self.props.db_user=args.user:upper() self.props.database=database self.conn_str=packer.pack_str(conn_str) prompt=(prompt or database:upper()):match("^([^,%.&]+)") env.set_prompt(nil,prompt,nil,2) env.set_title(('%s - User: %s Server: %s Version: DB2(%s)'):format(database,self.props.db_user,server,self.props.db_version)) if event then event("AFTER_DB2_CONNECT",self,sql,args,result) end print("Database connected.") end function db2:exec(sql,...) local bypass=self:is_internal_call(sql) local args,prep_params=nil,{} local is_not_prep=type(sql)~="userdata" if type(select(1,...) or "")=="table" then args=select(1,...) if type(select(2,...) or "")=="table" then prep_params=select(2,...) end else args={...} end if is_not_prep then sql=event("BEFORE_DB2_EXEC",{self,sql,args}) [2] end local result=self.super.exec(self,sql,...) if is_not_prep and not bypass then event("AFTER_DB2_EXEC",self,sql,args,result) self.print_feed(sql,result) end return result end function db2:command_call(sql,...) local bypass=self:is_internal_call(sql) local args=type(select(1,...)=="table") and ... or {...} sql=event("BEFORE_DB2_EXEC",{self,sql,args}) [2] local result=self.super.exec(self,sql,{args}) if not bypass then event("AFTER_DB2_EXEC",self,sql,args,result) end self:print_result(result,sql) end function db2:admin_cmd(cmd) env.checkhelp(cmd) self:command_call('call sysproc.admin_cmd(:1)',cmd or "") end function db2:onload() local default_desc='#DB2 database SQL statement' local function add_default_sql_stmt(...) for i=1,select('#',...) do set_command(self,select(i,...), default_desc,self.command_call,true,1,true) end end add_default_sql_stmt('update','delete','insert','merge','truncate','drop') add_default_sql_stmt('explain','lock','analyze','grant','revoke','call','select','with') local conn_help = [[ Connect to db2 database. Usage: conn <user>/<password>@[//]<host>[:<port>][^<alt_purescale_hosts>[:<alt_purescale_ports>] ]/<database> Example: 1) Connect to local db port 50000 : conn db2admin/db2pwd@localhost/sample 2) Connect to remote db port 60000 : conn db2admin/db2pwd@remote_host:60000/sample 3) Connect to remote PureScale db#1: conn db2admin/db2pwd@192.168.6.1:60000^192.168.6.2,192.168.6.3/sample 4) Connect to remote PureScale db#2: conn db2admin/db2pwd@192.168.6.1:60001^192.168.6.2:60002/sample ]] set_command(self,{"connect",'conn'}, conn_help,self.connect,false,2) set_command(self,{"declare","begin"}, default_desc, self.command_call ,self.check_completion,1,true) set_command(self,"create", default_desc, self.command_call ,self.check_completion,1,true) set_command(self,"alter" , default_desc, self.command_call ,true,1,true) for _,k in ipairs{'DESCRIBE','add','AUTOCONFIGURE','BACKUP','LOAD','IMPORT','EXPORT','FORCE','QUIESCE','PRUNE', 'REDISTRIBUTE','RUNSTATS','UNQUIESCE','REWIND','RESET'} do set_command(self,k, default_desc,self.admin_cmd,true,1,true) end set_command(self,'adm', 'Run procedure ADMIN_CMD. Usage: adm <statement>',self.admin_cmd,true,2,true) --env.event.snoop('ON_SQL_ERROR',self.handle_error,nil,1) end function db2:onunload() env.set_title("") end return db2.new()
local LOG = {} local _prompt = "[wagon]" local _color = function (str) return str:gsub("%%%{.-%}", "") end do local ok, color = pcall(require, 'ansicolors') if ok then _prompt = color "%{yellow bright}[wagon]%{reset}" _color = color end end function LOG.info(line, ...) return LOG.raw(_prompt .. " " .. line, ...) end function LOG.raw(line, ...) return print(_color(line):format(...)) end return LOG
function get_remainder(n, m): remainder = n while remainder > m do remainder = remainder - m end return remainder end for line in io.lines(arg[1]) do n = m = io.write(get_remainder(n, m) .. '\n') end
--- basic 9p interactions class 'np_prot' --- read stat from path specified -- @tparam conn conn 9p connection -- @tparam string path path of file for stat to be read -- @treturn table stat function np_prot.stat_read(conn, path) local f = conn:newfid() if path == "/" then conn:clone(conn.rootfid, f) else conn:walk(conn.rootfid, f, path) end conn:open(f, 0) local st = conn:stat(f) conn:clunk(f) return st end --- read file from path specified -- @tparam conn conn 9p connection -- @tparam string path path to the file to be read -- @treturn string file content function np_prot.file_read(conn, path) local f = conn:newfid() conn:walk(conn.rootfid, f, path) conn:open(f, 0) local buf_size = 8000 local offset = 0 local response = "" while (true) do local dt = conn:read(f, offset, buf_size) if (dt == nil) then break end response = response .. tostring(dt) offset = offset + #dt end conn:clunk(f) return response end --- create file at path with given name -- @tparam conn conn 9p connection -- @tparam string path path to the directory in which file will be created -- @tparam string file_name name of the file to be created -- @treturn nil function np_prot.file_create(conn, path, file_name) local f, g = conn:newfid(), conn:newfid() if path == "/" then conn:clone(conn.rootfid, f) else conn:walk(conn.rootfid, f, path) end conn:clone(f, g) conn:create(g, file_name, 420, 1) conn:clunk(f) conn:clunk(g) end --- write to the file specified -- @tparam conn conn 9p connection -- @tparam string path path to the file to be edited -- @tparam string content new content of the file -- @treturn nil function np_prot.file_write(conn, path, content) local f = conn:newfid() conn:walk(conn.rootfid, f, path) conn:open(f, 1) local buf = data.new(content) conn:write(f, 0, buf) local st = conn:stat(f) st.length = #buf conn:wstat(f, st) conn:clunk(f) end
regex1 = "^[%w.+-=]+@%w+[%w.]*%w*%.%w%w%w?%w?$" regex2 = "^\"[%w@.+-=]+\"@%w+[%w.]*%w*%.%w%w%w?%w?$" for line in io.lines(arg[1]) do print((line:find(regex1) or line:find(regex2)) and "true" or "false") end
----------------------------------------------------------------------------------------- -- -- main.lua -- ----------------------------------------------------------------------------------------- -- Your code here local options = { width = 174, height = 160, numFrames = 4 } local sheet_handmade = graphics.newImageSheet( "chicken_handmade.png", options ) local sequenceData1 = { name="fly", start=1, count=4, time=500, loopCount = 0, loopDirection = "bounce" } local chicken1 = display.newSprite( sheet_handmade, sequenceData1 ) chicken1.x = display.contentCenterX chicken1.y = display.contentCenterY * 0.3 chicken1:play() local sheetInfo = require("chicken_packer") local sheet_packer = graphics.newImageSheet( "chicken_packer.png", sheetInfo:getSheet() ) local sequenceData2 = { name="fly", frames={sheetInfo:getFrameIndex("blitzsubspeed1"), sheetInfo:getFrameIndex("blitzsubspeed2"), sheetInfo:getFrameIndex("blitzsubspeed3"), sheetInfo:getFrameIndex("blitzsubspeed4")}, time=500, loopCount = 0, loopDirection = "bounce" } local chicken2 = display.newSprite( sheet_packer , sequenceData2 ) chicken2.x = display.contentCenterX chicken2.y = display.contentCenterY * 1.3 chicken2:play()
object_tangible_veteran_reward_frn_vet_6_year_painting = object_tangible_veteran_reward_shared_frn_vet_6_year_painting:new { } ObjectTemplates:addTemplate(object_tangible_veteran_reward_frn_vet_6_year_painting, "object/tangible/veteran_reward/frn_vet_6_year_painting.iff")
--[[ Copyright (c) 2015 Kzisor/Ysovuka ]] local _G = _G or GLOBAL local _M = env local assert = _G.assert local error = assert( _G.error ) local rawget = assert( _G.rawget ) local setmetatable = assert( _G.setmetatable ) local setfenv = assert( _G.setfenv ) --[[ The following is to prevent this file from being ran more than once. This is necessary to allow it to be loaded both from modmain.lua, modworldgenmain.lua and other mods, without the former load overriding the latter. ]] local _IDENTIFIER = "mod.environment" if _G.rawget(_G.package.loaded, _IDENTIFIER) then return _G.package.loaded[_IDENTIFIER] end local function preload_searcher(self, name) return self.package.preload[name] ~= nil and self.package.preload[name] or "No field package[ '"..name.."' ] found." end local function default_searcher(self, name) name = name:gsub("[.\\]", "/") local fail_pieces = {} for pathspec in self.package.path:gmatch("[^;]+") do local path = pathspec:gsub("%?", name, 1) if _G.kleifileexists(path) then local fn = _G.kleiloadlua(path) return type(fn) == "function" and fn or error(tostring(fn or "Unknown error"), 3) else table.insert(fail_pieces, "\tNo file '"..path.."' found.") end end return table.concat(fail_pieces, "\n") end -- Create the table to clone the global variables. local function CreateNewEnvironment(env) setmetatable(env, { __index = _G and function(t, k) return rawget(t, k) or rawget(_G, k) or rawget(env, k) end, }) return env end local Requirer = Class(function(self, default_env, load_once) default_env = CreateNewEnvironment(default_env or _G) self.package = { path = MODROOT.."?.lua", searchers = { preload_searcher, default_searcher }, preload = {}, loaded = {}, } self.package.loaders = self.package.searchers function self:GetDefaultEnvironment() return default_env end end) function Requirer:GetEnvironment() return self.env or self:GetDefaultEnvironment() end function Requirer:SetEnviornment(env) self.env = env end function Requirer:__call(name) if self.package.loaded[name] then return self.package.loaded[name] elseif _G.package.loaded[name] then return _G.package.loaded[name] else local fail_pieces = {} for _, searcher in ipairs(self.package.searchers) do local fn = searcher(self, name) if type(fn) == "function" then _G.setfenv(fn, self:GetEnvironment()) self.package.loaded[name] = fn(name) or self.package.loaded[name] or true _G.package.loaded[name] = self.package.loaded[name] return self.package.loaded[name] elseif type(fn) == "string" then table.insert(fail_pieces, fn) end end table.insert(fail_pieces, 1, ("Mod module '%s' not found:"):format(name)) return error(table.concat(fail_pieces, "\n"), 2) end end function Requirer:ExportAs(id) _G.package.loaded[id] = self end local ModRequirer = Class(Requirer, function(self) Requirer._ctor(self, _M) end) function ModRequirer:GetModEnvironment() return self:GetDefaultEnvironment() end function ModRequirer:GetModInfo() return self:GetModEnvironment().modinfo end use = ModRequirer() _G[_IDENTIFIER] = use function _G.IsDontStarveTogether() return kleifileexists("scripts/networking.lua") and true or false end return use
object_building_general_srii_skyscraper_08 = object_building_general_shared_srii_skyscraper_08:new { } ObjectTemplates:addTemplate(object_building_general_srii_skyscraper_08, "object/building/general/srii_skyscraper_08.iff")
--!A cross-platform build utility based on Lua -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. -- -- Copyright (C) 2015 - 2019, TBOOX Open Source Group. -- -- @author ruki -- @file filter.lua -- -- define module: filter local filter = filter or {} -- load modules local os = require("base/os") local winos = require("base/winos") local table = require("base/table") local utils = require("base/utils") local string = require("base/string") -- globals local escape_table1 = {["$"] = "\001", ["("] = "\002", [")"] = "\003", ["%"] = "\004"} local escape_table2 = {["\001"] = "$", ["\002"] = "(", ["\003"] = ")", ["\004"] = "%"} -- new filter instance function filter.new() -- init an filter instance local self = table.inherit(filter) -- init handler self._HANDLERS = {} -- ok return self end -- filter the shell command -- -- e.g. -- -- print("$(shell echo hello xmake)") -- add_ldflags("$(shell pkg-config --libs sqlite3)") -- function filter.shell(cmd) -- empty? if #cmd == 0 then os.raise("empty $(shell)!") end -- run shell local ok, outdata, errdata = os.iorun(cmd) if not ok then os.raise("run $(shell %s) failed, errors: %s", cmd, errdata or "") end -- trim it if outdata then outdata = outdata:trim() end -- return the shell result return outdata end -- filter the environment variables function filter.env(name) return os.getenv(name) end -- filter the winreg path function filter.reg(path) -- must be windows if os.host() ~= "windows" then return end -- query registry value return (winos.registry_query(path)) end -- set handlers function filter:set_handlers(handlers) self._HANDLERS = handlers end -- get handlers function filter:handlers() return self._HANDLERS end -- register handler function filter:register(name, handler) self._HANDLERS[name] = handler end -- get variable value function filter:get(variable) -- check assert(variable) -- is shell? if variable:startswith("shell ") then return filter.shell(variable:sub(7)) -- is environment variable? elseif variable:startswith("env ") then return filter.env(variable:sub(5)) elseif variable:startswith("reg ") then return filter.reg(variable:sub(5)) end -- parse variable:mode local varmode = variable:split(':') local mode = varmode[2] variable = varmode[1] -- handler it local result = nil for name, handler in pairs(self._HANDLERS) do result = handler(variable) if result then break end end -- TODO need improve -- handle mode if mode and result then if mode == "upper" then result = result:upper() elseif mode == "lower" then result = result:lower() end end -- ok? return result end -- filter the builtin variables: "hello $(variable)" for string -- -- e.g. -- -- print("$(host)") -- print("$(env PATH)") -- print("$(shell echo hello xmake!)") -- print("$(reg HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\XXXX;Name)") -- function filter:handle(value) -- check assert(type(value) == "string") -- escape "%$", "%(", "%)", "%%" to "\001", "\002", "\003", "\004" value = value:gsub("%%([%$%(%)%%])", function (ch) return escape_table1[ch] end) -- filter the builtin variables return (value:gsub("%$%((.-)%)", function (variable) -- escape "%$", "%(", "%)", "%%" to "$", "(", ")", "%" variable = variable:gsub("[\001\002\003\004]", function (ch) return escape_table2[ch] end) -- get variable value return self:get(variable) or "" end):gsub("[\001\002\003\004]", function (ch) return escape_table2[ch] end)) end -- return module: filter return filter
return PlaceObj("ModDef", { "dependencies", { PlaceObj("ModDependency", { "id", "ChoGGi_Library", "title", "ChoGGi's Library", "version_major", 10, "version_minor", 3, }), }, "title", "Waste Rock Grinder", "id", "ChoGGi_WasteRockGrinder", "steam_id", "2544246919", "pops_any_uuid", "53a56418-38cd-4b05-bc06-144a517292b7", "lua_revision", 1007000, -- Picard "version", 1, "version_major", 0, "version_minor", 1, "image", "Preview.jpg", "author", "ChoGGi", "code", { "Code/Script.lua", }, --~ "has_options", true, "TagBuildings", true, "description", [[ Automated waste rock extractor that produces waste rock (and dust). Produces 24 per Sol. Requested by Rejected Spawn. ]], })
--[[ Forward and backward combined. ]]-- require 'nn' require 'nnx' require 'cunn' require 'cudnn' require 'cutorch' paths.dofile('para_model.lua') local ParallelNet_Mod,ParallelNet = torch.class("nn.ParallelNet_Mod",'nn.ParallelNet') function ParallelNet_Mod:__init(config, layer) print("Parallel Model (Combination) Initialization.") ParallelNet.__init(self, config, layer) end function ParallelNet_Mod:make_NewActivation() print("ParallelNet_Comb Activation Building...") self.new_act = nn.Sequential() local input_layer = nn.ParallelTable() local net_input = nn.Sequential() local net_rele = nn.Sequential() net_input:add(nn.SpatialSymmetricPadding(1,1,1,1)) net_rele :add(nn.SpatialSymmetricPadding(1,1,1,1)) net_input:add(cudnn.SpatialConvolution(self.from_nfeat,self.from_nfeat/2,3,3,1,1)) net_rele :add(cudnn.SpatialConvolution(self.from_nfeat,self.from_nfeat/2,3,3,1,1)) input_layer:add(net_input):add(net_rele) self.new_act:add(input_layer):add(nn.JoinTable(2)) -- join at (batch,x,256,256) self.new_act:add(nn.SpatialSymmetricPadding(1,1,1,1)) self.new_act:add(cudnn.SpatialConvolution(self.from_nfeat,self.from_nfeat,3,3,1,1)) self.new_act = self.new_act:cuda() end return nn.ParallelNet_Mod
local cfg = {} -- paycheck and bill for users cfg.message_paycheck = "Você recebeu seu salario: ~g~$" -- message that will show before payment of salary cfg.message_bill = "Pagamento de contas: ~r~$" -- message that will show before payment of bill cfg.post = "." -- message that will show after payment cfg.bank = true -- if true money goes to bank, false goes to wallet cfg.minutes_paycheck = 30 -- minutes between payment for paycheck cfg.minutes_bill = 30 -- minutes between withdrawal for bill cfg.paycheck_title_picture = "Banco do Brasil" -- define title for paycheck notification picture cfg.paycheck_picture = "CHAR_BANK_MAZE" -- define paycheck notification picture want's to display cfg.bill_title_picture = "Compania de Seguro" -- define title for bill notification picture cfg.bill_picture = "CHAR_MP_MORS_MUTUAL" -- define bill notification picture want's to display cfg.paycheck = { -- ["permission"] = paycheck ["police.paycheck"] = 1600, --[""] = 0, ["emergency.paycheck"] = 2000, ["taxi.paycheck"] = 800, ["repair.paycheck"] = 800, ["bankdriver.paycheck"] = 1200, ["diretorchefe.paycheck"] = 15000, ["delivery.paycheck"] = 500 } cfg.bill = { -- ["permission"] = withdrawal ["police.paycheck"] = 450, --[""] = 0, ["emergency.paycheck"] = 150, ["taxi.paycheck"] = 125, ["repair.paycheck"] = 100, ["bankdriver.paycheck"] = 220, ["diretorchefe.paycheck"] = 2500, ["delivery.paycheck"] = 350 } return cfg
-- type = github -- DO NOT REMOVE THIS LINE! local name = "kubeval" local release = "v0.16.1" local version = "0.16.1" local org = "instrumenta" local repo = "kubeval" local base_url = "https://github.com/" .. org .. "/" .. repo food = { name = name, description = "Validate your Kubernetes configuration files, supports multiple Kubernetes versions", license = "NOASSERTION", homepage = "https://kubeval.com", version = version, packages = { { os = "darwin", arch = "amd64", url = base_url .. "/releases/download/" .. release .. "/" .. name .. "-darwin-amd64.tar.gz", sha256 = "c79a91f2e6638463881a8189e0628ebd583a5e2912e6f411897e3cea567125e7", resources = { { path = name, installpath = "bin/" .. name, executable = true } } }, { os = "linux", arch = "amd64", url = base_url .. "/releases/download/" .. release .. "/" .. name .. "-linux-amd64.tar.gz", sha256 = "2d6f9bda1423b93787fa05d9e8dfce2fc1190fefbcd9d0936b9635f3f78ba790", resources = { { path = name, installpath = "bin/" .. name, executable = true } } }, { os = "windows", arch = "amd64", url = base_url .. "/releases/download/" .. release .. "/" .. name .. "-windows-amd64.zip", sha256 = "3732bd6874f5f508a2f2faa2e47d117562195a94bf2dd20c22036968f26e416a", resources = { { path = name .. ".exe", installpath = "bin\\" .. name .. ".exe" } } } } }
require("Game/particleEffect.lua") --this = SceneNode() local waveData = {} local statsBilboard = Core.getBillboard("stats") -- function: updateDead -- purpose: to garantee that no more updates are called function updateDead() return false end -- function: cleanUpCrystal -- purpose: cleares up all debri when the crystal detonates function cleanUpCrystal() if model then --destroy model if model then model:destroyTree() model = nil end --pEffect node if destroyNode then destroyNode:destroyTree() end --physic node for i=1, #rigidBodies do rigidBodies[i]:destroyTree() end end end -- function: restoreCrystal -- purpose: restores the crystal to default setting function restoreCrystal() this:setLocalPosition(localPos) this:getChildNode(0):setVisible(true) end -- function: restartMap -- purpose: prepare the script to manage the restart of the map function restartMap() cleanUpCrystal() update = updateDead particleNode:destroyTree() pLight:destroyTree() this:loadLuaScript(this:getCurrentScript():getFileName()); end -- function: defeated -- purpose: function create() --comUnit rigidBodies = {} model = nil restartListener = Listener("Restart") restartListener:registerEvent("restart", restartMap) --crystal timer = 0.0 localPos = this:getLocalPosition() pLight = PointLight(Vec3(2.0,0.4,0.0),3.5) pLight:setLocalPosition(Vec3(0,0.5,0)) this:addChild(pLight) particleNode = SceneNode() this:addChild(particleNode) --spirits spiritCount = 20 spirits = {} for i=1, spiritCount do spirits[i] = {time1=math.randomFloat()*16.0,time2=math.randomFloat()*16.0,timeMul1=math.randomFloat(0.30,0.50),timeMul2=math.randomFloat(0.075,0.15),mat1=Matrix(),mat2=Matrix(),axis=math.randomVec3(),posVec=math.randomVec3()*0.78,effect=ParticleSystem(ParticleEffect.endCrystalSpirit)} local spirit = spirits[i] spirit.mat1:createMatrix(math.randomVec3(),math.randomVec3()) spirit.mat2:createMatrix(math.randomVec3(),math.randomVec3()) particleNode:addChild(spirit.effect) spirit.effect:activate(Vec3()) end explosion = {size=0} return true end -- function: update -- purpose: updates the script every frame function update() if statsBilboard then local count = statsBilboard:getInt("life") --manage if spirit count have changed if count~=spiritCount then if spiritCount==0 and count>0 then --restore the crystal cleanUpCrystal() restoreCrystal() elseif count==0 and spiritCount>0 then --destroy crystal destroyCrystal() end if count<spiritCount then --we lost a spirit spiritLost() end spiritCount = count --set visability on spirits for i=1, 20 do spirits[i].effect:setVisible(i<=spiritCount) end end --update spirits and crystal if spiritCount>0 then --spirits for i=1, spiritCount do local spirit = spirits[i] spirit.time1 = spirit.time1 + Core.getDeltaTime()*spirit.timeMul1 spirit.time2 = spirit.time2 + Core.getDeltaTime()*spirit.timeMul2 spirit.mat1:rotate(spirit.axis,spirit.time1) spirit.mat2:rotate(spirit.mat1:getUpVec(),spirit.time2) spirit.effect:setLocalPosition(spirit.mat2*spirit.posVec+Vec3(0.0,1.05,0.0)) end --crystal timer = timer + (Core.getDeltaTime()*0.75) this:setLocalPosition(Vec3(0,0.25+0.1*math.sin(timer),0)+localPos) end else statsBilboard = Core.getBillboard("stats") end return true end -- function: destroyCrystal -- purpose: makes a nice effect where the crystal is shattered inti several pices function destroyCrystal() if not model then --particle effect destroyNode = SceneNode() destroyNode:setLocalPosition(localPos) this:getParent():addChild(destroyNode) effect = ParticleSystem(ParticleEffect.endCrystalExplosion) destroyNode:addChild(effect) effect:activate(Vec3(0,0.75,0)) --physic model=Core.getModel("end_crystal_cracked.mym") this:getParent():addChild(model) model:setLocalMatrix(this:getLocalMatrix()) model:setVisible(false) for i=1, 24 do local atVec = model:getMesh("crystal"..i):getLocalPosition()-Vec3(0.0,0.3,0.0) atVec = Vec3(atVec.x*6,atVec.y*4,atVec.z*6) rigidBodies[#rigidBodies+1] = RigidBody(this:findNodeByType(NodeId.island),model:getMesh("crystal"..i),atVec) end this:getChildNode(0):setVisible(false) --this:setVisible(false) end end -- function: spiritLost -- purpose: detonates one spirit and hides it function spiritLost() if spiritCount>0 then doSpiritExplosion(spirits[spiritCount].effect:getLocalPosition()) -- spirits[spiritCount].effect:setVisible(false) end end -- function: doSpiritExplosion -- purpose: generats the particle effect for the detonation of the spirit function doSpiritExplosion(pos) for i=1, explosion.size do if explosion[i]:isActive()==false then explosion[i]:activate(pos) return end end explosion.size = explosion.size + 1 explosion[explosion.size] = ParticleSystem(ParticleEffect.endCrystalSpiritExplosion) this:addChild(explosion[explosion.size]) explosion[explosion.size]:activate(pos) end
local map = vim.api.nvim_buf_set_keymap local file = vim.fn.expand('%') -- compile map(0, "n", "<Leader>c", ":te arduino-cli compile --fqbn arduino:avr:uno " .. file .. "<CR>", {noremap = true}) -- execute map(0, "n", "<Leader>e", ":te arduino-cli upload -p /dev/ttyACM0 --fqbn arduino:avr:uno " .. file .. "<CR>", {noremap = true}) -- open serial port map(0, "n", "<Leader>s", ":te screen /dev/ttyACM0<CR>", {noremap = true}) -- comment & uncomment map(0, "v", "C", ":s.^.//<CR>gv", {noremap = true}) map(0, "v", "U", ":s.//.<CR>gv", {noremap = true})
local Name="luxulux" local char=workspace[Name] color2=BrickColor:Black() color=BrickColor:White() pcall(function() workspace[Name].Suit:remove() end) pcall(function() char.Eye:remove() end) pcall(function() game.Players[Name].PlayerGui:children()[1]:remove() end) player = game.Players[Name] player.Character.Humanoid.WalkSpeed = 30 model = Instance.new("Model") model.Parent = char model.Name = "Suit" Eye=Instance.new("Model") Eye.Name="Eye" Eye.Parent=char char.Humanoid.MaxHealth = math.huge wait(0.5) char.Humanoid.Health = char.Humanoid.MaxHealth for _,v in pairs(char:children()) do if v:IsA("Hat") then v:remove() end end Tor=Instance.new("Part") Tor.Size=char.Torso.Size Tor.BrickColor=color Tor.Reflectance=0 Tor.Transparency=0 Tor.CanCollide=false Tor.Parent=model Mesh=Instance.new("BlockMesh") Mesh.Parent=Tor Mesh.Scale=Vector3.new(1.01,0.9,1.01) w = Instance.new("Weld") w.Parent = char.Torso w.Part0 = w.Parent w.Part1 = Tor w.C0 = CFrame.new(0,0,0) Sm=Instance.new("Smoke") Sm.Size=2 Sm.RiseVelocity=0 Sm.Color=color2.Color --Sm.Parent=Tor for _,v in pairs(char:children()) do if string.sub(v.Name,1,4)=="Left" or string.sub(v.Name,1,4)=='Righ' then Tor=Instance.new("Part") Tor.Size=v.Size Tor.BrickColor=color Tor.Reflectance=0 Tor.Transparency=0 Tor.CanCollide=false Tor.Parent=model Mesh=Instance.new("BlockMesh") Mesh.Parent=Tor Mesh.Scale=Vector3.new(1.01,0.9,1.01) w = Instance.new("Weld") w.Parent = v w.Part0 = w.Parent w.Part1 = Tor w.C0 = CFrame.new(0,0,0) end end char.Head.BrickColor=color pcall(function() char.Head.face:remove() end) ----Eye---- Tor=Instance.new("Part") Tor.Size=Vector3.new(1,1,1) Tor.Shape="Ball" Tor.BrickColor=color Tor.Reflectance=0 Tor.Transparency=0 Tor.Locked=true Tor.CanCollide=true Tor.Parent=Eye Tor.TopSurface="Smooth" Tor.BottomSurface="Smooth" Mesh=Instance.new("SpecialMesh") Mesh.MeshType="Sphere" Mesh.Parent=Tor Mesh.Scale=Vector3.new(1.65,1.65,1.65) w = Instance.new("Weld") w.Parent = char.Head w.Part0 = w.Parent w.Part1 = Tor w.C0 = CFrame.new(0,0,0) Tor=Instance.new("Part") Tor.Size=Vector3.new(1,1,1) Tor.BrickColor=color2 Tor.Reflectance=0 Tor.Transparency=0 Tor.CanCollide=false Tor.Parent=Eye Mesh=Instance.new("SpecialMesh") Mesh.MeshType="Sphere" Mesh.Parent=Tor Mesh.Scale=Vector3.new(.27,0.27,0.27) w = Instance.new("Weld") w.Parent = char.Head w.Part0 = w.Parent w.Part1 = Tor w.C0 = CFrame.new(0,0,-0.75) Tor=Instance.new("Part") Tor.Size=Vector3.new(1,1,1) Tor.BrickColor=color2 Tor.Reflectance=0 Tor.Transparency=0.2 Tor.CanCollide=false Tor.Parent=Eye Mesh=Instance.new("BlockMesh") Mesh.Parent=Tor Mesh.Scale=Vector3.new(.3,0.35,0.01) w = Instance.new("Weld") w.Parent = char.Head w.Part0 = w.Parent w.Part1 = Tor w.C0 = CFrame.new(0,0,-0.78) Tor=Instance.new("Part") Tor.Size=Vector3.new(1,1,1) Tor.BrickColor=color2 Tor.Reflectance=0 Tor.Transparency=0.2 Tor.CanCollide=false Tor.Parent=Eye Mesh=Instance.new("BlockMesh") Mesh.Parent=Tor Mesh.Scale=Vector3.new(.3,0.35,0.01) w = Instance.new("Weld") w.Parent = char.Head w.Part0 = w.Parent w.Part1 = Tor w.C0 = CFrame.new(0,0,-0.78)*CFrame.Angles(0,0,math.rad(90)) ----/Eye---- ----Design 1---- Tor=Instance.new("Part") Tor.Size=Vector3.new(1,1,1) Tor.BrickColor=color2 Tor.Reflectance=0 Tor.Transparency=0 Tor.CanCollide=false Tor.Parent=model Mesh=Instance.new("BlockMesh") Mesh.Parent=Tor Mesh.Scale=Vector3.new(.4,0.4,0.01) w = Instance.new("Weld") w.Parent = char.Torso w.Part0 = w.Parent w.Part1 = Tor w.C0 = CFrame.new(0,0,-0.51) Tor=Instance.new("Part") Tor.Size=Vector3.new(1,1,1) Tor.BrickColor=color2 Tor.Reflectance=0 Tor.Transparency=0 Tor.CanCollide=false Tor.Parent=model Mesh=Instance.new("CylinderMesh") Mesh.Parent=Tor Mesh.Scale=Vector3.new(.5,0.5,0.049) w = Instance.new("Weld") w.Parent = char.Torso w.Part0 = w.Parent w.Part1 = Tor w.C0 = CFrame.new(0,0,-0.49)*CFrame.Angles(0,0,math.rad(90)) Tor=Instance.new("Part") Tor.Size=Vector3.new(1,1,1) Tor.BrickColor=color2 Tor.Reflectance=0 Tor.Transparency=0 Tor.CanCollide=false Tor.Parent=model Mesh=Instance.new("CylinderMesh") Mesh.Parent=Tor Mesh.Scale=Vector3.new(.5,0.5,0.049) w = Instance.new("Weld") w.Parent = char.Torso w.Part0 = w.Parent w.Part1 = Tor w.C0 = CFrame.new(0,0,-0.49) Tor=Instance.new("Part") Tor.Size=Vector3.new(1,1,1) Tor.BrickColor=color Tor.Reflectance=0 Tor.Transparency=0 Tor.CanCollide=false Tor.Parent=model Mesh=Instance.new("SpecialMesh") Mesh.MeshType="Sphere" Mesh.Parent=Tor Mesh.Scale=Vector3.new(.25,.25,.25) w = Instance.new("Weld") w.Parent = char.Torso w.Part0 = w.Parent w.Part1 = Tor w.C0 = CFrame.new(0,0,-0.49) Tor=Instance.new("Part") Tor.Size=Vector3.new(1,1,1) Tor.BrickColor=color2 Tor.Reflectance=0 Tor.Transparency=0 Tor.CanCollide=false Tor.Parent=model Mesh=Instance.new("CylinderMesh") Mesh.Parent=Tor Mesh.Scale=Vector3.new(.5,0.5,0.049) w = Instance.new("Weld") w.Parent = char.Torso w.Part0 = w.Parent w.Part1 = Tor w.C0 = CFrame.new(0.27,0,-0.49) Tor=Instance.new("Part") Tor.Size=Vector3.new(1,1,1) Tor.BrickColor=color2 Tor.Reflectance=0 Tor.Transparency=0 Tor.CanCollide=false Tor.Parent=model Mesh=Instance.new("CylinderMesh") Mesh.Parent=Tor Mesh.Scale=Vector3.new(.5,0.5,0.049) w = Instance.new("Weld") w.Parent = char.Torso w.Part0 = w.Parent w.Part1 = Tor w.C0 = CFrame.new(-0.27,0,-0.49) Tor=Instance.new("Part") Tor.Size=Vector3.new(1,1,1) Tor.BrickColor=color2 Tor.Reflectance=0 Tor.Transparency=0 Tor.CanCollide=false Tor.Parent=model Mesh=Instance.new("CylinderMesh") Mesh.Parent=Tor Mesh.Scale=Vector3.new(.5,0.5,0.049) w = Instance.new("Weld") w.Parent = char.Torso w.Part0 = w.Parent w.Part1 = Tor w.C0 = CFrame.new(0,0.295,-0.49)*CFrame.Angles(0,0,math.rad(90)) Tor=Instance.new("Part") Tor.Size=Vector3.new(1,1,1) Tor.BrickColor=color2 Tor.Reflectance=0 Tor.Transparency=0 Tor.CanCollide=false Tor.Parent=model Mesh=Instance.new("CylinderMesh") Mesh.Parent=Tor Mesh.Scale=Vector3.new(.5,0.5,0.049) w = Instance.new("Weld") w.Parent = char.Torso w.Part0 = w.Parent w.Part1 = Tor w.C0 = CFrame.new(0,-0.295,-0.49)*CFrame.Angles(0,0,math.rad(90)) ----/Design 1---- ----Design 2---- Tor=Instance.new("Part") Tor.Size=Vector3.new(1,1,1) Tor.BrickColor=color2 Tor.Reflectance=0 Tor.Transparency=0 Tor.CanCollide=false Tor.Parent=model Mesh=Instance.new("BlockMesh") Mesh.Parent=Tor Mesh.Scale=Vector3.new(.72,.05,1.1) w = Instance.new("Weld") w.Parent = char["Left Arm"] w.Part0 = w.Parent w.Part1 = Tor w.C0 = CFrame.new(-0.17,-0.275,0) Tor=Instance.new("Part") Tor.Size=Vector3.new(1,1,1) Tor.BrickColor=color2 Tor.Reflectance=0 Tor.Transparency=0 Tor.CanCollide=false Tor.Parent=model Mesh=Instance.new("BlockMesh") Mesh.Parent=Tor Mesh.Scale=Vector3.new(.72,.05,1.1) w = Instance.new("Weld") w.Parent = char["Right Arm"] w.Part0 = w.Parent w.Part1 = Tor w.C0 = CFrame.new(0.17,-0.275,0) Tor=Instance.new("Part") Tor.Size=Vector3.new(1,1,1) Tor.BrickColor=color2 Tor.Reflectance=0 Tor.Transparency=0 Tor.CanCollide=false Tor.Parent=model Mesh=Instance.new("BlockMesh") Mesh.Parent=Tor Mesh.Scale=Vector3.new(.72,.05,1.1) w = Instance.new("Weld") w.Parent = char["Left Arm"] w.Part0 = w.Parent w.Part1 = Tor w.C0 = CFrame.new(-0.17,0.3,0) Tor=Instance.new("Part") Tor.Size=Vector3.new(1,1,1) Tor.BrickColor=color2 Tor.Reflectance=0 Tor.Transparency=0 Tor.CanCollide=false Tor.Parent=model Mesh=Instance.new("BlockMesh") Mesh.Parent=Tor Mesh.Scale=Vector3.new(.72,.05,1.1) w = Instance.new("Weld") w.Parent = char["Right Arm"] w.Part0 = w.Parent w.Part1 = Tor w.C0 = CFrame.new(0.17,0.3,0) ----/Design2---- ----Design 3---- Tor=Instance.new("Part") Tor.Size=Vector3.new(1,1,1) Tor.BrickColor=color2 Tor.Reflectance=0 Tor.Transparency=0 Tor.CanCollide=false Tor.Parent=model Mesh=Instance.new("BlockMesh") Mesh.Parent=Tor Mesh.Scale=Vector3.new(.72,.05,1.1) w = Instance.new("Weld") w.Parent = char["Left Leg"] w.Part0 = w.Parent w.Part1 = Tor w.C0 = CFrame.new(-0.17,-0.275,0) Tor=Instance.new("Part") Tor.Size=Vector3.new(1,1,1) Tor.BrickColor=color2 Tor.Reflectance=0 Tor.Transparency=0 Tor.CanCollide=false Tor.Parent=model Mesh=Instance.new("BlockMesh") Mesh.Parent=Tor Mesh.Scale=Vector3.new(.72,.05,1.1) w = Instance.new("Weld") w.Parent = char["Right Leg"] w.Part0 = w.Parent w.Part1 = Tor w.C0 = CFrame.new(0.17,-0.275,0) Tor=Instance.new("Part") Tor.Size=Vector3.new(1,1,1) Tor.BrickColor=color2 Tor.Reflectance=0 Tor.Transparency=0 Tor.CanCollide=false Tor.Parent=model Mesh=Instance.new("BlockMesh") Mesh.Parent=Tor Mesh.Scale=Vector3.new(.72,.05,1.1) w = Instance.new("Weld") w.Parent = char["Left Leg"] w.Part0 = w.Parent w.Part1 = Tor w.C0 = CFrame.new(-0.17,0.3,0) Tor=Instance.new("Part") Tor.Size=Vector3.new(1,1,1) Tor.BrickColor=color2 Tor.Reflectance=0 Tor.Transparency=0 Tor.CanCollide=false Tor.Parent=model Mesh=Instance.new("BlockMesh") Mesh.Parent=Tor Mesh.Scale=Vector3.new(.72,.05,1.1) w = Instance.new("Weld") w.Parent = char["Right Leg"] w.Part0 = w.Parent w.Part1 = Tor w.C0 = CFrame.new(0.17,0.3,0) ----Design3---- ----Eye Tool---- function tras(...) for _,v in pairs(...) do pcall(function() v.Transparency=1 v.CanCollide=false end) end end function nontras(...) for _,v in pairs(...) do pcall(function() v.Transparency=0 v.CanCollide=true end) end end if script.Parent.className~="HopperBin" then Hopper=Instance.new("HopperBin") Hopper.Name="Fly" Hopper.Parent=player.Backpack LA=Instance.new("HopperBin") LA.Name="Laser" LA.Parent=game.Players[Name].Backpack script.Parent=Hopper Sw=Instance.new("Tool") Sw.Name="Sword" Sw.Parent=game.Players[Name].Backpack end Hopper=script.Parent LA=player.Backpack.Laser Sw=player.Backpack.Sword Up=1 function Button1own(mouse) BodyP.Parent=nil local eye=Eye:children()[1] BodyV=Instance.new("BodyVelocity") BodyV.Name="BodyV" BodyV.Parent=char.Head BodyV.maxForce=Vector3.new(math.huge,math.huge,math.huge) BodyGyro=Instance.new("BodyGyro") BodyGyro.maxTorque=Vector3.new(math.huge,math.huge,math.huge) BodyGyro.Parent=char.Head Up=0 local spd = 35 repeat wait(0.2) BodyGyro.cframe=CFrame.new(char.Head.Position,mouse.Hit.p) BodyV.velocity=mouse.Hit.lookVector*spd until Up==1 pcall(function() char.Head.BodyV:remove() end) pcall(function() char.Head.BodyGyro:remove() end) pcall(function() char.Head.BodyV:remove() end) pcall(function() char.Head.BodyGyro:remove() end) char.Head.Velocity=Vector3.new(0,0,0) BodyP.position=char.Head.Position BodyP.Parent=char.Head end function Button1up(mouse) Up=1 end function Key(key) if key=="g" then local ex = Instance.new("Explosion") ex.Position = char.Head.Position ex.Hit:connect(function(hit) if hit.Parent.Name~=Name and hit.Parent.Name~="Suit" and hit.Parent.Name~="Eye" and hit.Name~="Base" then hit.Anchored=false hit:BreakJoints() hit.Velocity=(hit.Position-ex.Position).unit*-250 end end) ex.BlastRadius = 8 ex.BlastPressure = 0 ex.Parent = game.Workspace end end Hopper.Selected:connect(function(mouse) tras(model:children()) tras(char:children()) BodyP=Instance.new('BodyPosition') BodyP.Name="DroidForce" BodyP.maxForce=Vector3.new(math.huge,math.huge,math.huge) BodyP.position=char.Head.Position BodyP.Parent=char.Head mouse.Button1Down:connect(function() Button1own(mouse) end) mouse.Icon = "rbxasset://textures\\GunCursor.png" mouse.KeyDown:connect(function(key) Key(key) end) mouse.Button1Up:connect(function() Button1up(mouse) end) end) Hopper.Deselected:connect(function() nontras(model:children()) nontras(char:children()) pcall(function() char.Head.BodyV:remove() end) pcall(function() char.Head.BodyGyro:remove() end) pcall(function() char.Head.DroidForce:remove() end) end) ----/Flying---- ----Laser---- de=1 eye=Eye:children()[1] function BLAG(mouse) if de==1 then de=2 BodyGyro=Instance.new("BodyGyro") BodyGyro.maxTorque=Vector3.new(math.huge,math.huge,math.huge) BodyGyro.Parent=eye local Laz=Instance.new("Part") Laz.Anchored=true Laz.BrickColor=BrickColor:Red() Laz.Reflectance=0 Laz.TopSurface="Smooth" Laz.BottomSurface="Smooth" Laz.CanCollide=false Laz.CFrame=CFrame.new((eye.Position+mouse.Hit.p)/2,mouse.Hit.p) Laz.Parent=eye Laz.Size=Vector3.new(1,1,2) Laz.Transparency=0 local Me=Instance.new("BlockMesh") Me.Parent=Laz for i=1,15 do Me.Scale = Vector3.new(i/65,i/65,(eye.Position - mouse.Hit.p).magnitude/2) Laz.CFrame=CFrame.new((eye.Position+mouse.Hit.p)/2,mouse.Hit.p) BodyGyro.cframe=CFrame.new(eye.Position,mouse.Hit.p) wait() end ex=Instance.new("Explosion") ex.Position=mouse.Hit.p ex.BlastPressure=200000 ex.BlastRadius=5 ex.Parent=char wait() for i=1,3 do wait(0.15) Laz.Transparency=Laz.Transparency+0.3 end Laz:remove() BodyGyro:remove() wait(0.2) de=1 end end function BOOM(mouse) mouse.Icon = "rbxasset://textures\\GunCursor.png" mouse.Button1Down:connect(function() BLAG(mouse) end) end LA.Selected:connect(BOOM) ----/Laser---- ----Swords On Back---- Tor=Instance.new("Part") Tor.Size=Vector3.new(1,3,1) Tor.BrickColor=color2 Tor.Reflectance=0 Tor.Transparency=0 Tor.CanCollide=false Tor.Parent=model Tor.Name="Sword" Mesh=Instance.new("SpecialMesh") Mesh.MeshType="FileMesh" Mesh.MeshId="http://www.roblox.com/asset/?id=20719463" Mesh.Parent=Tor Mesh.Scale=Vector3.new(1,.9,1) w = Instance.new("Weld") w.Parent = char["Torso"] w.Part0 = w.Parent w.Part1 = Tor w.C0 = CFrame.new(0,0,.6)*CFrame.Angles(3.14*1.5,1.6*1.5,3.14) ----/Sword On Back---- ----Sword---- Tor=Instance.new("Part") Tor.Size=Vector3.new(1,1,4) Tor.BrickColor=color2 Tor.Reflectance=0 Tor.Transparency=0 Tor.CanCollide=True Tor.Parent=Sw Tor.Name="Handle" Mesh=Instance.new("SpecialMesh") Mesh.MeshType="FileMesh" Mesh.MeshId="http://www.roblox.com/asset/?id=20719463" Mesh.Parent=Tor Mesh.Scale=Vector3.new(1,.9,1) ----------------- Sword=Sw Sword.GripForward=Vector3.new(-1, -0, -0) Sword.GripPos=Vector3.new(0, 0, -1.75) Sword.GripRight=Vector3.new(0,1,0) Sword.GripUp=Vector3.new(0,0,1) grip=Sword.GripUp De=1 function Hit(h) if h.Parent~=nil and h.Parent.Name~=Name then pcall(function() h.Parent.Humanoid:TakeDamage(2000) end) end end function swordOut() if De==1 then De=0 for i=1,9 do Sword.GripUp=Sword.GripUp+Vector3.new((8/36),0,0) wait() end wait(0.25) for i=1,8 do Sword.GripUp=Sword.GripUp+Vector3.new((-8/36),0,0) wait() end Sword.GripUp=grip wait() De=1 end end Tor.Touched:connect(Hit) Sword.Equipped:connect(function() pcall(function() model.Sword.Transparency=1 end) end) Sword.Unequipped:connect(function() pcall(function() model.Sword.Transparency=0 end) end) Sword.Activated:connect(swordOut) ----/Sword---- for _,v in pairs(model:children()) do pcall(function() v.Locked=true end) end for _,v in pairs(Eye:children()) do pcall(function() v.Locked=true end) end
nodecore.register_aism({ label = "Pliant material itemstack drying increment", interval = 5, chance = 2, itemnames = {"nc_concrete:terrain_stone_blank_ply"}, action = function(stack, data) if(data.pos)then local modif = 0; if(data.player and data.list == "main")then modif = data.inv:contains_item("main", ItemStack({name = "nc_sponge:sponge_wet", count = 1}),false) and modif + 1 or modif + 0 else end modif = modif + (-1*math.floor(#nodecore.find_nodes_around(data.pos, "group:igniter",1)/4)) nodecore.smokefx(data.pos, 5, data.rate) local meta = stack:get_meta() meta:set_int("curetime", meta:get_int("curetime") + 2 - modif) minetest.chat_send_all(meta:get_int("curetime") or "k") return stack end end }) nodecore.register_aism({ label = "Pliant material itemstack drying complete", interval = 1, chance = 1, itemnames = {"nc_concrete:terrain_stone_blank_ply"}, action = function(stack, data) local meta = stack:get_meta() if(data.pos and meta:get_int("curetime") > 20)then meta:set_int("curetime", 0) nodecore.sound_play("nc_terrain_stony", {gain = 2, pos = data.pos}) local taken = stack:take_item(1) local taken = ItemStack({name = "nc_terrain:stone", count = 1}) meta:set_int("curetime", 0) if(data.inv) then taken = data.inv:add_item("main", taken) end if(not taken:is_empty()) then nodecore.item_eject(data.pos, taken) end return stack end end })
return {'aelmans','aelbers','aelen'}
if settings.startup["shipping-containers-enable-belts"].value then local TECH_NAME = "gate-belts" local VANILLA_BELTS = { ["transport-belt"]=true, ["fast-transport-belt"]=true, ["express-transport-belt"]=true, ["se-space-transport-belt"]=true, } -- Technology to unlock stuff (all mixed together right now) local belt_tech = { type = "technology", name = TECH_NAME, effects = { }, icons = { { icon = "__base__/graphics/icons/transport-belt.png", icon_size = 64, scale = 1.5, tint = {a=1, b=0.5, g=0.5, r=0.5}, icon_mipmaps = 4, }, { icon = "__base__/graphics/icons/gate.png", icon_size = 64, scale = 1.0, shift = {0, -24}, tint = {a=1, b=0.2, g=1, r=1}, icon_mipmaps = 4, } }, order = "zz", prerequisites = { "logistics-2", "gate" }, unit = { count = 100, time = 20, ingredients = { { "automation-science-pack", 1 }, { "logistic-science-pack", 1 }, } }, } data:extend{belt_tech} -- Item subgroup for gate-belts data:extend{ { type = "item-subgroup", name = "gate-belt", group = "logistics", order = "b[belt]-g" }, } local function applyGateBeltIcon(belt, gate) if belt.icons then local gate_scale = (gate.icon_size/belt.icons[1].icon_size)*0.5*(belt.icons[1].scale or 32/belt.icons[1].icon_size) table.insert(belt.icons, { icon = gate.icon, icon_size = gate.icon_size, icon_mipmaps = gate.icon_mipmaps, scale = gate_scale, shift = {gate.icon_size*gate_scale*0.5, -gate.icon_size*gate_scale*0.5} }) else local gate_scale = (gate.icon_size/belt.icon_size)*0.5*(32/belt.icon_size) belt.icons = { { icon = belt.icon, icon_size = belt.icon_size, icon_mipmaps = belt.icon_mipmaps, scale = 32/belt.icon_size }, { icon = gate.icon, icon_size = gate.icon_size, icon_mipmaps = gate.icon_mipmaps, scale = gate_scale, shift = {gate.icon_size*gate_scale*0.5, -gate.icon_size*gate_scale*0.5} }, } belt.icon = nil belt.icon_size = nil belt.icon_mipmaps = nil end end local function makeGateBelt(new_name, source_name) local belt = table.deepcopy(data.raw["transport-belt"][source_name]) if not belt then log("ERROR: Could not find transport-belt:"..source_name) return end log("Creating gate-crossing belt '"..new_name.."' based on '"..source_name.."'.") belt.name = new_name belt.localised_name = {"shipping-container.gate-belt-name", "__ENTITY__"..source_name.."__"} belt.localised_description = {"shipping-container.gate-belt-description"} belt.minable.result = belt.name belt.selection_priority = 55 belt.collision_mask = {"transport-belt-layer"} belt.next_upgrade = nil belt.fast_replaceable_group = "gate-belt" local belt_item = table.deepcopy(data.raw.item[source_name]) belt_item.name = belt.name belt_item.place_result = belt.name belt_item.localised_name = belt.localised_name belt_item.localised_description = belt.localised_description belt_item.subgroup = "gate-belt" local belt_recipe = { type = "recipe", name = belt.name, category = "crafting", result = belt.name, energy_required = 10, result_count = 1, enabled = false, always_show_made_in = true, } if belt.related_underground_belt then belt_recipe.ingredients = { { name = belt.related_underground_belt, amount = 2 }, { name = "advanced-circuit", amount = 2 }, } belt.related_underground_belt = nil else belt_recipe.ingredients = { { name = source_name, amount = 2 }, { name = "iron-gear-wheel", amount = 10 }, { name = "advanced-circuit", amount = 2 }, } end applyGateBeltIcon(belt, data.raw.gate["gate"]) applyGateBeltIcon(belt_item, data.raw.gate["gate"]) data:extend{belt, belt_item, belt_recipe} -- Add all belts to the same technology (eventually make this a script unlock?) table.insert(data.raw.technology[TECH_NAME].effects, {type="unlock-recipe", recipe=belt_recipe.name}) end -- Make a gate-crossing variant for every transport belt local belts = {} for name,belt in pairs(data.raw["transport-belt"]) do if settings.startup["shipping-containers-modded-belts"].value or VANILLA_BELTS[name] then belts[#belts+1] = name end end for i=1,#belts do local found = 0 local new_name, found = string.gsub(belts[i], "transport%-belt", "gate-belt") if found > 0 then makeGateBelt(new_name, belts[i]) end end end
-- -- Create all HUD variables. -- local Heart = Material("icon16/heart.png") -- -- Create the font used throughout the HUD. -- surface.CreateFont("HUDFont", { font = "Default", size = 15, weight = 1000 }) -- -- Take all of the default HUD elements below and hide them. -- local HiddenElements = { ["CHudHealth"] = true, ["CHudBattery"] = true, ["CHudSuitPower"] = true } local function HideHUD(name) if (HiddenElements[name]) then return false end end hook.Add("HUDShouldDraw", "HideHUD", HideHUD) -- -- Add custom things to the HUD. -- local function DrawHUD() -- Bare surface.SetDrawColor(40, 40, 40, 200) surface.DrawRect(0, 0, ScrW(), 25) surface.SetDrawColor(100, 100, 100, 200) surface.DrawOutlinedRect(0, 0, ScrW(), 25) surface.DrawOutlinedRect(0, 0, 65, 25) -- Health surface.SetFont("HUDFont") surface.SetTextColor(200, 200, 200, 255) surface.SetTextPos(22, 5) surface.DrawText(LocalPlayer():Health() .. "%") surface.SetDrawColor(255, 255, 255, 255) surface.SetMaterial(Heart) surface.DrawTexturedRect(5, 5, 16, 16) end hook.Add("HUDPaint", "DrawMyHUD", DrawHUD)
TriggerType = {} ---@type number TriggerType.Sphere = 0 ---@type number TriggerType.Box = 1
--[[-- trace.enter_config{ name = name } This function is used by execute.config and logs the inclusion of a configuration. --]]-- function trace.enter_config(args) if not trace._disabled then local name = args.name if type(name) ~= "string" then error("No name string passed to trace.enter_config{...}.") end trace._open_section{ type = "config", name = name } end end
mod_scale = 2/3 data:extend( { { type = "assembling-machine", name = "gasification-plant", icon = "__base__/graphics/icons/chemical-plant.png", icon_size = 32, flags = {"placeable-neutral","placeable-player", "player-creation"}, minable = {hardness = 0.2, mining_time = 0.5, result = "gasification-plant"}, max_health = 300, corpse = "big-remnants", dying_explosion = "medium-explosion", collision_box = {{-0.8, -0.8}, {0.8, 0.8}}, selection_box = {{-0.9, -0.9}, {0.9, 0.9}}, --[[module_specification = { module_slots = 3 }, allowed_effects = {"consumption", "speed", "productivity", "pollution"},]] animation = make_4way_animation_from_spritesheet({ layers = { { filename = "__base__/graphics/entity/chemical-plant/chemical-plant.png", width = 122, height = 134, frame_count = 1, shift = util.by_pixel(-5, -4.5), scale = mod_scale, hr_version = { filename = "__base__/graphics/entity/chemical-plant/hr-chemical-plant.png", width = 244, height = 268, frame_count = 1, shift = util.by_pixel(-5, -4.5), scale = 0.5 * mod_scale } }, { filename = "__base__/graphics/entity/chemical-plant/chemical-plant-shadow.png", width = 175, height = 110, frame_count = 1, shift = util.by_pixel(31.5, 11), scale = mod_scale, draw_as_shadow = true, hr_version = { filename = "__base__/graphics/entity/chemical-plant/hr-chemical-plant-shadow.png", width = 350, height = 219, frame_count = 1, shift = util.by_pixel(31.5, 10.75), draw_as_shadow = true, scale = 0.5 * mod_scale } }, }}), working_visualisations = { { north_position = util.by_pixel(30, -24), west_position = util.by_pixel(1, -49.5), south_position = util.by_pixel(-30, -48), east_position = util.by_pixel(-11, -1), apply_recipe_tint = "primary", animation = { filename = "__base__/graphics/entity/chemical-plant/boiling-green-patch.png", frame_count = 32, width = 15, height = 10, animation_speed = 0.5, scale = mod_scale, hr_version = { filename = "__base__/graphics/entity/chemical-plant/hr-boiling-green-patch.png", frame_count = 32, width = 30, height = 20, animation_speed = 0.5, scale = 0.5 * mod_scale } } }, { north_position = util.by_pixel(30, -24), west_position = util.by_pixel(1, -49.5), south_position = util.by_pixel(-30, -48), east_position = util.by_pixel(-11, -1), apply_recipe_tint = "secondary", animation = { filename = "__base__/graphics/entity/chemical-plant/boiling-green-patch-mask.png", frame_count = 32, width = 15, height = 10, animation_speed = 0.5, scale = mod_scale, hr_version = { filename = "__base__/graphics/entity/chemical-plant/hr-boiling-green-patch-mask.png", frame_count = 32, width = 30, height = 20, animation_speed = 0.5, scale = 0.5 * mod_scale } } }, { apply_recipe_tint = "tertiary", north_position = {0, 0}, west_position = {0, 0}, south_position = {0, 0}, east_position = {0, 0}, north_animation = { filename = "__base__/graphics/entity/chemical-plant/boiling-window-green-patch.png", frame_count = 1, width = 87, height = 60, shift = util.by_pixel(0, -5), scale = mod_scale, hr_version = { filename = "__base__/graphics/entity/chemical-plant/hr-boiling-window-green-patch.png", x = 0, frame_count = 1, width = 174, height = 119, shift = util.by_pixel(0, -5.25), scale = 0.5 * mod_scale } }, east_animation = { filename = "__base__/graphics/entity/chemical-plant/boiling-window-green-patch.png", x = 87, frame_count = 1, width = 87, height = 60, shift = util.by_pixel(0, -5), scale = mod_scale, hr_version = { filename = "__base__/graphics/entity/chemical-plant/hr-boiling-window-green-patch.png", x = 174, frame_count = 1, width = 174, height = 119, shift = util.by_pixel(0, -5.25), scale = 0.5 * mod_scale } }, south_animation = { filename = "__base__/graphics/entity/chemical-plant/boiling-window-green-patch.png", x = 174, frame_count = 1, width = 87, height = 60, shift = util.by_pixel(0, -5), scale = mod_scale, hr_version = { filename = "__base__/graphics/entity/chemical-plant/hr-boiling-window-green-patch.png", x = 348, frame_count = 1, width = 174, height = 119, shift = util.by_pixel(0, -5.25), scale = 0.5 * mod_scale } } } }, vehicle_impact_sound = { filename = "__base__/sound/car-metal-impact.ogg", volume = 0.65 }, working_sound = { sound = { { filename = "__base__/sound/boiler.ogg", volume = 0.8 } }, idle_sound = { filename = "__base__/sound/idle1.ogg", volume = 0.6 }, apparent_volume = 1.5, }, crafting_speed = 1.25, energy_source = { type = "burner", fuel_category = "chemical", effectivity = 0.9, emissions = 0.03 / 3.5, fuel_inventory_size = 1, --[[smoke = { { name = "smoke", frequency = 10, position = {0.7, -1.2}, starting_vertical_speed = 0.08, starting_frame_deviation = 60 } }]] }, --[[energy_source = { type = "electric", usage_priority = "secondary-input", emissions = 0.03 / 3.5 },]] energy_usage = "210kW", ingredient_count = 4, crafting_categories = {"gasification-recipes"}, fluid_boxes = { { production_type = "input", pipe_covers = pipecoverspictures(), base_area = 10, base_level = -1, pipe_connections = {{ type="input", position = {-0.5, -1.5} }} }, --[[ { production_type = "input", pipe_covers = pipecoverspictures(), base_area = 10, base_level = -1, pipe_connections = {{ type="input", position = {1, -2} }} },]] { production_type = "output", pipe_covers = pipecoverspictures(), base_level = 1, pipe_connections = {{ position = {-0.5, 1.5} }} } --[[ { production_type = "output", pipe_covers = pipecoverspictures(), base_level = 1, pipe_connections = {{ position = {1, 2} }} }]] } } } )
#!/usr/local/bin/lua Game = {} function Game:play() print("let's play a game") end function Game:quit() print("I am going to quit") end return Game
--[[ ____ _ _ _ / ___| _ _ _ __ ___ / \ __| |_ __ ___ (_)_ __ \___ \| | | | '_ \ / __| / _ \ / _` | '_ ` _ \| | '_ \ ___) | |_| | | | | (__ / ___ \ (_| | | | | | | | | | | |____/ \__, |_| |_|\___/_/ \_\__,_|_| |_| |_|_|_| |_| |___/ @Description: SyncAdmin plugin command to create smoke for the selected user. @Author: Dominik [VolcanoINC], Hannah Jane [DataSynchronized] --]] local command = {} command.PermissionLevel = 1 command.Shorthand = nil command.Params = {"PlayerList"} command.Usage = "smoke Player1,Player2,..." command.Description = [[Gives a player smoke]] command.Init = function(main) end command.Run = function(main,user,users) local list = {} for _,player in pairs(users) do if (player.Character) then Instance.new("Smoke",player.Character:findFirstChild("HumanoidRootPart")) table.insert(list,player.Name) end end return true,"Gave the following people smoke: " .. table.concat(list,", "),list,user.Name .. " gave you smoke" end return command
-- Create the item groups for the new big recipes require("util") local function itemGroupSetup() for k,v in pairs(util.table.deepcopy(data.raw["item-group"])) do v.localised_name = v.localised_name or {"item-group-name." .. v.name} v.name = v.name .. "-big" v.order = "y" .. v.order data.raw["item-group"][k .. "-big"] = v end for k,v in pairs(util.table.deepcopy(data.raw["item-subgroup"])) do v.name = v.name .. "-big" v.group = v.group .. "-big" data.raw["item-subgroup"][k .. "-big"] = v end end itemGroupSetup()
require('torch') require('nn') --- @class GaussianToBernoulli local GaussianToBernoulli, GaussianToBernoulliParent = torch.class('nn.GaussianToBernoulli', 'nn.Module') --- Initialize. function GaussianToBernoulli:__init(mean) self.logvar = -2 self.eps = 0.5 end --- Print dimensions of last layer. -- @param input output of last layer -- @return unchanged output of last layer function GaussianToBernoulli:updateOutput(input) assert(self.logvar) -- for each pixel compute the probability of non-occupancy as -- \int_{-\infty}^\epsilon N(x|\mu,\sigma^2) dx -- i.e. as he cumulative density function of a Gaussian and -- a fixed parameter epsilon. -- So we compute -- p_i = 1 - \frac{1}{2}[1 + erf(\frac{\epsilon - \mu_i}{\sqrt{2} \sigma_i})] local function erf(x) -- constants local a1 = 0.254829592 local a2 = -0.284496736 local a3 = 1.421413741 local a4 = -1.453152027 local a5 = 1.061405429 local p = 0.3275911 -- Save the sign of x local sign = torch.sign(x) x = torch.abs(x) -- A&S formula 7.1.26 local ones = x:clone():fill(1) local t = torch.cdiv(ones, 1.0 + p*x) local y = torch.cmul(a5*t + a4, t) y = torch.cmul(y + a3, t) y = torch.cmul(y + a2, t) y = torch.cmul(y + a1, t) y = 1.0 - torch.cmul(y, torch.exp(torch.cmul(-x, x))) return torch.cmul(sign, y) end self.output = 0.5*(1 + erf(math.exp(-0.5*self.logvar)*0.707106781*(self.eps - input))) return self.output end --- Print the gradients of the next layer. -- @param input original input of last layer -- @param gradOutput gradients of next layer -- @return unchanged gradients of next layer function GaussianToBernoulli:updateGradInput(input, gradOutput) self.gradInput = torch.cmul(- math.exp(-0.5*self.logvar)/math.sqrt(2*math.pi)*torch.exp(-0.5*torch.exp(-self.logvar)*torch.cmul(self.eps - input, self.eps - input)), gradOutput) return self.gradInput end
local SLEEKPANEL = {} function SLEEKPANEL:Init() self:SetBackgroundColor(Color(0, 0, 0, 0)); self:EnableVerticalScrollbar(); self:SetSpacing(10); self.VBar.Paint = fn.Id self.VBar.btnUp.Paint = fn.Id self.VBar.btnDown.Paint = fn.Id end function SLEEKPANEL:fillLabels(tbl) self:Clear(); for i, cmd in ipairs(tbl) do local lbl = vgui.Create("SleekF1ChatCommandLabel"); lbl:setChatCommand(cmd); lbl.OnMousePressed = self.OnMousePressed self:AddItem(lbl); end end derma.DefineControl("SleekF1ChatCommandPanel", "", SLEEKPANEL, "DPanelList");