示例#1
0
    private void  fromJSONEndTime(JSONValue json_value, bool ignore_extras)
    {
        Debug.Assert(json_value != null);
        int extracted_integer;
        JSONIntegerValue json_integer = json_value.integer_value();

        if (json_integer == null)
        {
            JSONRationalValue json_rational = json_value.rational_value();
            if (json_rational == null)
            {
                throw new Exception("The value for field EndTime of LocalResultBusinessHoursJSON is not a number.");
            }
            if (!(json_rational.isInteger()))
            {
                throw new Exception("The value for field EndTime of LocalResultBusinessHoursJSON is not an integer.");
            }
            extracted_integer = (int)(json_rational.getLongInt());
        }
        else
        {
            extracted_integer = (int)(json_integer.getLongInt());
        }
        setEndTime(extracted_integer);
    }
示例#2
0
    private void  fromJSONChannel(JSONValue json_value, bool ignore_extras)
    {
        Debug.Assert(json_value != null);
        byte             extracted_integer;
        JSONIntegerValue json_integer = json_value.integer_value();

        if (json_integer == null)
        {
            JSONRationalValue json_rational = json_value.rational_value();
            if (json_rational == null)
            {
                throw new Exception("The value for field Channel of SiriusChannelCommandIntentJSON is not a number.");
            }
            if (!(json_rational.isInteger()))
            {
                throw new Exception("The value for field Channel of SiriusChannelCommandIntentJSON is not an integer.");
            }
            extracted_integer = (byte)(json_rational.getLongInt());
        }
        else
        {
            extracted_integer = (byte)(json_integer.getLongInt());
        }
        setChannel(extracted_integer);
    }
示例#3
0
    private void  fromJSONRank(JSONValue json_value, bool ignore_extras)
    {
        Debug.Assert(json_value != null);
        BigInteger       extracted_integer;
        JSONIntegerValue json_integer = json_value.integer_value();

        if (json_integer == null)
        {
            JSONRationalValue json_rational = json_value.rational_value();
            if (json_rational == null)
            {
                throw new Exception("The value for field Rank of SportsOlympicsEventSchedulesAndResultsInstanceMedalWinnerJSON is not a number.");
            }
            if (!(json_rational.isInteger()))
            {
                throw new Exception("The value for field Rank of SportsOlympicsEventSchedulesAndResultsInstanceMedalWinnerJSON is not an integer.");
            }
            extracted_integer = json_rational.getInteger();
        }
        else
        {
            extracted_integer = json_integer.getData();
        }
        setRank(extracted_integer);
    }
示例#4
0
    private void  fromJSONCount(JSONValue json_value, bool ignore_extras)
    {
        Debug.Assert(json_value != null);
        BigInteger       extracted_integer;
        JSONIntegerValue json_integer = json_value.integer_value();

        if (json_integer == null)
        {
            JSONRationalValue json_rational = json_value.rational_value();
            if (json_rational == null)
            {
                throw new Exception("The value for field Count of BattleshipDictateCoordinatesCommandJSON is not a number.");
            }
            if (!(json_rational.isInteger()))
            {
                throw new Exception("The value for field Count of BattleshipDictateCoordinatesCommandJSON is not an integer.");
            }
            extracted_integer = json_rational.getInteger();
        }
        else
        {
            extracted_integer = json_integer.getData();
        }
        setCount(extracted_integer);
    }
示例#5
0
    private void  fromJSONMonthIndex(JSONValue json_value, bool ignore_extras)
    {
        Debug.Assert(json_value != null);
        sbyte            extracted_integer;
        JSONIntegerValue json_integer = json_value.integer_value();

        if (json_integer == null)
        {
            JSONRationalValue json_rational = json_value.rational_value();
            if (json_rational == null)
            {
                throw new Exception("The value for field MonthIndex of MonthLengthLookupInformationNuggetJSON is not a number.");
            }
            if (!(json_rational.isInteger()))
            {
                throw new Exception("The value for field MonthIndex of MonthLengthLookupInformationNuggetJSON is not an integer.");
            }
            extracted_integer = (sbyte)(json_rational.getLongInt());
        }
        else
        {
            extracted_integer = (sbyte)(json_integer.getLongInt());
        }
        setMonthIndex(extracted_integer);
    }
示例#6
0
    private void  fromJSONStartColumnNumber(JSONValue json_value, bool ignore_extras)
    {
        Debug.Assert(json_value != null);
        BigInteger       extracted_integer;
        JSONIntegerValue json_integer = json_value.integer_value();

        if (json_integer == null)
        {
            JSONRationalValue json_rational = json_value.rational_value();
            if (json_rational == null)
            {
                throw new Exception("The value for field StartColumnNumber of UploadedCodeSourceJSON is not a number.");
            }
            if (!(json_rational.isInteger()))
            {
                throw new Exception("The value for field StartColumnNumber of UploadedCodeSourceJSON is not an integer.");
            }
            extracted_integer = json_rational.getInteger();
        }
        else
        {
            extracted_integer = json_integer.getData();
        }
        setStartColumnNumber(extracted_integer);
    }
    private void  fromJSONFirstDigitCount(JSONValue json_value, bool ignore_extras)
    {
        Debug.Assert(json_value != null);
        BigInteger       extracted_integer;
        JSONIntegerValue json_integer = json_value.integer_value();

        if (json_integer == null)
        {
            JSONRationalValue json_rational = json_value.rational_value();
            if (json_rational == null)
            {
                throw new Exception("The value for field FirstDigitCount of FiniteIntegerDashFiniteIntegerBuildingNumberJSON is not a number.");
            }
            if (!(json_rational.isInteger()))
            {
                throw new Exception("The value for field FirstDigitCount of FiniteIntegerDashFiniteIntegerBuildingNumberJSON is not an integer.");
            }
            extracted_integer = json_rational.getInteger();
        }
        else
        {
            extracted_integer = json_integer.getData();
        }
        setFirstDigitCount(extracted_integer);
    }
    private void  fromJSONFlightNumber(JSONValue json_value, bool ignore_extras)
    {
        Debug.Assert(json_value != null);
        short            extracted_integer;
        JSONIntegerValue json_integer = json_value.integer_value();

        if (json_integer == null)
        {
            JSONRationalValue json_rational = json_value.rational_value();
            if (json_rational == null)
            {
                throw new Exception("The value for field FlightNumber of AirlineFlightNumberJSON is not a number.");
            }
            if (!(json_rational.isInteger()))
            {
                throw new Exception("The value for field FlightNumber of AirlineFlightNumberJSON is not an integer.");
            }
            extracted_integer = (short)(json_rational.getLongInt());
        }
        else
        {
            extracted_integer = (short)(json_integer.getLongInt());
        }
        setFlightNumber(extracted_integer);
    }
示例#9
0
    private void  fromJSONRankResult(JSONValue json_value, bool ignore_extras)
    {
        Debug.Assert(json_value != null);
        BigInteger       extracted_integer;
        JSONIntegerValue json_integer = json_value.integer_value();

        if (json_integer == null)
        {
            JSONRationalValue json_rational = json_value.rational_value();
            if (json_rational == null)
            {
                throw new Exception("The value for field RankResult of SportsPlayoffTriviaInformationNuggetJSON is not a number.");
            }
            if (!(json_rational.isInteger()))
            {
                throw new Exception("The value for field RankResult of SportsPlayoffTriviaInformationNuggetJSON is not an integer.");
            }
            extracted_integer = json_rational.getInteger();
        }
        else
        {
            extracted_integer = json_integer.getData();
        }
        setRankResult(extracted_integer);
    }
    private void  fromJSONGuessesMade(JSONValue json_value, bool ignore_extras)
    {
        Debug.Assert(json_value != null);
        BigInteger       extracted_integer;
        JSONIntegerValue json_integer = json_value.integer_value();

        if (json_integer == null)
        {
            JSONRationalValue json_rational = json_value.rational_value();
            if (json_rational == null)
            {
                throw new Exception("The value for field GuessesMade of NumberGuessQuitGameInformationNuggetJSON is not a number.");
            }
            if (!(json_rational.isInteger()))
            {
                throw new Exception("The value for field GuessesMade of NumberGuessQuitGameInformationNuggetJSON is not an integer.");
            }
            extracted_integer = json_rational.getInteger();
        }
        else
        {
            extracted_integer = json_integer.getData();
        }
        setGuessesMade(extracted_integer);
    }
    private void  fromJSONSecondsBeforeStartOfEvent(JSONValue json_value, bool ignore_extras)
    {
        Debug.Assert(json_value != null);
        BigInteger       extracted_integer;
        JSONIntegerValue json_integer = json_value.integer_value();

        if (json_integer == null)
        {
            JSONRationalValue json_rational = json_value.rational_value();
            if (json_rational == null)
            {
                throw new Exception("The value for field SecondsBeforeStartOfEvent of CalendarReminderJSON is not a number.");
            }
            if (!(json_rational.isInteger()))
            {
                throw new Exception("The value for field SecondsBeforeStartOfEvent of CalendarReminderJSON is not an integer.");
            }
            extracted_integer = json_rational.getInteger();
        }
        else
        {
            extracted_integer = json_integer.getData();
        }
        setSecondsBeforeStartOfEvent(extracted_integer);
    }
示例#12
0
    private void  fromJSONModifier(JSONValue json_value, bool ignore_extras)
    {
        Debug.Assert(json_value != null);
        BigInteger       extracted_integer;
        JSONIntegerValue json_integer = json_value.integer_value();

        if (json_integer == null)
        {
            JSONRationalValue json_rational = json_value.rational_value();
            if (json_rational == null)
            {
                throw new Exception("The value for field Modifier of RandomNumberGeneratorDiceRollRequestResultJSON is not a number.");
            }
            if (!(json_rational.isInteger()))
            {
                throw new Exception("The value for field Modifier of RandomNumberGeneratorDiceRollRequestResultJSON is not an integer.");
            }
            extracted_integer = json_rational.getInteger();
        }
        else
        {
            extracted_integer = json_integer.getData();
        }
        setModifier(extracted_integer);
    }
示例#13
0
    private void  fromJSONAbridgedMaximumRank(JSONValue json_value, bool ignore_extras)
    {
        Debug.Assert(json_value != null);
        BigInteger       extracted_integer;
        JSONIntegerValue json_integer = json_value.integer_value();

        if (json_integer == null)
        {
            JSONRationalValue json_rational = json_value.rational_value();
            if (json_rational == null)
            {
                throw new Exception("The value for field AbridgedMaximumRank of SportsOlympicsMedalStandingsJSON is not a number.");
            }
            if (!(json_rational.isInteger()))
            {
                throw new Exception("The value for field AbridgedMaximumRank of SportsOlympicsMedalStandingsJSON is not an integer.");
            }
            extracted_integer = json_rational.getInteger();
        }
        else
        {
            extracted_integer = json_integer.getData();
        }
        setAbridgedMaximumRank(extracted_integer);
    }
示例#14
0
    private void  fromJSONXCoordinate(JSONValue json_value, bool ignore_extras)
    {
        Debug.Assert(json_value != null);
        sbyte            extracted_integer;
        JSONIntegerValue json_integer = json_value.integer_value();

        if (json_integer == null)
        {
            JSONRationalValue json_rational = json_value.rational_value();
            if (json_rational == null)
            {
                throw new Exception("The value for field XCoordinate of BattleshipCoordinateJSON is not a number.");
            }
            if (!(json_rational.isInteger()))
            {
                throw new Exception("The value for field XCoordinate of BattleshipCoordinateJSON is not an integer.");
            }
            extracted_integer = (sbyte)(json_rational.getLongInt());
        }
        else
        {
            extracted_integer = (sbyte)(json_integer.getLongInt());
        }
        setXCoordinate(extracted_integer);
    }
示例#15
0
    private void  fromJSONResultIndexReferenced(JSONValue json_value, bool ignore_extras)
    {
        Debug.Assert(json_value != null);
        BigInteger       extracted_integer;
        JSONIntegerValue json_integer = json_value.integer_value();

        if (json_integer == null)
        {
            JSONRationalValue json_rational = json_value.rational_value();
            if (json_rational == null)
            {
                throw new Exception("The value for field ResultIndexReferenced of HotelSearchConversationStateElementJSON is not a number.");
            }
            if (!(json_rational.isInteger()))
            {
                throw new Exception("The value for field ResultIndexReferenced of HotelSearchConversationStateElementJSON is not an integer.");
            }
            extracted_integer = json_rational.getInteger();
        }
        else
        {
            extracted_integer = json_integer.getData();
        }
        setResultIndexReferenced(extracted_integer);
    }
示例#16
0
    private void  fromJSONOutcomeCount(JSONValue json_value, bool ignore_extras)
    {
        Debug.Assert(json_value != null);
        BigInteger       extracted_integer;
        JSONIntegerValue json_integer = json_value.integer_value();

        if (json_integer == null)
        {
            JSONRationalValue json_rational = json_value.rational_value();
            if (json_rational == null)
            {
                throw new Exception("The value for field OutcomeCount of SportsTeamAndRankJSON is not a number.");
            }
            if (!(json_rational.isInteger()))
            {
                throw new Exception("The value for field OutcomeCount of SportsTeamAndRankJSON is not an integer.");
            }
            extracted_integer = json_rational.getInteger();
        }
        else
        {
            extracted_integer = json_integer.getData();
        }
        setOutcomeCount(extracted_integer);
    }
示例#17
0
    private void  fromJSONDirection(JSONValue json_value, bool ignore_extras)
    {
        Debug.Assert(json_value != null);
        short            extracted_integer;
        JSONIntegerValue json_integer = json_value.integer_value();

        if (json_integer == null)
        {
            JSONRationalValue json_rational = json_value.rational_value();
            if (json_rational == null)
            {
                throw new Exception("The value for field Direction of RobotTurnCommandJSON is not a number.");
            }
            if (!(json_rational.isInteger()))
            {
                throw new Exception("The value for field Direction of RobotTurnCommandJSON is not an integer.");
            }
            extracted_integer = (short)(json_rational.getLongInt());
        }
        else
        {
            extracted_integer = (short)(json_integer.getLongInt());
        }
        setDirection(extracted_integer);
    }
示例#18
0
    private void  fromJSONYear(JSONValue json_value, bool ignore_extras)
    {
        Debug.Assert(json_value != null);
        BigInteger       extracted_integer;
        JSONIntegerValue json_integer = json_value.integer_value();

        if (json_integer == null)
        {
            JSONRationalValue json_rational = json_value.rational_value();
            if (json_rational == null)
            {
                throw new Exception("The value for field Year of SportsOlympicsBasicAttributeArgumentYearJSON is not a number.");
            }
            if (!(json_rational.isInteger()))
            {
                throw new Exception("The value for field Year of SportsOlympicsBasicAttributeArgumentYearJSON is not an integer.");
            }
            extracted_integer = json_rational.getInteger();
        }
        else
        {
            extracted_integer = json_integer.getData();
        }
        setYear(extracted_integer);
    }
示例#19
0
    private void  fromJSONValue(JSONValue json_value, bool ignore_extras)
    {
        Debug.Assert(json_value != null);
        long             extracted_integer;
        JSONIntegerValue json_integer = json_value.integer_value();

        if (json_integer == null)
        {
            JSONRationalValue json_rational = json_value.rational_value();
            if (json_rational == null)
            {
                throw new Exception("The value for field Value of SoundHoundAlbumIDJSON is not a number.");
            }
            if (!(json_rational.isInteger()))
            {
                throw new Exception("The value for field Value of SoundHoundAlbumIDJSON is not an integer.");
            }
            extracted_integer = (long)(json_rational.getLongInt());
        }
        else
        {
            extracted_integer = (long)(json_integer.getLongInt());
        }
        setValue(extracted_integer);
    }
示例#20
0
    private void  fromJSONAlternateListingID(JSONValue json_value, bool ignore_extras)
    {
        Debug.Assert(json_value != null);
        BigInteger       extracted_integer;
        JSONIntegerValue json_integer = json_value.integer_value();

        if (json_integer == null)
        {
            JSONRationalValue json_rational = json_value.rational_value();
            if (json_rational == null)
            {
                throw new Exception("The value for field AlternateListingID of StockConversationRequestedListingJSON is not a number.");
            }
            if (!(json_rational.isInteger()))
            {
                throw new Exception("The value for field AlternateListingID of StockConversationRequestedListingJSON is not an integer.");
            }
            extracted_integer = json_rational.getInteger();
        }
        else
        {
            extracted_integer = json_integer.getData();
        }
        setAlternateListingID(extracted_integer);
    }
示例#21
0
    private void  fromJSONUpdatedBlockCount(JSONValue json_value, bool ignore_extras)
    {
        Debug.Assert(json_value != null);
        BigInteger       extracted_integer;
        JSONIntegerValue json_integer = json_value.integer_value();

        if (json_integer == null)
        {
            JSONRationalValue json_rational = json_value.rational_value();
            if (json_rational == null)
            {
                throw new Exception("The value for field UpdatedBlockCount of TerrierUploadWriteCommandJSON is not a number.");
            }
            if (!(json_rational.isInteger()))
            {
                throw new Exception("The value for field UpdatedBlockCount of TerrierUploadWriteCommandJSON is not an integer.");
            }
            extracted_integer = json_rational.getInteger();
        }
        else
        {
            extracted_integer = json_integer.getData();
        }
        setUpdatedBlockCount(extracted_integer);
    }
    private void  fromJSONLastAlbumListIndex(JSONValue json_value, bool ignore_extras)
    {
        Debug.Assert(json_value != null);
        BigInteger       extracted_integer;
        JSONIntegerValue json_integer = json_value.integer_value();

        if (json_integer == null)
        {
            JSONRationalValue json_rational = json_value.rational_value();
            if (json_rational == null)
            {
                throw new Exception("The value for field LastAlbumListIndex of MusicSearchResultsJSON is not a number.");
            }
            if (!(json_rational.isInteger()))
            {
                throw new Exception("The value for field LastAlbumListIndex of MusicSearchResultsJSON is not an integer.");
            }
            extracted_integer = json_rational.getInteger();
        }
        else
        {
            extracted_integer = json_integer.getData();
        }
        setLastAlbumListIndex(extracted_integer);
    }
示例#23
0
    private void  fromJSONPresetNumber(JSONValue json_value, bool ignore_extras)
    {
        Debug.Assert(json_value != null);
        sbyte            extracted_integer;
        JSONIntegerValue json_integer = json_value.integer_value();

        if (json_integer == null)
        {
            JSONRationalValue json_rational = json_value.rational_value();
            if (json_rational == null)
            {
                throw new Exception("The value for field PresetNumber of RadioPresetCommandJSON is not a number.");
            }
            if (!(json_rational.isInteger()))
            {
                throw new Exception("The value for field PresetNumber of RadioPresetCommandJSON is not an integer.");
            }
            extracted_integer = (sbyte)(json_rational.getLongInt());
        }
        else
        {
            extracted_integer = (sbyte)(json_integer.getLongInt());
        }
        setPresetNumber(extracted_integer);
    }
示例#24
0
    private void  fromJSONProgressUpdateCount(JSONValue json_value, bool ignore_extras)
    {
        Debug.Assert(json_value != null);
        BigInteger       extracted_integer;
        JSONIntegerValue json_integer = json_value.integer_value();

        if (json_integer == null)
        {
            JSONRationalValue json_rational = json_value.rational_value();
            if (json_rational == null)
            {
                throw new Exception("The value for field ProgressUpdateCount of FlightSearchProgressDetailsJSON is not a number.");
            }
            if (!(json_rational.isInteger()))
            {
                throw new Exception("The value for field ProgressUpdateCount of FlightSearchProgressDetailsJSON is not an integer.");
            }
            extracted_integer = json_rational.getInteger();
        }
        else
        {
            extracted_integer = json_integer.getData();
        }
        setProgressUpdateCount(extracted_integer);
    }
示例#25
0
    private void  fromJSONYear(JSONValue json_value, bool ignore_extras)
    {
        Debug.Assert(json_value != null);
        BigInteger       extracted_integer;
        JSONIntegerValue json_integer = json_value.integer_value();

        if (json_integer == null)
        {
            JSONRationalValue json_rational = json_value.rational_value();
            if (json_rational == null)
            {
                throw new Exception("The value for field Year of MonthLengthLookupInformationNuggetJSON is not a number.");
            }
            if (!(json_rational.isInteger()))
            {
                throw new Exception("The value for field Year of MonthLengthLookupInformationNuggetJSON is not an integer.");
            }
            extracted_integer = json_rational.getInteger();
        }
        else
        {
            extracted_integer = json_integer.getData();
        }
        setYear(extracted_integer);
    }
示例#26
0
    private void  fromJSONDealerHandTotal(JSONValue json_value, bool ignore_extras)
    {
        Debug.Assert(json_value != null);
        sbyte            extracted_integer;
        JSONIntegerValue json_integer = json_value.integer_value();

        if (json_integer == null)
        {
            JSONRationalValue json_rational = json_value.rational_value();
            if (json_rational == null)
            {
                throw new Exception("The value for field DealerHandTotal of BlackjackDoubledownInformationNuggetJSON is not a number.");
            }
            if (!(json_rational.isInteger()))
            {
                throw new Exception("The value for field DealerHandTotal of BlackjackDoubledownInformationNuggetJSON is not an integer.");
            }
            extracted_integer = (sbyte)(json_rational.getLongInt());
        }
        else
        {
            extracted_integer = (sbyte)(json_integer.getLongInt());
        }
        setDealerHandTotal(extracted_integer);
    }
示例#27
0
    private void  fromJSONNumberOfPlayerCards(JSONValue json_value, bool ignore_extras)
    {
        Debug.Assert(json_value != null);
        sbyte            extracted_integer;
        JSONIntegerValue json_integer = json_value.integer_value();

        if (json_integer == null)
        {
            JSONRationalValue json_rational = json_value.rational_value();
            if (json_rational == null)
            {
                throw new Exception("The value for field NumberOfPlayerCards of HandHistoryJSON is not a number.");
            }
            if (!(json_rational.isInteger()))
            {
                throw new Exception("The value for field NumberOfPlayerCards of HandHistoryJSON is not an integer.");
            }
            extracted_integer = (sbyte)(json_rational.getLongInt());
        }
        else
        {
            extracted_integer = (sbyte)(json_integer.getLongInt());
        }
        setNumberOfPlayerCards(extracted_integer);
    }
    private void  fromJSONOrdinal(JSONValue json_value, bool ignore_extras)
    {
        Debug.Assert(json_value != null);
        BigInteger       extracted_integer;
        JSONIntegerValue json_integer = json_value.integer_value();

        if (json_integer == null)
        {
            JSONRationalValue json_rational = json_value.rational_value();
            if (json_rational == null)
            {
                throw new Exception("The value for field Ordinal of ChineseZodiacSignOfSignInfoNuggetJSON is not a number.");
            }
            if (!(json_rational.isInteger()))
            {
                throw new Exception("The value for field Ordinal of ChineseZodiacSignOfSignInfoNuggetJSON is not an integer.");
            }
            extracted_integer = json_rational.getInteger();
        }
        else
        {
            extracted_integer = json_integer.getData();
        }
        setOrdinal(extracted_integer);
    }
示例#29
0
    private void  fromJSONID(JSONValue json_value, bool ignore_extras)
    {
        Debug.Assert(json_value != null);
        BigInteger       extracted_integer;
        JSONIntegerValue json_integer = json_value.integer_value();

        if (json_integer == null)
        {
            JSONRationalValue json_rational = json_value.rational_value();
            if (json_rational == null)
            {
                throw new Exception("The value for field ID of NutrientJSON is not a number.");
            }
            if (!(json_rational.isInteger()))
            {
                throw new Exception("The value for field ID of NutrientJSON is not an integer.");
            }
            extracted_integer = json_rational.getInteger();
        }
        else
        {
            extracted_integer = json_integer.getData();
        }
        setID(extracted_integer);
    }
示例#30
0
    private void  fromJSONIntermediateDestinationPositionFromEnd(JSONValue json_value, bool ignore_extras)
    {
        Debug.Assert(json_value != null);
        BigInteger       extracted_integer;
        JSONIntegerValue json_integer = json_value.integer_value();

        if (json_integer == null)
        {
            JSONRationalValue json_rational = json_value.rational_value();
            if (json_rational == null)
            {
                throw new Exception("The value for field IntermediateDestinationPositionFromEnd of RemainingDistanceCommandJSON is not a number.");
            }
            if (!(json_rational.isInteger()))
            {
                throw new Exception("The value for field IntermediateDestinationPositionFromEnd of RemainingDistanceCommandJSON is not an integer.");
            }
            extracted_integer = json_rational.getInteger();
        }
        else
        {
            extracted_integer = json_integer.getData();
        }
        setIntermediateDestinationPositionFromEnd(extracted_integer);
    }