public static tournamentInfoEndpoint GeTournamentInfoEndpoint(int id = 0, int subItemCount = 0)
        {
            if (subItemCount == 0)
            {
                subItemCount = SR.I(20);
            }

            var groups = new List <tournamentGroup>();

            for (var j = 0; j < subItemCount; j++)
            {
                groups.Add(GetTournamentGroup());
            }

            var msg = new tournamentInfoEndpoint
            {
                tournament            = GetTournamentExtendedList(10).First(),
                competitors           = GetTournamentExtendedList(10).First().competitors,
                generated_at          = DateTime.Today,
                generated_atSpecified = true,
                groups = groups.ToArray(),
                round  = GetMatchRound(),
                season = GetSeasonExtended(),
                season_coverage_info = GetSeasonCoverageInfo()
            };

            return(msg);
        }
        internal static IProductInfo GetProductInfo(int subItemCount = 0)
        {
            if (subItemCount < 1)
            {
                subItemCount = SR.I(20);
            }
            var pil = new List <productInfoLink>();
            var sc  = new List <streamingChannel>();

            while (subItemCount > 0)
            {
                subItemCount--;
                pil.Add(GetProductInfoLinkApi());
                sc.Add(GetStreamingChannelApi());
            }
            return(new ProductInfo(new ProductInfoDTO(new productInfo()
            {
                is_auto_traded = new productInfoItem(),
                is_in_hosted_statistics = new productInfoItem(),
                is_in_live_center_soccer = new productInfoItem(),
                is_in_live_match_tracker = new productInfoItem(),
                is_in_live_score = new productInfoItem(),
                links = pil.ToArray(),
                streaming = sc.ToArray()
            })));
        }
        public static competitorProfileEndpoint GetCompetitorProfileEndpoint(int id = 0, int playerCount = 0, IDictionary <string, string> referenceIds = null)
        {
            if (playerCount == 0)
            {
                playerCount = SR.I(20);
            }

            var players = new List <playerExtended>();

            for (var j = 0; j < playerCount; j++)
            {
                players.Add(GetPlayerExtended());
            }

            return(new competitorProfileEndpoint
            {
                competitor = new teamExtended
                {
                    id = id == 0 ? SR.Urn("competitor", 100000).ToString() : SR.Urn(id, "competitor").ToString(),
                    name = "my name",
                    abbreviation = SR.S1000,
                    @virtual = true,
                    virtualSpecified = true,
                    country = SR.S1000,
                    state = "PA",
                    reference_ids = referenceIds?.Select(s => new competitorReferenceIdsReference_id {
                        name = s.Key, value = s.Value
                    }).ToArray()
                },
                generated_at = DateTime.Today,
                generated_atSpecified = true,
                players = players.ToArray()
            });
        }
        public static mappingsMapping GetMappingsMapping(int id = 0, int subItemCount = 0)
        {
            if (subItemCount == 0)
            {
                subItemCount = SR.I(20);
            }

            var outcomes = new List <mappingsMappingMapping_outcome>();

            for (var j = 0; j < subItemCount; j++)
            {
                outcomes.Add(GetMappingsMappingMappingOutcome());
            }
            var producerId = SR.I(10);

            return(new mappingsMapping
            {
                market_id = id == 0 ? SR.S1000 : id.ToString(),
                product_id = producerId,
                product_ids = $"{producerId}|{producerId+1}",
                sport_id = SR.Urn("sport", SR.I100).ToString(),
                sov_template = SR.S1000,
                valid_for = "setnr=" + SR.I100,
                mapping_outcome = SR.I100 > 50 ? null : outcomes.ToArray()
            });
        }
        public static desc_market GetDescMarket(int id = 0, int subItemCount = 0)
        {
            if (subItemCount == 0)
            {
                subItemCount = SR.I(20);
            }

            var mappings   = new List <mappingsMapping>();
            var outcomes   = new List <desc_outcomesOutcome>();
            var specifiers = new List <desc_specifiersSpecifier>();

            for (var i = 0; i < subItemCount; i++)
            {
                mappings.Add(GetMappingsMapping());
                outcomes.Add(GetDescOutcomesOutcome());
                specifiers.Add(GetDescSpecifiersSpecifier());
            }

            var msg = new desc_market
            {
                id          = id == 0 ? SR.I1000 : id,
                name        = "Market " + SR.S1000,
                description = "Description " + SR.S1000,
                variant     = "Variant " + SR.S1000,
                mappings    = mappings.ToArray(),
                outcomes    = outcomes.ToArray(),
                specifiers  = specifiers.ToArray()
            };

            return(msg);
        }
        public static fixture GetFixture(int id = 0, int subItemCount = 0)
        {
            if (subItemCount == 0)
            {
                subItemCount = SR.I(10);
            }

            var infos = new List <info>();

            for (var j = 0; j < subItemCount; j++)
            {
                var info = GetInfo();
                if (infos.Find(i => i.key == info.key) == null)
                {
                    infos.Add(info);
                }
            }

            var references = new List <referenceIdsReference_id>();

            for (var j = 0; j < subItemCount; j++)
            {
                var rc = GetReference();
                if (references.Find(i => i.name == rc.name) == null)
                {
                    references.Add(rc);
                }
            }

            var msg = new fixture
            {
                id                      = id == 0 ? SR.Urn("match", 10000).ToString() : SR.Urn(id, "match").ToString(),
                name                    = "Fixture " + SR.S1000,
                competitors             = GetTeamCompetitorList(subItemCount).ToArray(),
                coverage_info           = GetCoverageInfo(),
                delayed_info            = GetDelayedInfo(),
                extra_info              = infos.ToArray(),
                liveodds                = SR.S1000,
                next_live_time          = DateTime.Today.ToString(SdkInfo.ISO8601_24H_FullFormat, CultureInfo.InvariantCulture), // should be like "2020-08-18T10:30:00+00:00"
                start_time_tbdSpecified = true,
                start_time_tbd          = true,
                start_timeSpecified     = true,
                start_time              = DateTime.Today,
                scheduledSpecified      = true,
                scheduled               = DateTime.Today.AddDays(3),
                scheduled_endSpecified  = true,
                scheduled_end           = DateTime.Today.AddDays(4),
                reference_ids           = references.ToArray(),
                replaced_by             = SR.I100 < 70 ? $"sr:match:{SR.I1000}" : null,
                status                  = SR.S10000P
            };

            return(msg);
        }
 public static tournamentGroup GetTournamentGroup(int subItemCount = 0)
 {
     if (subItemCount == 0)
     {
         subItemCount = SR.I(20);
     }
     return(new tournamentGroup
     {
         name = "Group " + SR.S1000,
         competitor = GetTeamList(subItemCount).ToArray()
     });
 }
        internal static CoverageInfo GetCoverageInfo(int subItemCount = 0)
        {
            if (subItemCount < 1)
            {
                subItemCount = SR.I(20);
            }
            var items = new List <string>();

            for (var j = 0; j < subItemCount; j++)
            {
                items.Add(SR.S1000);
            }
            return(new CoverageInfo(SR.S100, true, new List <string> (items), CoveredFrom.Tv));
        }
        public static ISport GetSport(int id = 0, int subItemCount = 0)
        {
            if (subItemCount < 1)
            {
                subItemCount = SR.I(20);
            }
            var c = new List <ICategory>();

            while (subItemCount > 0)
            {
                subItemCount--;
                c.Add(GetCategory());
            }
            return(new Sport(SR.Urn(id == 0 ? SR.I1000 : id, "sport"), GetNames(null), c));
        }
        public static fixture GetFixture(int id = 0, int subItemCount = 0)
        {
            if (subItemCount == 0)
            {
                subItemCount = SR.I(10);
            }

            var infos = new List <info>();

            for (var j = 0; j < subItemCount; j++)
            {
                var info = GetInfo();
                if (infos.Find(i => i.key == info.key) == null)
                {
                    infos.Add(info);
                }
            }

            var references = new List <referenceIdsReference_id>();

            for (var j = 0; j < subItemCount; j++)
            {
                var rc = GetReference();
                if (references.Find(i => i.name == rc.name) == null)
                {
                    references.Add(rc);
                }
            }

            var msg = new fixture
            {
                id                      = id == 0 ? SR.Urn("match", 10000).ToString() : SR.Urn(id, "match").ToString(),
                name                    = "Fixture " + SR.S1000,
                competitors             = GetTeamCompetitorList(subItemCount).ToArray(),
                coverage_info           = GetCoverageInfo(),
                delayed_info            = GetDelayedInfo(),
                extra_info              = infos.ToArray(),
                liveodds                = SR.S1000,
                next_live_time          = DateTime.Today.ToString(CultureInfo.InvariantCulture),
                start_time_tbdSpecified = true,
                start_time_tbd          = true,
                reference_ids           = references.ToArray(),
                replaced_by             = SR.I100 > 50 ? $"sr:match:{SR.I1000}" : string.Empty
            };

            return(msg);
        }
 public static playerExtended GetPlayerExtended(int id = 0)
 {
     return(new playerExtended
     {
         name = SR.S1000,
         id = id == 0 ? SR.Urn("player").ToString() : SR.Urn(id, "player").ToString(),
         weight = SR.I(150),
         heightSpecified = true,
         jersey_number = 60,
         jersey_numberSpecified = true,
         nationality = "nat " + SR.S1000,
         type = SR.S1000,
         height = SR.I(200),
         date_of_birth = DateTime.Today.ToString("yyyy-MM-dd", CultureInfo.InvariantCulture),
         weightSpecified = true
     });
 }
        internal static IProductInfo GetProductInfo(int subItemCount = 0)
        {
            if (subItemCount < 1)
            {
                subItemCount = SR.I(20);
            }
            var pil = new List <IProductInfoLink>();
            var sc  = new List <IStreamingChannel>();

            while (subItemCount > 0)
            {
                subItemCount--;
                pil.Add(GetProductInfoLink());
                sc.Add(GetStreamingChannel());
            }
            return(new ProductInfo(true, true, true, true, pil, sc));
        }
        public static coverageInfo GetCoverageInfo(int subItemCount = 0)
        {
            if (subItemCount == 0)
            {
                subItemCount = SR.I(20);
            }
            var items = new List <coverage>();

            for (var j = 0; j < subItemCount; j++)
            {
                items.Add(GetCoverage());
            }

            return(new coverageInfo
            {
                level = SR.S100,
                live_coverage = true,
                coverage = items.ToArray(),
                covered_from = "tv"
            });
        }
        public static tournamentExtended GetTournamentExtended(int id = 0, int subItemCount = 0)
        {
            if (subItemCount == 0)
            {
                subItemCount = SR.I(20);
            }
            var msg = new tournamentExtended
            {
                id                     = id == 0 ? SR.Urn("tournament").ToString() : SR.Urn(id, "tournament").ToString(),
                name                   = "Tournament name " + SR.S(1000),
                scheduled              = DateTime.Now,
                scheduledSpecified     = true,
                scheduled_end          = DateTime.Today,
                scheduled_endSpecified = true,
                category               = GetCategory(),
                sport                  = GetSport(),
                tournament_length      = GetTournamentLength(),
                current_season         = GetCurrentSeason(),
                season_coverage_info   = GetSeasonCoverageInfo(),
                competitors            = GetTeamList(subItemCount).ToArray()
            };

            return(msg);
        }