public static DSS3_LogisticsPoolingForUrbanDistribution.ExternalStructs.GoogleDistanceMatrixAPI.GoogleDistanceMatrixAPIRoot ETA(string units, string origins, string destinations) { System.Func <string> getUrl = () => { System.Threading.Thread.CurrentThread.CurrentCulture = System.Globalization.CultureInfo.InvariantCulture; return("" + "?units=" + units + "&origins=" + origins + "&destinations=" + destinations); }; var _operationRelativeUrl = getUrl.Invoke().Trim(); if (_operationRelativeUrl?.StartsWith("/") == true && BaseUrl?.EndsWith("/") == true) { _operationRelativeUrl = _operationRelativeUrl.TrimStart('/'); } var _targetUrl = BaseUrl + _operationRelativeUrl; var _options = new RestServiceConsumptionOptions { Url = _targetUrl, Verb = RestHTTPVerb.GET, ExtraHeaderData = new System.Collections.Generic.Dictionary <string, string>(StringComparer.OrdinalIgnoreCase) { }, LogAccess = false, IsCachingEnabled = false, ApiName = "GoogleDistanceMatrixAPI", Operation = "ETA" }; Func <ServiceConsumptionContainer, DSS3_LogisticsPoolingForUrbanDistribution.ExternalStructs.GoogleDistanceMatrixAPI.GoogleDistanceMatrixAPIRoot> _invocation = (_httpResponse) => { var _returnedItem = RestServiceConsumer.Consume <DSS3_LogisticsPoolingForUrbanDistribution.ExternalStructs.GoogleDistanceMatrixAPI.GoogleDistanceMatrixAPIRoot>(_options, _httpResponse); return(zAppDev.DotNet.Framework.Utilities.Common.SafeCast <DSS3_LogisticsPoolingForUrbanDistribution.ExternalStructs.GoogleDistanceMatrixAPI.GoogleDistanceMatrixAPIRoot>(_returnedItem)); }; var _consumer = new ServiceConsumer <DSS3_LogisticsPoolingForUrbanDistribution.ExternalStructs.GoogleDistanceMatrixAPI.GoogleDistanceMatrixAPIRoot>(_invocation); return(_consumer.Invoke(_options)); }
public static DSS5_SupplyChainFinancialsOptimisation.ExternalStructs.GoogleGeocode.Root GeoLocation(string address) { System.Func <string> getUrl = () => { System.Threading.Thread.CurrentThread.CurrentCulture = System.Globalization.CultureInfo.InvariantCulture; return("json?address=" + address + "&key=AIzaSyCZs5R7fS9r6xCoilVedcK-Oq-hHk7mzdI"); }; var _operationRelativeUrl = getUrl.Invoke().Trim(); if (_operationRelativeUrl?.StartsWith("/") == true && BaseUrl?.EndsWith("/") == true) { _operationRelativeUrl = _operationRelativeUrl.TrimStart('/'); } var _targetUrl = BaseUrl + _operationRelativeUrl; var _options = new RestServiceConsumptionOptions { Url = _targetUrl, Verb = RestHTTPVerb.GET, ExtraHeaderData = new System.Collections.Generic.Dictionary <string, string>(StringComparer.OrdinalIgnoreCase) { }, LogAccess = false, IsCachingEnabled = false, ApiName = "GoogleGeocode", Operation = "GeoLocation" }; Func <ServiceConsumptionContainer, DSS5_SupplyChainFinancialsOptimisation.ExternalStructs.GoogleGeocode.Root> _invocation = (_httpResponse) => { var _returnedItem = RestServiceConsumer.Consume <DSS5_SupplyChainFinancialsOptimisation.ExternalStructs.GoogleGeocode.Root>(_options, _httpResponse); return(zAppDev.DotNet.Framework.Utilities.Common.SafeCast <DSS5_SupplyChainFinancialsOptimisation.ExternalStructs.GoogleGeocode.Root>(_returnedItem)); }; var _consumer = new ServiceConsumer <DSS5_SupplyChainFinancialsOptimisation.ExternalStructs.GoogleGeocode.Root>(_invocation); return(_consumer.Invoke(_options)); }
public static DSS3_LogisticsPoolingForUrbanDistribution.ExternalStructs.GoogleDirections.DirectionsResponse Directions(float?originLat, float?originLong, float?destinationLat, float?destinationLong) { System.Func <string> getUrl = () => { System.Threading.Thread.CurrentThread.CurrentCulture = System.Globalization.CultureInfo.InvariantCulture; return("json?origin=" + originLat.GetValueOrDefault(0) + "," + originLong.GetValueOrDefault(0) + "&destination=" + destinationLat.GetValueOrDefault(0) + "," + destinationLong.GetValueOrDefault(0) + "&key=AIzaSyDn7jvEi9-m-NbaNj8vJjggUCAq7-43hMM"); }; var _operationRelativeUrl = getUrl.Invoke().Trim(); if (_operationRelativeUrl?.StartsWith("/") == true && BaseUrl?.EndsWith("/") == true) { _operationRelativeUrl = _operationRelativeUrl.TrimStart('/'); } var _targetUrl = BaseUrl + _operationRelativeUrl; var _options = new RestServiceConsumptionOptions { Url = _targetUrl, Verb = RestHTTPVerb.GET, ExtraHeaderData = new System.Collections.Generic.Dictionary <string, string>(StringComparer.OrdinalIgnoreCase) { }, LogAccess = false, IsCachingEnabled = false, ApiName = "GoogleDirections", Operation = "Directions" }; Func <ServiceConsumptionContainer, DSS3_LogisticsPoolingForUrbanDistribution.ExternalStructs.GoogleDirections.DirectionsResponse> _invocation = (_httpResponse) => { var _returnedItem = RestServiceConsumer.Consume <DSS3_LogisticsPoolingForUrbanDistribution.ExternalStructs.GoogleDirections.DirectionsResponse>(_options, _httpResponse); return(zAppDev.DotNet.Framework.Utilities.Common.SafeCast <DSS3_LogisticsPoolingForUrbanDistribution.ExternalStructs.GoogleDirections.DirectionsResponse>(_returnedItem)); }; var _consumer = new ServiceConsumer <DSS3_LogisticsPoolingForUrbanDistribution.ExternalStructs.GoogleDirections.DirectionsResponse>(_invocation); return(_consumer.Invoke(_options)); }
public static DSS1_RetailerDriverStockOptimisation.ExternalStructs.Elasticsearch.SearchResponse Search(DSS1_RetailerDriverStockOptimisation.ExternalStructs.Elasticsearch.SearchRequest query, int?hits) { System.Func <string> getUrl = () => { System.Threading.Thread.CurrentThread.CurrentCulture = System.Globalization.CultureInfo.InvariantCulture; return("/selis-*/_search?filter_path=hits.total,hits.max_score,hits.hits._id,hits.hits._source&size=" + hits.GetValueOrDefault(0)); }; var _operationRelativeUrl = getUrl.Invoke().Trim(); if (_operationRelativeUrl?.StartsWith("/") == true && BaseUrl?.EndsWith("/") == true) { _operationRelativeUrl = _operationRelativeUrl.TrimStart('/'); } var _targetUrl = BaseUrl + _operationRelativeUrl; var _options = new RestServiceConsumptionOptions { Url = _targetUrl, Verb = RestHTTPVerb.POST, SecurityType = RestSecurityType.BasicAuth, UserName = "******", Password = "******", ExtraHeaderData = new System.Collections.Generic.Dictionary <string, string>(StringComparer.OrdinalIgnoreCase) { }, LogAccess = false, IsCachingEnabled = false, ApiName = "Elasticsearch", Operation = "Search", PostType = PostType.JSON, Data = query, FormData = new Dictionary <string, object> { { "query", query } } }; Func <ServiceConsumptionContainer, DSS1_RetailerDriverStockOptimisation.ExternalStructs.Elasticsearch.SearchResponse> _invocation = (_httpResponse) => { var _returnedItem = RestServiceConsumer.Consume <DSS1_RetailerDriverStockOptimisation.ExternalStructs.Elasticsearch.SearchResponse>(_options, _httpResponse); return(zAppDev.DotNet.Framework.Utilities.Common.SafeCast <DSS1_RetailerDriverStockOptimisation.ExternalStructs.Elasticsearch.SearchResponse>(_returnedItem)); }; var _consumer = new ServiceConsumer <DSS1_RetailerDriverStockOptimisation.ExternalStructs.Elasticsearch.SearchResponse>(_invocation); return(_consumer.Invoke(_options)); }
public static DSS1_RetailerDriverStockOptimisation.ExternalStructs.XPackML.Results GetAnomaliesOnHits(int?hits, DSS1_RetailerDriverStockOptimisation.ExternalStructs.XPackML.RecordRequest q) { System.Func <string> getUrl = () => { System.Threading.Thread.CurrentThread.CurrentCulture = System.Globalization.CultureInfo.InvariantCulture; return("/.ml-anomalies-custom-obapi_hm_resp_hits_per_service/_search?size=" + hits.GetValueOrDefault(0)); }; var _operationRelativeUrl = getUrl.Invoke().Trim(); if (_operationRelativeUrl?.StartsWith("/") == true && BaseUrl?.EndsWith("/") == true) { _operationRelativeUrl = _operationRelativeUrl.TrimStart('/'); } var _targetUrl = BaseUrl + _operationRelativeUrl; var _options = new RestServiceConsumptionOptions { Url = _targetUrl, Verb = RestHTTPVerb.POST, SecurityType = RestSecurityType.BasicAuth, UserName = "******", Password = "******", ExtraHeaderData = new System.Collections.Generic.Dictionary <string, string>(StringComparer.OrdinalIgnoreCase) { }, LogAccess = false, IsCachingEnabled = false, ApiName = "XPackML", Operation = "GetAnomaliesOnHits", PostType = PostType.JSON, Data = q, FormData = new Dictionary <string, object> { { "q", q } } }; Func <ServiceConsumptionContainer, DSS1_RetailerDriverStockOptimisation.ExternalStructs.XPackML.Results> _invocation = (_httpResponse) => { var _returnedItem = RestServiceConsumer.Consume <DSS1_RetailerDriverStockOptimisation.ExternalStructs.XPackML.Results>(_options, _httpResponse); return(zAppDev.DotNet.Framework.Utilities.Common.SafeCast <DSS1_RetailerDriverStockOptimisation.ExternalStructs.XPackML.Results>(_returnedItem)); }; var _consumer = new ServiceConsumer <DSS1_RetailerDriverStockOptimisation.ExternalStructs.XPackML.Results>(_invocation); return(_consumer.Invoke(_options)); }
public static DSS1_RetailerDriverStockOptimisation.ExternalStructs.Elasticsearch.Status Info() { System.Func <string> getUrl = () => { System.Threading.Thread.CurrentThread.CurrentCulture = System.Globalization.CultureInfo.InvariantCulture; return("/"); }; var _operationRelativeUrl = getUrl.Invoke().Trim(); if (_operationRelativeUrl?.StartsWith("/") == true && BaseUrl?.EndsWith("/") == true) { _operationRelativeUrl = _operationRelativeUrl.TrimStart('/'); } var _targetUrl = BaseUrl + _operationRelativeUrl; var _options = new RestServiceConsumptionOptions { Url = _targetUrl, Verb = RestHTTPVerb.GET, SecurityType = RestSecurityType.BasicAuth, UserName = "******", Password = "******", ExtraHeaderData = new System.Collections.Generic.Dictionary <string, string>(StringComparer.OrdinalIgnoreCase) { }, LogAccess = false, IsCachingEnabled = true, ApiName = "Elasticsearch", Operation = "Info", CachePerUser = false, ExpirationMode = CacheManager.Core.ExpirationMode.None, ServerTimeSpan = 0 }; Func <ServiceConsumptionContainer, DSS1_RetailerDriverStockOptimisation.ExternalStructs.Elasticsearch.Status> _invocation = (_httpResponse) => { var _returnedItem = RestServiceConsumer.Consume <DSS1_RetailerDriverStockOptimisation.ExternalStructs.Elasticsearch.Status>(_options, _httpResponse); return(zAppDev.DotNet.Framework.Utilities.Common.SafeCast <DSS1_RetailerDriverStockOptimisation.ExternalStructs.Elasticsearch.Status>(_returnedItem)); }; var _consumer = new ServiceConsumer <DSS1_RetailerDriverStockOptimisation.ExternalStructs.Elasticsearch.Status>(_invocation); return(_consumer.Invoke(_options)); }
public static DSS3_LogisticsPoolingForUrbanDistribution.ExternalStructs.Optimizer_Mapotempo.Optimizer_MapotempoRoot submit(DSS3_LogisticsPoolingForUrbanDistribution.ExternalStructs.Optimizer_Mapotempo.VrpProblem a01VrpSubmit, string api_key) { System.Func <string> getUrl = () => { System.Threading.Thread.CurrentThread.CurrentCulture = System.Globalization.CultureInfo.InvariantCulture; return("vrp/submit" + "?api_key=" + api_key); }; var _operationRelativeUrl = getUrl.Invoke().Trim(); if (_operationRelativeUrl?.StartsWith("/") == true && BaseUrl?.EndsWith("/") == true) { _operationRelativeUrl = _operationRelativeUrl.TrimStart('/'); } var _targetUrl = BaseUrl + _operationRelativeUrl; var _options = new RestServiceConsumptionOptions { Url = _targetUrl, Verb = RestHTTPVerb.POST, ExtraHeaderData = new System.Collections.Generic.Dictionary <string, string>(StringComparer.OrdinalIgnoreCase) { { "Accept", "application/json" } }, LogAccess = false, IsCachingEnabled = false, ApiName = "Optimizer_Mapotempo", Operation = "submit", PostType = PostType.JSON, Data = a01VrpSubmit, FormData = new Dictionary <string, object> { { "a01VrpSubmit", a01VrpSubmit } } }; Func <ServiceConsumptionContainer, DSS3_LogisticsPoolingForUrbanDistribution.ExternalStructs.Optimizer_Mapotempo.Optimizer_MapotempoRoot> _invocation = (_httpResponse) => { var _returnedItem = RestServiceConsumer.Consume <DSS3_LogisticsPoolingForUrbanDistribution.ExternalStructs.Optimizer_Mapotempo.Optimizer_MapotempoRoot>(_options, _httpResponse); return(zAppDev.DotNet.Framework.Utilities.Common.SafeCast <DSS3_LogisticsPoolingForUrbanDistribution.ExternalStructs.Optimizer_Mapotempo.Optimizer_MapotempoRoot>(_returnedItem)); }; var _consumer = new ServiceConsumer <DSS3_LogisticsPoolingForUrbanDistribution.ExternalStructs.Optimizer_Mapotempo.Optimizer_MapotempoRoot>(_invocation); return(_consumer.Invoke(_options)); }
public static DSS3_LogisticsPoolingForUrbanDistribution.ExternalStructs.LocalPubSub.SubscribeResult Subscribe(DSS3_LogisticsPoolingForUrbanDistribution.ExternalStructs.LocalPubSub.SubRoot subRules) { System.Func <string> getUrl = () => { System.Threading.Thread.CurrentThread.CurrentCulture = System.Globalization.CultureInfo.InvariantCulture; return("subscribe"); }; var _operationRelativeUrl = getUrl.Invoke().Trim(); if (_operationRelativeUrl?.StartsWith("/") == true && BaseUrl?.EndsWith("/") == true) { _operationRelativeUrl = _operationRelativeUrl.TrimStart('/'); } var _targetUrl = BaseUrl + _operationRelativeUrl; var _options = new RestServiceConsumptionOptions { Url = _targetUrl, Verb = RestHTTPVerb.POST, ExtraHeaderData = new System.Collections.Generic.Dictionary <string, string>(StringComparer.OrdinalIgnoreCase) { }, LogAccess = false, IsCachingEnabled = false, ApiName = "LocalPubSub", Operation = "Subscribe", PostType = PostType.JSON, Data = subRules, FormData = new Dictionary <string, object> { { "subRules", subRules } } }; Func <ServiceConsumptionContainer, DSS3_LogisticsPoolingForUrbanDistribution.ExternalStructs.LocalPubSub.SubscribeResult> _invocation = (_httpResponse) => { var _returnedItem = RestServiceConsumer.Consume <DSS3_LogisticsPoolingForUrbanDistribution.ExternalStructs.LocalPubSub.SubscribeResult>(_options, _httpResponse); return(zAppDev.DotNet.Framework.Utilities.Common.SafeCast <DSS3_LogisticsPoolingForUrbanDistribution.ExternalStructs.LocalPubSub.SubscribeResult>(_returnedItem)); }; var _consumer = new ServiceConsumer <DSS3_LogisticsPoolingForUrbanDistribution.ExternalStructs.LocalPubSub.SubscribeResult>(_invocation); return(_consumer.Invoke(_options)); }
public static DSS3_LogisticsPoolingForUrbanDistribution.ExternalStructs.Mapotempo.MapotempoRoot geocode(string country, string street, string postcode, string city, string housenumber, string api_key) { System.Func <string> getUrl = () => { System.Threading.Thread.CurrentThread.CurrentCulture = System.Globalization.CultureInfo.InvariantCulture; return("geocode" + "?country=" + country + "&street=" + street + "&postcode=" + postcode + "&city=" + city + "&housenumber=" + housenumber + "&api_key=" + api_key); }; var _operationRelativeUrl = getUrl.Invoke().Trim(); if (_operationRelativeUrl?.StartsWith("/") == true && BaseUrl?.EndsWith("/") == true) { _operationRelativeUrl = _operationRelativeUrl.TrimStart('/'); } var _targetUrl = BaseUrl + _operationRelativeUrl; var _options = new RestServiceConsumptionOptions { Url = _targetUrl, Verb = RestHTTPVerb.GET, ExtraHeaderData = new System.Collections.Generic.Dictionary <string, string>(StringComparer.OrdinalIgnoreCase) { { "Accept", "application/json" } }, LogAccess = false, IsCachingEnabled = false, ApiName = "Mapotempo", Operation = "geocode" }; Func <ServiceConsumptionContainer, DSS3_LogisticsPoolingForUrbanDistribution.ExternalStructs.Mapotempo.MapotempoRoot> _invocation = (_httpResponse) => { var _returnedItem = RestServiceConsumer.Consume <DSS3_LogisticsPoolingForUrbanDistribution.ExternalStructs.Mapotempo.MapotempoRoot>(_options, _httpResponse); return(zAppDev.DotNet.Framework.Utilities.Common.SafeCast <DSS3_LogisticsPoolingForUrbanDistribution.ExternalStructs.Mapotempo.MapotempoRoot>(_returnedItem)); }; var _consumer = new ServiceConsumer <DSS3_LogisticsPoolingForUrbanDistribution.ExternalStructs.Mapotempo.MapotempoRoot>(_invocation); return(_consumer.Invoke(_options)); }
public static void Continue(string order_id) { System.Func <string> getUrl = () => { System.Threading.Thread.CurrentThread.CurrentCulture = System.Globalization.CultureInfo.InvariantCulture; return(null); }; var _operationRelativeUrl = getUrl.Invoke().Trim(); if (_operationRelativeUrl?.StartsWith("/") == true && BaseUrl?.EndsWith("/") == true) { _operationRelativeUrl = _operationRelativeUrl.TrimStart('/'); } var _targetUrl = BaseUrl + _operationRelativeUrl; var _options = new RestServiceConsumptionOptions { Url = _targetUrl, Verb = RestHTTPVerb.POST, ExtraHeaderData = new System.Collections.Generic.Dictionary <string, string>(StringComparer.OrdinalIgnoreCase) { }, LogAccess = false, IsCachingEnabled = false, ApiName = "DisruptionAPI", Operation = "Continue", PostType = PostType.JSON }; Func <ServiceConsumptionContainer, object> _invocation = (_httpResponse) => { RestServiceConsumer.Consume <object>(_options, _httpResponse); return(null); }; var _consumer = new ServiceConsumer <object>(_invocation); _consumer.Invoke(_options); }
public static DSS3_LogisticsPoolingForUrbanDistribution.ExternalStructs.Router_Mapotempo.Router_MapotempoRoot route(string dimension, string geometry, string motorway, string toll, string max_walk_distance, string currency, string lang, string loc, string api_key) { System.Func <string> getUrl = () => { System.Threading.Thread.CurrentThread.CurrentCulture = System.Globalization.CultureInfo.InvariantCulture; return("route" + "?dimension=" + dimension + "&geometry=" + geometry + "&motorway=" + motorway + "&toll=" + toll + "&max_walk_distance=" + max_walk_distance + "¤cy=" + currency + "&lang=" + lang + "&loc=" + loc + "&api_key=" + api_key); }; var _operationRelativeUrl = getUrl.Invoke().Trim(); if (_operationRelativeUrl?.StartsWith("/") == true && BaseUrl?.EndsWith("/") == true) { _operationRelativeUrl = _operationRelativeUrl.TrimStart('/'); } var _targetUrl = BaseUrl + _operationRelativeUrl; var _options = new RestServiceConsumptionOptions { Url = _targetUrl, Verb = RestHTTPVerb.GET, ExtraHeaderData = new System.Collections.Generic.Dictionary <string, string>(StringComparer.OrdinalIgnoreCase) { { "Accept", "application/json" } }, LogAccess = false, IsCachingEnabled = false, ApiName = "Router_Mapotempo", Operation = "route" }; Func <ServiceConsumptionContainer, DSS3_LogisticsPoolingForUrbanDistribution.ExternalStructs.Router_Mapotempo.Router_MapotempoRoot> _invocation = (_httpResponse) => { var _returnedItem = RestServiceConsumer.Consume <DSS3_LogisticsPoolingForUrbanDistribution.ExternalStructs.Router_Mapotempo.Router_MapotempoRoot>(_options, _httpResponse); return(zAppDev.DotNet.Framework.Utilities.Common.SafeCast <DSS3_LogisticsPoolingForUrbanDistribution.ExternalStructs.Router_Mapotempo.Router_MapotempoRoot>(_returnedItem)); }; var _consumer = new ServiceConsumer <DSS3_LogisticsPoolingForUrbanDistribution.ExternalStructs.Router_Mapotempo.Router_MapotempoRoot>(_invocation); return(_consumer.Invoke(_options)); }