Exemple #1
0
    private void  fromJSONSpokenUnits(JSONValue json_value, bool ignore_extras)
    {
        Debug.Assert(json_value != null);
        JSONStringValue json_string = json_value.string_value();

        if (json_string == null)
        {
            throw new Exception("The value for field SpokenUnits of UnitsValue_IceJSON is not a string.");
        }
        setSpokenUnits(json_string.getData());
    }
Exemple #2
0
    private void  fromJSONErrorMessageSpoken(JSONValue json_value, bool ignore_extras)
    {
        Debug.Assert(json_value != null);
        JSONStringValue json_string = json_value.string_value();

        if (json_string == null)
        {
            throw new Exception("The value for field ErrorMessageSpoken of FlightStatusSearchResultJSON is not a string.");
        }
        setErrorMessageSpoken(json_string.getData());
    }
Exemple #3
0
    private void  fromJSONdistance_unit(JSONValue json_value, bool ignore_extras)
    {
        Debug.Assert(json_value != null);
        JSONStringValue json_string = json_value.string_value();

        if (json_string == null)
        {
            throw new Exception("The value for field distance_unit of UberRequestEstimateTripJSON is not a string.");
        }
        setdistance_unit(json_string.getData());
    }
Exemple #4
0
    private void  fromJSONPreferredProduct(JSONValue json_value, bool ignore_extras)
    {
        Debug.Assert(json_value != null);
        JSONStringValue json_string = json_value.string_value();

        if (json_string == null)
        {
            throw new Exception("The value for field PreferredProduct of UberEstimatesSpecJSON is not a string.");
        }
        setPreferredProduct(json_string.getData());
    }
Exemple #5
0
    private void  fromJSONChineseYear(JSONValue json_value, bool ignore_extras)
    {
        Debug.Assert(json_value != null);
        JSONStringValue json_string = json_value.string_value();

        if (json_string == null)
        {
            throw new Exception("The value for field ChineseYear of ChineseZodiacSignOfYearInfoNuggetJSON is not a string.");
        }
        setChineseYear(json_string.getData());
    }
Exemple #6
0
    private void  fromJSONCode(JSONValue json_value, bool ignore_extras)
    {
        Debug.Assert(json_value != null);
        JSONStringValue json_string = json_value.string_value();

        if (json_string == null)
        {
            throw new Exception("The value for field Code of CurrencyConversionErrorJSON is not a string.");
        }
        setCode(json_string.getData());
    }
Exemple #7
0
    private void  fromJSONRequestedAlmanacAttribute(JSONValue json_value, bool ignore_extras)
    {
        Debug.Assert(json_value != null);
        JSONStringValue json_string = json_value.string_value();

        if (json_string == null)
        {
            throw new Exception("The value for field RequestedAlmanacAttribute of WeatherConversationStateJSON is not a string.");
        }
        setRequestedAlmanacAttribute(json_string.getData());
    }
Exemple #8
0
    private void  fromJSONSurgeConfirmationId(JSONValue json_value, bool ignore_extras)
    {
        Debug.Assert(json_value != null);
        JSONStringValue json_string = json_value.string_value();

        if (json_string == null)
        {
            throw new Exception("The value for field SurgeConfirmationId of UberRequestDataJSON is not a string.");
        }
        setSurgeConfirmationId(json_string.getData());
    }
Exemple #9
0
    private void  fromJSONZip(JSONValue json_value, bool ignore_extras)
    {
        Debug.Assert(json_value != null);
        JSONStringValue json_string = json_value.string_value();

        if (json_string == null)
        {
            throw new Exception("The value for field Zip of SportsVenueJSON is not a string.");
        }
        setZip(json_string.getData());
    }
Exemple #10
0
    private void  fromJSONID(JSONValue json_value, bool ignore_extras)
    {
        Debug.Assert(json_value != null);
        JSONStringValue json_string = json_value.string_value();

        if (json_string == null)
        {
            throw new Exception("The value for field ID of HomeAutomationGroupJSON is not a string.");
        }
        setID(json_string.getData());
    }
Exemple #11
0
    private void  fromJSONWeatherKind(JSONValue json_value, bool ignore_extras)
    {
        Debug.Assert(json_value != null);
        JSONStringValue json_string = json_value.string_value();

        if (json_string == null)
        {
            throw new Exception("The value for field WeatherKind of WeatherConversationStateJSON is not a string.");
        }
        setWeatherKind(json_string.getData());
    }
Exemple #12
0
    private void  fromJSONPlanetName(JSONValue json_value, bool ignore_extras)
    {
        Debug.Assert(json_value != null);
        JSONStringValue json_string = json_value.string_value();

        if (json_string == null)
        {
            throw new Exception("The value for field PlanetName of PlanetInformationNuggetJSON is not a string.");
        }
        setPlanetName(json_string.getData());
    }
Exemple #13
0
    private void  fromJSONMoonPhase(JSONValue json_value, bool ignore_extras)
    {
        Debug.Assert(json_value != null);
        JSONStringValue json_string = json_value.string_value();

        if (json_string == null)
        {
            throw new Exception("The value for field MoonPhase of MoonPhaseAtTimeConversationStateJSON is not a string.");
        }
        setMoonPhase(json_string.getData());
    }
    private void  fromJSONFullName(JSONValue json_value, bool ignore_extras)
    {
        Debug.Assert(json_value != null);
        JSONStringValue json_string = json_value.string_value();

        if (json_string == null)
        {
            throw new Exception("The value for field FullName of NoPhoneNumberCommandJSON is not a string.");
        }
        setFullName(json_string.getData());
    }
    private void  fromJSONListExpression(JSONValue json_value, bool ignore_extras)
    {
        Debug.Assert(json_value != null);
        JSONStringValue json_string = json_value.string_value();

        if (json_string == null)
        {
            throw new Exception("The value for field ListExpression of ClientListMatchJSON is not a string.");
        }
        setListExpression(json_string.getData());
    }
Exemple #16
0
    private void  fromJSONConvertedNumberSpoken(JSONValue json_value, bool ignore_extras)
    {
        Debug.Assert(json_value != null);
        JSONStringValue json_string = json_value.string_value();

        if (json_string == null)
        {
            throw new Exception("The value for field ConvertedNumberSpoken of ConversionRowJSON is not a string.");
        }
        setConvertedNumberSpoken(json_string.getData());
    }
Exemple #17
0
    private void  fromJSONCorrectArtist(JSONValue json_value, bool ignore_extras)
    {
        Debug.Assert(json_value != null);
        JSONStringValue json_string = json_value.string_value();

        if (json_string == null)
        {
            throw new Exception("The value for field CorrectArtist of CorrectArtistJSON is not a string.");
        }
        setCorrectArtist(json_string.getData());
    }
Exemple #18
0
    private void  fromJSONURL(JSONValue json_value, bool ignore_extras)
    {
        Debug.Assert(json_value != null);
        JSONStringValue json_string = json_value.string_value();

        if (json_string == null)
        {
            throw new Exception("The value for field URL of WeatherImageJSON is not a string.");
        }
        setURL(json_string.getData());
    }
Exemple #19
0
    private void  fromJSONWrittenBody(JSONValue json_value, bool ignore_extras)
    {
        Debug.Assert(json_value != null);
        JSONStringValue json_string = json_value.string_value();

        if (json_string == null)
        {
            throw new Exception("The value for field WrittenBody of SMSNoNumberCommandJSON is not a string.");
        }
        setWrittenBody(json_string.getData());
    }
Exemple #20
0
    private void  fromJSONCommand(JSONValue json_value, bool ignore_extras)
    {
        Debug.Assert(json_value != null);
        JSONStringValue json_string = json_value.string_value();

        if (json_string == null)
        {
            throw new Exception("The value for field Command of FailedCommandWhatInformationJSON is not a string.");
        }
        setCommand(json_string.getData());
    }
Exemple #21
0
    private void  fromJSONInstanceDescription(JSONValue json_value, bool ignore_extras)
    {
        Debug.Assert(json_value != null);
        JSONStringValue json_string = json_value.string_value();

        if (json_string == null)
        {
            throw new Exception("The value for field InstanceDescription of SportsOlympicsEventSchedulesAndResultsInstanceJSON is not a string.");
        }
        setInstanceDescription(json_string.getData());
    }
Exemple #22
0
    private void  fromJSONType(JSONValue json_value, bool ignore_extras)
    {
        Debug.Assert(json_value != null);
        JSONStringValue json_string = json_value.string_value();

        if (json_string == null)
        {
            throw new Exception("The value for field Type of AircraftJSON is not a string.");
        }
        setType(json_string.getData());
    }
Exemple #23
0
    private void  fromJSONPictureUrl(JSONValue json_value, bool ignore_extras)
    {
        Debug.Assert(json_value != null);
        JSONStringValue json_string = json_value.string_value();

        if (json_string == null)
        {
            throw new Exception("The value for field PictureUrl of UberDriverJSON is not a string.");
        }
        setPictureUrl(json_string.getData());
    }
Exemple #24
0
    private void  fromJSONBaseFullName(JSONValue json_value, bool ignore_extras)
    {
        Debug.Assert(json_value != null);
        JSONStringValue json_string = json_value.string_value();

        if (json_string == null)
        {
            throw new Exception("The value for field BaseFullName of ConversionRowJSON is not a string.");
        }
        setBaseFullName(json_string.getData());
    }
Exemple #25
0
    private void  fromJSONValue(JSONValue json_value, bool ignore_extras)
    {
        Debug.Assert(json_value != null);
        JSONStringValue json_string = json_value.string_value();

        if (json_string == null)
        {
            throw new Exception("The value for field Value of IconJSON is not a string.");
        }
        TypeValue the_enum;

        switch (json_string.getData()[0])
        {
        case 'A':
            if ((String.Compare(json_string.getData(), 1, "ngry", 0, 4, false) == 0) && (json_string.getData().Length == 5))
            {
                the_enum = TypeValue.Value_Angry;
                goto enum_is_done;
            }
            break;

        case 'C':
            if ((String.Compare(json_string.getData(), 1, "offee", 0, 5, false) == 0) && (json_string.getData().Length == 6))
            {
                the_enum = TypeValue.Value_Coffee;
                goto enum_is_done;
            }
            break;

        case 'H':
            if ((String.Compare(json_string.getData(), 1, "appy", 0, 4, false) == 0) && (json_string.getData().Length == 5))
            {
                the_enum = TypeValue.Value_Happy;
                goto enum_is_done;
            }
            break;

        case 'N':
            if ((String.Compare(json_string.getData(), 1, "eutral", 0, 6, false) == 0) && (json_string.getData().Length == 7))
            {
                the_enum = TypeValue.Value_Neutral;
                goto enum_is_done;
            }
            break;

        case 'S':
            if ((String.Compare(json_string.getData(), 1, "ad", 0, 2, false) == 0) && (json_string.getData().Length == 3))
            {
                the_enum = TypeValue.Value_Sad;
                goto enum_is_done;
            }
            break;

        default:
            break;
        }
        throw new Exception("The value for field Value of IconJSON is not one of the legal strings.");
        enum_is_done :;
        setValue(the_enum);
    }
    private void  fromJSONCameraSelection(JSONValue json_value, bool ignore_extras)
    {
        Debug.Assert(json_value != null);
        JSONStringValue json_string = json_value.string_value();

        if (json_string == null)
        {
            throw new Exception("The value for field CameraSelection of CarControlCameraCommandJSON is not a string.");
        }
        TypeCameraSelection the_enum;

        switch (json_string.getData()[0])
        {
        case 'F':
            if ((String.Compare(json_string.getData(), 1, "ront", 0, 4, false) == 0) && (json_string.getData().Length == 5))
            {
                the_enum = TypeCameraSelection.CameraSelection_Front;
                goto enum_is_done;
            }
            break;

        case 'L':
            if ((String.Compare(json_string.getData(), 1, "eftSide", 0, 7, false) == 0) && (json_string.getData().Length == 8))
            {
                the_enum = TypeCameraSelection.CameraSelection_LeftSide;
                goto enum_is_done;
            }
            break;

        case 'R':
            switch (json_string.getData()[1])
            {
            case 'e':
                if ((String.Compare(json_string.getData(), 2, "ar", 0, 2, false) == 0) && (json_string.getData().Length == 4))
                {
                    the_enum = TypeCameraSelection.CameraSelection_Rear;
                    goto enum_is_done;
                }
                break;

            case 'i':
                if ((String.Compare(json_string.getData(), 2, "ghtSide", 0, 7, false) == 0) && (json_string.getData().Length == 9))
                {
                    the_enum = TypeCameraSelection.CameraSelection_RightSide;
                    goto enum_is_done;
                }
                break;

            default:
                break;
            }
            break;

        default:
            break;
        }
        throw new Exception("The value for field CameraSelection of CarControlCameraCommandJSON is not one of the legal strings.");
        enum_is_done :;
        setCameraSelection(the_enum);
    }
    private void  fromJSONUnit(JSONValue json_value, bool ignore_extras)
    {
        Debug.Assert(json_value != null);
        JSONStringValue json_string = json_value.string_value();

        if (json_string == null)
        {
            throw new Exception("The value for field Unit of FlightTimeFormatJSON is not a string.");
        }
        TypeUnit the_enum;

        switch (json_string.getData()[0])
        {
        case 'H':
            if ((String.Compare(json_string.getData(), 1, "our", 0, 3, false) == 0) && (json_string.getData().Length == 4))
            {
                the_enum = TypeUnit.Unit_Hour;
                goto enum_is_done;
            }
            break;

        case 'M':
            if ((String.Compare(json_string.getData(), 1, "inute", 0, 5, false) == 0) && (json_string.getData().Length == 6))
            {
                the_enum = TypeUnit.Unit_Minute;
                goto enum_is_done;
            }
            break;

        case 'N':
            if ((String.Compare(json_string.getData(), 1, "one", 0, 3, false) == 0) && (json_string.getData().Length == 4))
            {
                the_enum = TypeUnit.Unit_None;
                goto enum_is_done;
            }
            break;

        case 'S':
            if ((String.Compare(json_string.getData(), 1, "econd", 0, 5, false) == 0) && (json_string.getData().Length == 6))
            {
                the_enum = TypeUnit.Unit_Second;
                goto enum_is_done;
            }
            break;

        case 'W':
            if ((String.Compare(json_string.getData(), 1, "eek", 0, 3, false) == 0) && (json_string.getData().Length == 4))
            {
                the_enum = TypeUnit.Unit_Week;
                goto enum_is_done;
            }
            break;

        default:
            break;
        }
        throw new Exception("The value for field Unit of FlightTimeFormatJSON is not one of the legal strings.");
        enum_is_done :;
        setUnit(the_enum);
    }
Exemple #28
0
    private void  fromJSONValue(JSONValue json_value, bool ignore_extras)
    {
        Debug.Assert(json_value != null);
        JSONStringValue json_string = json_value.string_value();

        if (json_string == null)
        {
            throw new Exception("The value for field Value of CarMirrorSelectionEnumJSON is not a string.");
        }
        TypeValue the_enum;

        switch (json_string.getData()[0])
        {
        case 'B':
            if ((String.Compare(json_string.getData(), 1, "othMirrors", 0, 10, false) == 0) && (json_string.getData().Length == 11))
            {
                the_enum = TypeValue.Value_BothMirrors;
                goto enum_is_done;
            }
            break;

        case 'D':
            if ((String.Compare(json_string.getData(), 1, "riverMirror", 0, 11, false) == 0) && (json_string.getData().Length == 12))
            {
                the_enum = TypeValue.Value_DriverMirror;
                goto enum_is_done;
            }
            break;

        case 'L':
            if ((String.Compare(json_string.getData(), 1, "eftMirror", 0, 9, false) == 0) && (json_string.getData().Length == 10))
            {
                the_enum = TypeValue.Value_LeftMirror;
                goto enum_is_done;
            }
            break;

        case 'P':
            if ((String.Compare(json_string.getData(), 1, "assengerMirror", 0, 14, false) == 0) && (json_string.getData().Length == 15))
            {
                the_enum = TypeValue.Value_PassengerMirror;
                goto enum_is_done;
            }
            break;

        case 'R':
            if ((String.Compare(json_string.getData(), 1, "ightMirror", 0, 10, false) == 0) && (json_string.getData().Length == 11))
            {
                the_enum = TypeValue.Value_RightMirror;
                goto enum_is_done;
            }
            break;

        default:
            break;
        }
        throw new Exception("The value for field Value of CarMirrorSelectionEnumJSON is not one of the legal strings.");
        enum_is_done :;
        setValue(the_enum);
    }
Exemple #29
0
    private void  fromJSONCurrency(JSONValue json_value, bool ignore_extras)
    {
        Debug.Assert(json_value != null);
        TypeCurrency or_result = new TypeCurrency();
        bool         or_done   = false;

        if (!or_done)
        {
            try
            {
                JSONStringValue json_string = json_value.string_value();
                if (json_string == null)
                {
                    throw new Exception("The value for ??? is not a string.");
                }
                or_result.choice0 = json_string.getData();
                or_result.key     = 0;
                or_done           = true;
            }
            catch (Exception)
            {
            }
        }
        if (!or_done)
        {
            try
            {
                or_result.key = 1;
                or_done       = true;
            }
            catch (Exception)
            {
            }
        }
        if (!or_done)
        {
            throw new Exception("The value for field Currency of StockFundamentalsSetJSON is not one of the allowed values.");
        }
        setCurrency(or_result);
        switch (or_result.key)
        {
        case 0:
            break;

        case 1:
            break;

        default:
            Debug.Assert(false);
            break;
        }
    }
Exemple #30
0
    private void  fromJSONpicture_url(JSONValue json_value, bool ignore_extras)
    {
        Debug.Assert(json_value != null);
        Typepicture_url or_result = new Typepicture_url();
        bool            or_done   = false;

        if (!or_done)
        {
            try
            {
                JSONStringValue json_string = json_value.string_value();
                if (json_string == null)
                {
                    throw new Exception("The value for ??? is not a string.");
                }
                or_result.choice0 = json_string.getData();
                or_result.key     = 0;
                or_done           = true;
            }
            catch (Exception)
            {
            }
        }
        if (!or_done)
        {
            try
            {
                or_result.key = 1;
                or_done       = true;
            }
            catch (Exception)
            {
            }
        }
        if (!or_done)
        {
            throw new Exception("The value for field picture_url of UberRequestVehicleJSON is not one of the allowed values.");
        }
        setpicture_url(or_result);
        switch (or_result.key)
        {
        case 0:
            break;

        case 1:
            break;

        default:
            Debug.Assert(false);
            break;
        }
    }